···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskyApikeyDefs from "./defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The name of the API key. */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskyApikeyDefs from "./defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The ID of the API key to update. */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskyShoutDefs from "../shout/defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The unique identifier of the shout to dislike */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskySongDefs from "../song/defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The unique identifier of the song to dislike */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskyShoutDefs from "../shout/defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The unique identifier of the shout to like */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskySongDefs from "../song/defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The unique identifier of the song to like */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskyScrobbleDefs from "./defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The title of the track being scrobbled */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskyShoutDefs from "./defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The content of the shout */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskyShoutDefs from "./defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The unique identifier of the shout to reply to */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskyShoutDefs from "./defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The unique identifier of the shout to report */
···99import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1010import type * as AppRockskySongDefs from "./defs";
11111212-export type QueryParams = {}
1212+export type QueryParams = {};
13131414export interface InputSchema {
1515 /** The title of the song */
···88import { CID } from "multiformats/cid";
99import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10101111-export type QueryParams = {}
1111+export type QueryParams = {};
12121313export type InputSchema = undefined;
1414export type HandlerInput = undefined;
···88import { CID } from "multiformats/cid";
99import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10101111-export type QueryParams = {}
1111+export type QueryParams = {};
12121313export type InputSchema = undefined;
1414export type HandlerInput = undefined;
···88import { CID } from "multiformats/cid";
99import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10101111-export type QueryParams = {}
1111+export type QueryParams = {};
12121313export type InputSchema = undefined;
1414export type HandlerInput = undefined;
···88import { CID } from "multiformats/cid";
99import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10101111-export type QueryParams = {}
1111+export type QueryParams = {};
12121313export type InputSchema = undefined;
1414export type HandlerInput = undefined;
···11+import * as afrobeat from "./afrobeat.ts";
22+import * as afrobeats from "./afrobeats.ts";
33+import * as alternativeMetal from "./alternative-metal.ts";
44+import * as alternativeRnb from "./alternative-rnb.ts";
55+import * as anime from "./anime.ts";
66+import * as artPop from "./art-pop.ts";
77+import * as breakcore from "./breakcore.ts";
88+import * as chicagoDrill from "./chicago-drill.ts";
99+import * as chillwave from "./chillwave.ts";
1010+import * as countryHipHop from "./country-hip-hop.ts";
1111+import * as crunk from "./crunk.ts";
1212+import * as dancePop from "./dance-pop.ts";
1313+import * as deepHouse from "./deep-house.ts";
1414+import * as drill from "./drill.ts";
1515+import * as dubstep from "./dubstep.ts";
1616+import * as emo from "./emo.ts";
1717+import * as grunge from "./grunge.ts";
1818+import * as hardRock from "./hard-rock.ts";
1919+import * as heavyMetal from "./heavy-metal.ts";
2020+import * as hipHop from "./hip-hop.ts";
2121+import * as house from "./house.ts";
2222+import * as hyperpop from "./hyperpop.ts";
2323+import * as indie from "./indie.ts";
2424+import * as indieRock from "./indie-rock.ts";
2525+import * as jpop from "./j-pop.ts";
2626+import * as jrock from "./j-rock.ts";
2727+import * as jazz from "./jazz.ts";
2828+import * as kpop from "./k-pop.ts";
2929+import * as lofi from "./lo-fi.ts";
3030+import * as metal from "./metal.ts";
3131+import * as metalcore from "./metalcore.ts";
3232+import * as midwestEmo from "./midwest-emo.ts";
3333+import * as numetal from "./nu-metal.ts";
3434+import * as popPunk from "./pop-punk.ts";
3535+import * as postGrunge from "./post-grunge.ts";
3636+import * as rap from "./rap.ts";
3737+import * as rapMetal from "./rap-metal.ts";
3838+import * as rnb from "./rnb.ts";
3939+import * as rock from "./rock.ts";
4040+import * as southernHipHop from "./southern-hip-hop.ts";
4141+import * as speedcore from "./speedcore.ts";
4242+import * as synthwave from "./synthwave.ts";
4343+import * as swedishPop from "./swedish-pop.ts";
4444+import * as thrashMetal from "./thrash-metal.ts";
4545+import * as trap from "./trap.ts";
4646+import * as trapSoul from "./trap-soul.ts";
4747+import * as tropicalHouse from "./tropical-house.ts";
4848+import * as vaporwave from "./vaporwave.ts";
4949+import * as visualKei from "./visual-kei.ts";
5050+import * as vocaloid from "./vocaloid.ts";
5151+import * as westCoastHipHop from "./west-coast-hip-hop.ts";
5252+import { Algorithm } from "./types.ts";
5353+5454+const algos: Algorithm[] = [
5555+ afrobeat.info,
5656+ afrobeats.info,
5757+ alternativeMetal.info,
5858+ alternativeRnb.info,
5959+ anime.info,
6060+ artPop.info,
6161+ breakcore.info,
6262+ chicagoDrill.info,
6363+ chillwave.info,
6464+ countryHipHop.info,
6565+ crunk.info,
6666+ dancePop.info,
6767+ deepHouse.info,
6868+ drill.info,
6969+ dubstep.info,
7070+ emo.info,
7171+ grunge.info,
7272+ hardRock.info,
7373+ heavyMetal.info,
7474+ hipHop.info,
7575+ house.info,
7676+ hyperpop.info,
7777+ indie.info,
7878+ indieRock.info,
7979+ jpop.info,
8080+ jrock.info,
8181+ jazz.info,
8282+ kpop.info,
8383+ lofi.info,
8484+ metal.info,
8585+ metalcore.info,
8686+ midwestEmo.info,
8787+ numetal.info,
8888+ popPunk.info,
8989+ postGrunge.info,
9090+ rap.info,
9191+ rapMetal.info,
9292+ rnb.info,
9393+ rock.info,
9494+ southernHipHop.info,
9595+ speedcore.info,
9696+ synthwave.info,
9797+ swedishPop.info,
9898+ thrashMetal.info,
9999+ trap.info,
100100+ trapSoul.info,
101101+ tropicalHouse.info,
102102+ vaporwave.info,
103103+ visualKei.info,
104104+ vocaloid.info,
105105+ westCoastHipHop.info,
106106+];
107107+108108+export function getAlgo(publisherDid: string, rkey: string) {
109109+ for (const algo of algos) {
110110+ if (algo.rkey === rkey && algo.publisherDid === publisherDid) {
111111+ return algo;
112112+ }
113113+ }
114114+ return null;
115115+}
116116+117117+export default algos;
···11+import { AuthRequiredError, InvalidRequestError } from "@atp/xrpc-server";
22+import { Server } from "../lex/index.ts";
33+import { getAlgo } from "../algos/mod.ts";
44+import { Context } from "../context.ts";
55+import { AtUri } from "@atp/syntax";
66+77+export default function (server: Server, ctx: Context) {
88+ server.app.rocksky.feed.getFeedSkeleton({
99+ auth: ctx.authVerifier.standardOptional,
1010+ handler: async ({ params, auth }) => {
1111+ const feedUri = new AtUri(params.feed);
1212+ const algo = getAlgo(feedUri.hostname, feedUri.rkey);
1313+ if (feedUri.collection !== "app.rocksky.feed.generator" || !algo) {
1414+ throw new InvalidRequestError(
1515+ "Unsupported algorithm",
1616+ "UnsupportedAlgorithm",
1717+ );
1818+ }
1919+ const did =
2020+ auth.credentials.type === "standard" ? auth.credentials.iss : null;
2121+ if (algo.needsAuth && !did) {
2222+ throw new AuthRequiredError();
2323+ }
2424+2525+ const body = await algo.handler(ctx, params, did);
2626+ return {
2727+ encoding: "application/json",
2828+ body: body,
2929+ };
3030+ },
3131+ });
3232+}
+22
apps/feeds/src/api/health.ts
···11+import { Hono } from "@hono/hono";
22+33+const app = new Hono();
44+55+app.get("/", (c) => {
66+ return c.text(
77+ `
88+This is a feed generator for the "rocksky.app" application.
99+Learn more at https://tangled.org/rocksky.app/rocksky
1010+1111+Most API routes are under /xrpc/
1212+1313+ `,
1414+ );
1515+});
1616+1717+app.get("/xrpc/_health", (c) => {
1818+ const version = Deno.env.get("COMMIT_SHA") ?? "unknown";
1919+ return c.json({ version });
2020+});
2121+2222+export default app;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.actor.defs";
99+1010+export interface ProfileViewDetailed {
1111+ $type?: "app.rocksky.actor.defs#profileViewDetailed";
1212+ /** The unique identifier of the actor. */
1313+ id?: string;
1414+ /** The DID of the actor. */
1515+ did?: string;
1616+ /** The handle of the actor. */
1717+ handle?: string;
1818+ /** The display name of the actor. */
1919+ displayName?: string;
2020+ /** The URL of the actor's avatar image. */
2121+ avatar?: string;
2222+ /** The date and time when the actor was created. */
2323+ createdAt?: string;
2424+ /** The date and time when the actor was last updated. */
2525+ updatedAt?: string;
2626+}
2727+2828+const hashProfileViewDetailed = "profileViewDetailed";
2929+3030+export function isProfileViewDetailed<V>(v: V) {
3131+ return is$typed(v, id, hashProfileViewDetailed);
3232+}
3333+3434+export function validateProfileViewDetailed<V>(v: V) {
3535+ return validate<ProfileViewDetailed & V>(v, id, hashProfileViewDetailed);
3636+}
3737+3838+export interface ProfileViewBasic {
3939+ $type?: "app.rocksky.actor.defs#profileViewBasic";
4040+ /** The unique identifier of the actor. */
4141+ id?: string;
4242+ /** The DID of the actor. */
4343+ did?: string;
4444+ /** The handle of the actor. */
4545+ handle?: string;
4646+ /** The display name of the actor. */
4747+ displayName?: string;
4848+ /** The URL of the actor's avatar image. */
4949+ avatar?: string;
5050+ /** The date and time when the actor was created. */
5151+ createdAt?: string;
5252+ /** The date and time when the actor was last updated. */
5353+ updatedAt?: string;
5454+}
5555+5656+const hashProfileViewBasic = "profileViewBasic";
5757+5858+export function isProfileViewBasic<V>(v: V) {
5959+ return is$typed(v, id, hashProfileViewBasic);
6060+}
6161+6262+export function validateProfileViewBasic<V>(v: V) {
6363+ return validate<ProfileViewBasic & V>(v, id, hashProfileViewBasic);
6464+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyAlbumDefs from "../album/defs.ts";
55+66+export type QueryParams = {
77+ /** The DID or handle of the actor */
88+ did: string;
99+ /** The maximum number of albums to return */
1010+ limit?: number;
1111+ /** The offset for pagination */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ albums?: (AppRockskyAlbumDefs.AlbumViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyArtistDefs from "../artist/defs.ts";
55+66+export type QueryParams = {
77+ /** The DID or handle of the actor */
88+ did: string;
99+ /** The maximum number of albums to return */
1010+ limit?: number;
1111+ /** The offset for pagination */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ artists?: (AppRockskyArtistDefs.ArtistViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskySongDefs from "../song/defs.ts";
55+66+export type QueryParams = {
77+ /** The DID or handle of the actor */
88+ did: string;
99+ /** The maximum number of albums to return */
1010+ limit?: number;
1111+ /** The offset for pagination */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ tracks?: (AppRockskySongDefs.SongViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyPlaylistDefs from "../playlist/defs.ts";
55+66+export type QueryParams = {
77+ /** The DID or handle of the actor */
88+ did: string;
99+ /** The maximum number of albums to return */
1010+ limit?: number;
1111+ /** The offset for pagination */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ playlists?: (AppRockskyPlaylistDefs.PlaylistViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyScrobbleDefs from "../scrobble/defs.ts";
55+66+export type QueryParams = {
77+ /** The DID or handle of the actor */
88+ did: string;
99+ /** The maximum number of albums to return */
1010+ limit?: number;
1111+ /** The offset for pagination */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ scrobbles?: (AppRockskyScrobbleDefs.ScrobbleViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskySongDefs from "../song/defs.ts";
55+66+export type QueryParams = {
77+ /** The DID or handle of the actor */
88+ did: string;
99+ /** The maximum number of albums to return */
1010+ limit?: number;
1111+ /** The offset for pagination */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ songs?: (AppRockskySongDefs.SongViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyActorDefs from "./defs.ts";
55+66+export type QueryParams = {
77+ /** The DID or handle of the actor */
88+ did?: string;
99+};
1010+export type InputSchema = undefined;
1111+export type OutputSchema = AppRockskyActorDefs.ProfileViewDetailed;
1212+export type HandlerInput = void;
1313+1414+export interface HandlerSuccess {
1515+ encoding: "application/json";
1616+ body: OutputSchema;
1717+ headers?: { [key: string]: string };
1818+}
1919+2020+export interface HandlerError {
2121+ status: number;
2222+ message?: string;
2323+}
2424+2525+export type HandlerOutput = HandlerError | HandlerSuccess;
+54
apps/feeds/src/lex/types/app/rocksky/album.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type { BlobRef } from "@atp/lexicon";
55+import { validate as _validate } from "../../../lexicons.ts";
66+import { is$typed as _is$typed } from "../../../util.ts";
77+88+const is$typed = _is$typed, validate = _validate;
99+const id = "app.rocksky.album";
1010+1111+export interface Record {
1212+ $type: "app.rocksky.album";
1313+ /** The title of the album. */
1414+ title: string;
1515+ /** The artist of the album. */
1616+ artist: string;
1717+ /** The duration of the album in seconds. */
1818+ duration?: number;
1919+ /** The release date of the album. */
2020+ releaseDate?: string;
2121+ /** The year the album was released. */
2222+ year?: number;
2323+ /** The genre of the album. */
2424+ genre?: string;
2525+ /** The album art of the album. */
2626+ albumArt?: BlobRef;
2727+ /** The URL of the album art of the album. */
2828+ albumArtUrl?: string;
2929+ /** The tags of the album. */
3030+ tags?: (string)[];
3131+ /** The YouTube link of the album. */
3232+ youtubeLink?: string;
3333+ /** The Spotify link of the album. */
3434+ spotifyLink?: string;
3535+ /** The tidal link of the album. */
3636+ tidalLink?: string;
3737+ /** The Apple Music link of the album. */
3838+ appleMusicLink?: string;
3939+ /** The date and time when the album was created. */
4040+ createdAt: string;
4141+ [k: string]: unknown;
4242+}
4343+4444+const hashRecord = "main";
4545+4646+export function isRecord<V>(v: V) {
4747+ return is$typed(v, id, hashRecord);
4848+}
4949+5050+export function validateRecord<V>(v: V) {
5151+ return validate<Record & V>(v, id, hashRecord, true);
5252+}
5353+5454+export type Main = Record;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+import type * as AppRockskySongDefsSongViewBasic from "../song/defs/songViewBasic.ts";
77+88+const is$typed = _is$typed, validate = _validate;
99+const id = "app.rocksky.album.defs";
1010+1111+export interface AlbumViewBasic {
1212+ $type?: "app.rocksky.album.defs#albumViewBasic";
1313+ /** The unique identifier of the album. */
1414+ id?: string;
1515+ /** The URI of the album. */
1616+ uri?: string;
1717+ /** The title of the album. */
1818+ title?: string;
1919+ /** The artist of the album. */
2020+ artist?: string;
2121+ /** The URI of the album's artist. */
2222+ artistUri?: string;
2323+ /** The year the album was released. */
2424+ year?: number;
2525+ /** The URL of the album art image. */
2626+ albumArt?: string;
2727+ /** The release date of the album. */
2828+ releaseDate?: string;
2929+ /** The SHA256 hash of the album. */
3030+ sha256?: string;
3131+ /** The number of times the album has been played. */
3232+ playCount?: number;
3333+ /** The number of unique listeners who have played the album. */
3434+ uniqueListeners?: number;
3535+}
3636+3737+const hashAlbumViewBasic = "albumViewBasic";
3838+3939+export function isAlbumViewBasic<V>(v: V) {
4040+ return is$typed(v, id, hashAlbumViewBasic);
4141+}
4242+4343+export function validateAlbumViewBasic<V>(v: V) {
4444+ return validate<AlbumViewBasic & V>(v, id, hashAlbumViewBasic);
4545+}
4646+4747+export interface AlbumViewDetailed {
4848+ $type?: "app.rocksky.album.defs#albumViewDetailed";
4949+ /** The unique identifier of the album. */
5050+ id?: string;
5151+ /** The URI of the album. */
5252+ uri?: string;
5353+ /** The title of the album. */
5454+ title?: string;
5555+ /** The artist of the album. */
5656+ artist?: string;
5757+ /** The URI of the album's artist. */
5858+ artistUri?: string;
5959+ /** The year the album was released. */
6060+ year?: number;
6161+ /** The URL of the album art image. */
6262+ albumArt?: string;
6363+ /** The release date of the album. */
6464+ releaseDate?: string;
6565+ /** The SHA256 hash of the album. */
6666+ sha256?: string;
6767+ /** The number of times the album has been played. */
6868+ playCount?: number;
6969+ /** The number of unique listeners who have played the album. */
7070+ uniqueListeners?: number;
7171+ tracks?: (AppRockskySongDefsSongViewBasic.Main)[];
7272+}
7373+7474+const hashAlbumViewDetailed = "albumViewDetailed";
7575+7676+export function isAlbumViewDetailed<V>(v: V) {
7777+ return is$typed(v, id, hashAlbumViewDetailed);
7878+}
7979+8080+export function validateAlbumViewDetailed<V>(v: V) {
8181+ return validate<AlbumViewDetailed & V>(v, id, hashAlbumViewDetailed);
8282+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.apikey.defs";
99+1010+export interface ApiKeyView {
1111+ $type?: "app.rocksky.apikey.defs#apiKeyView";
1212+ /** The unique identifier of the API key. */
1313+ id?: string;
1414+ /** The name of the API key. */
1515+ name?: string;
1616+ /** A description for the API key. */
1717+ description?: string;
1818+ /** The date and time when the API key was created. */
1919+ createdAt?: string;
2020+}
2121+2222+const hashApiKeyView = "apiKeyView";
2323+2424+export function isApiKeyView<V>(v: V) {
2525+ return is$typed(v, id, hashApiKeyView);
2626+}
2727+2828+export function validateApiKeyView<V>(v: V) {
2929+ return validate<ApiKeyView & V>(v, id, hashApiKeyView);
3030+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyApikeyDefs from "./defs.ts";
55+66+export type QueryParams = {
77+ /** The number of API keys to skip before starting to collect the result set. */
88+ offset?: number;
99+ /** The number of API keys to return per page. */
1010+ limit?: number;
1111+};
1212+export type InputSchema = undefined;
1313+1414+export interface OutputSchema {
1515+ apiKeys?: (AppRockskyApikeyDefs.ApikeyView)[];
1616+}
1717+1818+export type HandlerInput = void;
1919+2020+export interface HandlerSuccess {
2121+ encoding: "application/json";
2222+ body: OutputSchema;
2323+ headers?: { [key: string]: string };
2424+}
2525+2626+export interface HandlerError {
2727+ status: number;
2828+ message?: string;
2929+}
3030+3131+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyApikeyDefs from "./defs.ts";
55+66+export type QueryParams = globalThis.Record<PropertyKey, never>;
77+88+export interface InputSchema {
99+ /** The ID of the API key to update. */
1010+ id: string;
1111+ /** The new name of the API key. */
1212+ name: string;
1313+ /** A new description for the API key. */
1414+ description?: string;
1515+}
1616+1717+export type OutputSchema = AppRockskyApikeyDefs.ApiKey;
1818+1919+export interface HandlerInput {
2020+ encoding: "application/json";
2121+ body: InputSchema;
2222+}
2323+2424+export interface HandlerSuccess {
2525+ encoding: "application/json";
2626+ body: OutputSchema;
2727+ headers?: { [key: string]: string };
2828+}
2929+3030+export interface HandlerError {
3131+ status: number;
3232+ message?: string;
3333+}
3434+3535+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
+44
apps/feeds/src/lex/types/app/rocksky/artist.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type { BlobRef } from "@atp/lexicon";
55+import { validate as _validate } from "../../../lexicons.ts";
66+import { is$typed as _is$typed } from "../../../util.ts";
77+88+const is$typed = _is$typed, validate = _validate;
99+const id = "app.rocksky.artist";
1010+1111+export interface Record {
1212+ $type: "app.rocksky.artist";
1313+ /** The name of the artist. */
1414+ name: string;
1515+ /** The biography of the artist. */
1616+ bio?: string;
1717+ /** The picture of the artist. */
1818+ picture?: BlobRef;
1919+ /** The URL of the picture of the artist. */
2020+ pictureUrl?: string;
2121+ /** The tags of the artist. */
2222+ tags?: (string)[];
2323+ /** The birth date of the artist. */
2424+ born?: string;
2525+ /** The death date of the artist. */
2626+ died?: string;
2727+ /** The birth place of the artist. */
2828+ bornIn?: string;
2929+ /** The date when the artist was created. */
3030+ createdAt: string;
3131+ [k: string]: unknown;
3232+}
3333+3434+const hashRecord = "main";
3535+3636+export function isRecord<V>(v: V) {
3737+ return is$typed(v, id, hashRecord);
3838+}
3939+4040+export function validateRecord<V>(v: V) {
4141+ return validate<Record & V>(v, id, hashRecord, true);
4242+}
4343+4444+export type Main = Record;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.artist.defs";
99+1010+export interface ArtistViewBasic {
1111+ $type?: "app.rocksky.artist.defs#artistViewBasic";
1212+ /** The unique identifier of the artist. */
1313+ id?: string;
1414+ /** The URI of the artist. */
1515+ uri?: string;
1616+ /** The name of the artist. */
1717+ name?: string;
1818+ /** The picture of the artist. */
1919+ picture?: string;
2020+ /** The SHA256 hash of the artist. */
2121+ sha256?: string;
2222+ /** The number of times the artist has been played. */
2323+ playCount?: number;
2424+ /** The number of unique listeners who have played the artist. */
2525+ uniqueListeners?: number;
2626+}
2727+2828+const hashArtistViewBasic = "artistViewBasic";
2929+3030+export function isArtistViewBasic<V>(v: V) {
3131+ return is$typed(v, id, hashArtistViewBasic);
3232+}
3333+3434+export function validateArtistViewBasic<V>(v: V) {
3535+ return validate<ArtistViewBasic & V>(v, id, hashArtistViewBasic);
3636+}
3737+3838+export interface ArtistViewDetailed {
3939+ $type?: "app.rocksky.artist.defs#artistViewDetailed";
4040+ /** The unique identifier of the artist. */
4141+ id?: string;
4242+ /** The URI of the artist. */
4343+ uri?: string;
4444+ /** The name of the artist. */
4545+ name?: string;
4646+ /** The picture of the artist. */
4747+ picture?: string;
4848+ /** The SHA256 hash of the artist. */
4949+ sha256?: string;
5050+ /** The number of times the artist has been played. */
5151+ playCount?: number;
5252+ /** The number of unique listeners who have played the artist. */
5353+ uniqueListeners?: number;
5454+}
5555+5656+const hashArtistViewDetailed = "artistViewDetailed";
5757+5858+export function isArtistViewDetailed<V>(v: V) {
5959+ return is$typed(v, id, hashArtistViewDetailed);
6060+}
6161+6262+export function validateArtistViewDetailed<V>(v: V) {
6363+ return validate<ArtistViewDetailed & V>(v, id, hashArtistViewDetailed);
6464+}
6565+6666+export interface SongViewBasic {
6767+ $type?: "app.rocksky.artist.defs#songViewBasic";
6868+ /** The URI of the song. */
6969+ uri?: string;
7070+ /** The title of the song. */
7171+ title?: string;
7272+ /** The number of times the song has been played. */
7373+ playCount?: number;
7474+}
7575+7676+const hashSongViewBasic = "songViewBasic";
7777+7878+export function isSongViewBasic<V>(v: V) {
7979+ return is$typed(v, id, hashSongViewBasic);
8080+}
8181+8282+export function validateSongViewBasic<V>(v: V) {
8383+ return validate<SongViewBasic & V>(v, id, hashSongViewBasic);
8484+}
8585+8686+export interface ListenerViewBasic {
8787+ $type?: "app.rocksky.artist.defs#listenerViewBasic";
8888+ /** The unique identifier of the actor. */
8989+ id?: string;
9090+ /** The DID of the listener. */
9191+ did?: string;
9292+ /** The handle of the listener. */
9393+ handle?: string;
9494+ /** The display name of the listener. */
9595+ displayName?: string;
9696+ /** The URL of the listener's avatar image. */
9797+ avatar?: string;
9898+ mostListenedSong?: SongViewBasic;
9999+ /** The total number of plays by the listener. */
100100+ totalPlays?: number;
101101+ /** The rank of the listener among all listeners of the artist. */
102102+ rank?: number;
103103+}
104104+105105+const hashListenerViewBasic = "listenerViewBasic";
106106+107107+export function isListenerViewBasic<V>(v: V) {
108108+ return is$typed(v, id, hashListenerViewBasic);
109109+}
110110+111111+export function validateListenerViewBasic<V>(v: V) {
112112+ return validate<ListenerViewBasic & V>(v, id, hashListenerViewBasic);
113113+}
114114+115115+export interface ArtistMbid {
116116+ $type?: "app.rocksky.artist.defs#artistMbid";
117117+ /** The MusicBrainz Identifier (MBID) of the artist. */
118118+ mbid?: string;
119119+ /** The name of the artist. */
120120+ name?: string;
121121+}
122122+123123+const hashArtistMbid = "artistMbid";
124124+125125+export function isArtistMbid<V>(v: V) {
126126+ return is$typed(v, id, hashArtistMbid);
127127+}
128128+129129+export function validateArtistMbid<V>(v: V) {
130130+ return validate<ArtistMbid & V>(v, id, hashArtistMbid);
131131+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyArtistDefs from "./defs.ts";
55+66+export type QueryParams = {
77+ /** The URI of the artist to retrieve listeners from */
88+ uri: string;
99+ /** Number of items to skip before returning results */
1010+ offset?: number;
1111+ /** Maximum number of results to return */
1212+ limit?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ listeners?: (AppRockskyArtistDefs.ListenerViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskySongDefs from "../song/defs.ts";
55+66+export type QueryParams = {
77+ /** The URI of the artist to retrieve albums from */
88+ uri?: string;
99+ /** The maximum number of tracks to return */
1010+ limit?: number;
1111+ /** The offset for pagination */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ tracks?: (AppRockskySongDefs.SongViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyChartsDefs from "./defs.ts";
55+66+export type QueryParams = {
77+ /** The DID or handle of the actor */
88+ did?: string;
99+ /** The URI of the artist to filter by */
1010+ artisturi?: string;
1111+ /** The URI of the album to filter by */
1212+ albumuri?: string;
1313+ /** The URI of the track to filter by */
1414+ songuri?: string;
1515+};
1616+export type InputSchema = undefined;
1717+export type OutputSchema = AppRockskyChartsDefs.ChartsView;
1818+export type HandlerInput = void;
1919+2020+export interface HandlerSuccess {
2121+ encoding: "application/json";
2222+ body: OutputSchema;
2323+ headers?: { [key: string]: string };
2424+}
2525+2626+export interface HandlerError {
2727+ status: number;
2828+ message?: string;
2929+}
3030+3131+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.dropbox.defs";
99+1010+export interface FileView {
1111+ $type?: "app.rocksky.dropbox.defs#fileView";
1212+ /** The unique identifier of the file. */
1313+ id?: string;
1414+ /** The name of the file. */
1515+ name?: string;
1616+ /** The lowercased path of the file. */
1717+ pathLower?: string;
1818+ /** The display path of the file. */
1919+ pathDisplay?: string;
2020+ /** The last modified date and time of the file on the client. */
2121+ clientModified?: string;
2222+ /** The last modified date and time of the file on the server. */
2323+ serverModified?: string;
2424+}
2525+2626+const hashFileView = "fileView";
2727+2828+export function isFileView<V>(v: V) {
2929+ return is$typed(v, id, hashFileView);
3030+}
3131+3232+export function validateFileView<V>(v: V) {
3333+ return validate<FileView & V>(v, id, hashFileView);
3434+}
3535+3636+export interface FileListView {
3737+ $type?: "app.rocksky.dropbox.defs#fileListView";
3838+ /** A list of files in the Dropbox. */
3939+ files?: (FileView)[];
4040+}
4141+4242+const hashFileListView = "fileListView";
4343+4444+export function isFileListView<V>(v: V) {
4545+ return is$typed(v, id, hashFileListView);
4646+}
4747+4848+export function validateFileListView<V>(v: V) {
4949+ return validate<FileListView & V>(v, id, hashFileListView);
5050+}
5151+5252+export interface TemporaryLinkView {
5353+ $type?: "app.rocksky.dropbox.defs#temporaryLinkView";
5454+ /** The temporary link to access the file. */
5555+ link?: string;
5656+}
5757+5858+const hashTemporaryLinkView = "temporaryLinkView";
5959+6060+export function isTemporaryLinkView<V>(v: V) {
6161+ return is$typed(v, id, hashTemporaryLinkView);
6262+}
6363+6464+export function validateTemporaryLinkView<V>(v: V) {
6565+ return validate<TemporaryLinkView & V>(v, id, hashTemporaryLinkView);
6666+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+export type QueryParams = {
55+ playerId?: string;
66+ /** The directory to add to the queue */
77+ directory: string;
88+ /** Position in the queue to insert the directory at, defaults to the end if not specified */
99+ position?: number;
1010+ /** Whether to shuffle the added directory in the queue */
1111+ shuffle?: boolean;
1212+};
1313+export type InputSchema = undefined;
1414+export type HandlerInput = void;
1515+1616+export interface HandlerError {
1717+ status: number;
1818+ message?: string;
1919+}
2020+2121+export type HandlerOutput = HandlerError | void;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+export type QueryParams = {
55+ playerId?: string;
66+ items: string[];
77+ /** Position in the queue to insert the items at, defaults to the end if not specified */
88+ position?: number;
99+ /** Whether to shuffle the added items in the queue */
1010+ shuffle?: boolean;
1111+};
1212+export type InputSchema = undefined;
1313+export type HandlerInput = void;
1414+1515+export interface HandlerError {
1616+ status: number;
1717+ message?: string;
1818+}
1919+2020+export type HandlerOutput = HandlerError | void;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyPlayerDefs from "./defs.ts";
55+66+export type QueryParams = {
77+ playerId?: string;
88+ /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */
99+ actor?: string;
1010+};
1111+export type InputSchema = undefined;
1212+export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed;
1313+export type HandlerInput = void;
1414+1515+export interface HandlerSuccess {
1616+ encoding: "application/json";
1717+ body: OutputSchema;
1818+ headers?: { [key: string]: string };
1919+}
2020+2121+export interface HandlerError {
2222+ status: number;
2323+ message?: string;
2424+}
2525+2626+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+export type QueryParams = {
55+ playerId?: string;
66+ /** The position in seconds to seek to */
77+ position: number;
88+};
99+export type InputSchema = undefined;
1010+export type HandlerInput = void;
1111+1212+export interface HandlerError {
1313+ status: number;
1414+ message?: string;
1515+}
1616+1717+export type HandlerOutput = HandlerError | void;
+45
apps/feeds/src/lex/types/app/rocksky/playlist.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type { BlobRef } from "@atp/lexicon";
55+import { validate as _validate } from "../../../lexicons.ts";
66+import { is$typed as _is$typed } from "../../../util.ts";
77+import type * as AppRockskySong from "./song.ts";
88+99+const is$typed = _is$typed, validate = _validate;
1010+const id = "app.rocksky.playlist";
1111+1212+export interface Record {
1313+ $type: "app.rocksky.playlist";
1414+ /** The name of the playlist. */
1515+ name: string;
1616+ /** The playlist description. */
1717+ description?: string;
1818+ /** The picture of the playlist. */
1919+ picture?: BlobRef;
2020+ /** The tracks in the playlist. */
2121+ tracks?: (AppRockskySong.Record)[];
2222+ /** The date the playlist was created. */
2323+ createdAt: string;
2424+ /** The Spotify link of the playlist. */
2525+ spotifyLink?: string;
2626+ /** The Tidal link of the playlist. */
2727+ tidalLink?: string;
2828+ /** The YouTube link of the playlist. */
2929+ youtubeLink?: string;
3030+ /** The Apple Music link of the playlist. */
3131+ appleMusicLink?: string;
3232+ [k: string]: unknown;
3333+}
3434+3535+const hashRecord = "main";
3636+3737+export function isRecord<V>(v: V) {
3838+ return is$typed(v, id, hashRecord);
3939+}
4040+4141+export function validateRecord<V>(v: V) {
4242+ return validate<Record & V>(v, id, hashRecord, true);
4343+}
4444+4545+export type Main = Record;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+import type * as AppRockskySongDefs from "../song/defs.ts";
77+88+const is$typed = _is$typed, validate = _validate;
99+const id = "app.rocksky.playlist.defs";
1010+1111+/** Detailed view of a playlist, including its tracks and metadata */
1212+export interface PlaylistViewDetailed {
1313+ $type?: "app.rocksky.playlist.defs#playlistViewDetailed";
1414+ /** The unique identifier of the playlist. */
1515+ id?: string;
1616+ /** The title of the playlist. */
1717+ title?: string;
1818+ /** The URI of the playlist. */
1919+ uri?: string;
2020+ /** The DID of the curator of the playlist. */
2121+ curatorDid?: string;
2222+ /** The handle of the curator of the playlist. */
2323+ curatorHandle?: string;
2424+ /** The name of the curator of the playlist. */
2525+ curatorName?: string;
2626+ /** The URL of the avatar image of the curator. */
2727+ curatorAvatarUrl?: string;
2828+ /** A description of the playlist. */
2929+ description?: string;
3030+ /** The URL of the cover image for the playlist. */
3131+ coverImageUrl?: string;
3232+ /** The date and time when the playlist was created. */
3333+ createdAt?: string;
3434+ /** A list of tracks in the playlist. */
3535+ tracks?: (AppRockskySongDefs.SongViewBasic)[];
3636+}
3737+3838+const hashPlaylistViewDetailed = "playlistViewDetailed";
3939+4040+export function isPlaylistViewDetailed<V>(v: V) {
4141+ return is$typed(v, id, hashPlaylistViewDetailed);
4242+}
4343+4444+export function validatePlaylistViewDetailed<V>(v: V) {
4545+ return validate<PlaylistViewDetailed & V>(v, id, hashPlaylistViewDetailed);
4646+}
4747+4848+/** Basic view of a playlist, including its metadata */
4949+export interface PlaylistViewBasic {
5050+ $type?: "app.rocksky.playlist.defs#playlistViewBasic";
5151+ /** The unique identifier of the playlist. */
5252+ id?: string;
5353+ /** The title of the playlist. */
5454+ title?: string;
5555+ /** The URI of the playlist. */
5656+ uri?: string;
5757+ /** The DID of the curator of the playlist. */
5858+ curatorDid?: string;
5959+ /** The handle of the curator of the playlist. */
6060+ curatorHandle?: string;
6161+ /** The name of the curator of the playlist. */
6262+ curatorName?: string;
6363+ /** The URL of the avatar image of the curator. */
6464+ curatorAvatarUrl?: string;
6565+ /** A description of the playlist. */
6666+ description?: string;
6767+ /** The URL of the cover image for the playlist. */
6868+ coverImageUrl?: string;
6969+ /** The date and time when the playlist was created. */
7070+ createdAt?: string;
7171+ /** The number of tracks in the playlist. */
7272+ trackCount?: number;
7373+}
7474+7575+const hashPlaylistViewBasic = "playlistViewBasic";
7676+7777+export function isPlaylistViewBasic<V>(v: V) {
7878+ return is$typed(v, id, hashPlaylistViewBasic);
7979+}
8080+8181+export function validatePlaylistViewBasic<V>(v: V) {
8282+ return validate<PlaylistViewBasic & V>(v, id, hashPlaylistViewBasic);
8383+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+export type QueryParams = {
55+ /** The URI of the playlist to start */
66+ uri: string;
77+ /** The directory (id) to insert into the playlist */
88+ directory: string;
99+ /** The position in the playlist to insert the directory at, if not specified, the directory will be appended */
1010+ position?: number;
1111+};
1212+export type InputSchema = undefined;
1313+export type HandlerInput = void;
1414+1515+export interface HandlerError {
1616+ status: number;
1717+ message?: string;
1818+}
1919+2020+export type HandlerOutput = HandlerError | void;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+export type QueryParams = {
55+ /** The URI of the playlist to start */
66+ uri: string;
77+ files: string[];
88+ /** The position in the playlist to insert the files at, if not specified, files will be appended */
99+ position?: number;
1010+};
1111+export type InputSchema = undefined;
1212+export type HandlerInput = void;
1313+1414+export interface HandlerError {
1515+ status: number;
1616+ message?: string;
1717+}
1818+1919+export type HandlerOutput = HandlerError | void;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+export type QueryParams = {
55+ /** The URI of the playlist to remove the track from */
66+ uri: string;
77+ /** The position of the track to remove in the playlist */
88+ position: number;
99+};
1010+export type InputSchema = undefined;
1111+export type HandlerInput = void;
1212+1313+export interface HandlerError {
1414+ status: number;
1515+ message?: string;
1616+}
1717+1818+export type HandlerOutput = HandlerError | void;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+export type QueryParams = {
55+ /** The URI of the playlist to start */
66+ uri: string;
77+ /** Whether to shuffle the playlist when starting it */
88+ shuffle?: boolean;
99+ /** The position in the playlist to start from, if not specified, starts from the beginning */
1010+ position?: number;
1111+};
1212+export type InputSchema = undefined;
1313+export type HandlerInput = void;
1414+1515+export interface HandlerError {
1616+ status: number;
1717+ message?: string;
1818+}
1919+2020+export type HandlerOutput = HandlerError | void;
+40
apps/feeds/src/lex/types/app/rocksky/radio.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type { BlobRef } from "@atp/lexicon";
55+import { validate as _validate } from "../../../lexicons.ts";
66+import { is$typed as _is$typed } from "../../../util.ts";
77+88+const is$typed = _is$typed, validate = _validate;
99+const id = "app.rocksky.radio";
1010+1111+export interface Record {
1212+ $type: "app.rocksky.radio";
1313+ /** The name of the radio station. */
1414+ name: string;
1515+ /** The URL of the radio station. */
1616+ url: string;
1717+ /** A description of the radio station. */
1818+ description?: string;
1919+ /** The genre of the radio station. */
2020+ genre?: string;
2121+ /** The logo of the radio station. */
2222+ logo?: BlobRef;
2323+ /** The website of the radio station. */
2424+ website?: string;
2525+ /** The date when the radio station was created. */
2626+ createdAt: string;
2727+ [k: string]: unknown;
2828+}
2929+3030+const hashRecord = "main";
3131+3232+export function isRecord<V>(v: V) {
3333+ return is$typed(v, id, hashRecord);
3434+}
3535+3636+export function validateRecord<V>(v: V) {
3737+ return validate<Record & V>(v, id, hashRecord, true);
3838+}
3939+4040+export type Main = Record;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.radio.defs";
99+1010+export interface RadioViewBasic {
1111+ $type?: "app.rocksky.radio.defs#radioViewBasic";
1212+ /** The unique identifier of the radio. */
1313+ id?: string;
1414+ /** The name of the radio. */
1515+ name?: string;
1616+ /** A brief description of the radio. */
1717+ description?: string;
1818+ /** The date and time when the radio was created. */
1919+ createdAt?: string;
2020+}
2121+2222+const hashRadioViewBasic = "radioViewBasic";
2323+2424+export function isRadioViewBasic<V>(v: V) {
2525+ return is$typed(v, id, hashRadioViewBasic);
2626+}
2727+2828+export function validateRadioViewBasic<V>(v: V) {
2929+ return validate<RadioViewBasic & V>(v, id, hashRadioViewBasic);
3030+}
3131+3232+export interface RadioViewDetailed {
3333+ $type?: "app.rocksky.radio.defs#radioViewDetailed";
3434+ /** The unique identifier of the radio. */
3535+ id?: string;
3636+ /** The name of the radio. */
3737+ name?: string;
3838+ /** A brief description of the radio. */
3939+ description?: string;
4040+ /** The website of the radio. */
4141+ website?: string;
4242+ /** The streaming URL of the radio. */
4343+ url?: string;
4444+ /** The genre of the radio. */
4545+ genre?: string;
4646+ /** The logo of the radio station. */
4747+ logo?: string;
4848+ /** The date and time when the radio was created. */
4949+ createdAt?: string;
5050+}
5151+5252+const hashRadioViewDetailed = "radioViewDetailed";
5353+5454+export function isRadioViewDetailed<V>(v: V) {
5555+ return is$typed(v, id, hashRadioViewDetailed);
5656+}
5757+5858+export function validateRadioViewDetailed<V>(v: V) {
5959+ return validate<RadioViewDetailed & V>(v, id, hashRadioViewDetailed);
6060+}
+77
apps/feeds/src/lex/types/app/rocksky/scrobble.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type { BlobRef } from "@atp/lexicon";
55+import { validate as _validate } from "../../../lexicons.ts";
66+import { is$typed as _is$typed } from "../../../util.ts";
77+import type * as AppRockskyArtistDefs from "./artist/defs.ts";
88+99+const is$typed = _is$typed, validate = _validate;
1010+const id = "app.rocksky.scrobble";
1111+1212+export interface Record {
1313+ $type: "app.rocksky.scrobble";
1414+ /** The title of the song. */
1515+ title: string;
1616+ /** The artist of the song. */
1717+ artist: string;
1818+ /** The artists of the song with MusicBrainz IDs. */
1919+ artists?: (AppRockskyArtistDefs.ArtistMbid)[];
2020+ /** The album artist of the song. */
2121+ albumArtist: string;
2222+ /** The album of the song. */
2323+ album: string;
2424+ /** The duration of the song in seconds. */
2525+ duration: number;
2626+ /** The track number of the song in the album. */
2727+ trackNumber?: number;
2828+ /** The disc number of the song in the album. */
2929+ discNumber?: number;
3030+ /** The release date of the song. */
3131+ releaseDate?: string;
3232+ /** The year the song was released. */
3333+ year?: number;
3434+ /** The genre of the song. */
3535+ genre?: string;
3636+ /** The tags of the song. */
3737+ tags?: (string)[];
3838+ /** The composer of the song. */
3939+ composer?: string;
4040+ /** The lyrics of the song. */
4141+ lyrics?: string;
4242+ /** The copyright message of the song. */
4343+ copyrightMessage?: string;
4444+ /** Informations about the song */
4545+ wiki?: string;
4646+ /** The album art of the song. */
4747+ albumArt?: BlobRef;
4848+ /** The URL of the album art of the song. */
4949+ albumArtUrl?: string;
5050+ /** The YouTube link of the song. */
5151+ youtubeLink?: string;
5252+ /** The Spotify link of the song. */
5353+ spotifyLink?: string;
5454+ /** The Tidal link of the song. */
5555+ tidalLink?: string;
5656+ /** The Apple Music link of the song. */
5757+ appleMusicLink?: string;
5858+ /** The date when the song was created. */
5959+ createdAt: string;
6060+ /** The MusicBrainz ID of the song. */
6161+ mbid?: string;
6262+ /** The label of the song. */
6363+ label?: string;
6464+ [k: string]: unknown;
6565+}
6666+6767+const hashRecord = "main";
6868+6969+export function isRecord<V>(v: V) {
7070+ return is$typed(v, id, hashRecord);
7171+}
7272+7373+export function validateRecord<V>(v: V) {
7474+ return validate<Record & V>(v, id, hashRecord, true);
7575+}
7676+7777+export type Main = Record;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyScrobbleDefs from "./defs.ts";
55+66+export type QueryParams = globalThis.Record<PropertyKey, never>;
77+88+export interface InputSchema {
99+ /** The title of the track being scrobbled */
1010+ title: string;
1111+ /** The artist of the track being scrobbled */
1212+ artist: string;
1313+ /** The album of the track being scrobbled */
1414+ album?: string;
1515+ /** The duration of the track in seconds */
1616+ duration?: number;
1717+ /** The MusicBrainz ID of the track, if available */
1818+ mbId?: string;
1919+ /** The URL of the album art for the track */
2020+ albumArt?: string;
2121+ /** The track number of the track in the album */
2222+ trackNumber?: number;
2323+ /** The release date of the track, formatted as YYYY-MM-DD */
2424+ releaseDate?: string;
2525+ /** The year the track was released */
2626+ year?: number;
2727+ /** The disc number of the track in the album, if applicable */
2828+ discNumber?: number;
2929+ /** The lyrics of the track, if available */
3030+ lyrics?: string;
3131+ /** The composer of the track, if available */
3232+ composer?: string;
3333+ /** The copyright message for the track, if available */
3434+ copyrightMessage?: string;
3535+ /** The record label of the track, if available */
3636+ label?: string;
3737+ /** The URL of the artist's picture, if available */
3838+ artistPicture?: string;
3939+ /** The Spotify link for the track, if available */
4040+ spotifyLink?: string;
4141+ /** The Last.fm link for the track, if available */
4242+ lastfmLink?: string;
4343+ /** The Tidal link for the track, if available */
4444+ tidalLink?: string;
4545+ /** The Apple Music link for the track, if available */
4646+ appleMusicLink?: string;
4747+ /** The Youtube link for the track, if available */
4848+ youtubeLink?: string;
4949+ /** The Deezer link for the track, if available */
5050+ deezerLink?: string;
5151+ /** The timestamp of the scrobble in milliseconds since epoch */
5252+ timestamp?: number;
5353+}
5454+5555+export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewBasic;
5656+5757+export interface HandlerInput {
5858+ encoding: "application/json";
5959+ body: InputSchema;
6060+}
6161+6262+export interface HandlerSuccess {
6363+ encoding: "application/json";
6464+ body: OutputSchema;
6565+ headers?: { [key: string]: string };
6666+}
6767+6868+export interface HandlerError {
6969+ status: number;
7070+ message?: string;
7171+}
7272+7373+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.scrobble.defs";
99+1010+export interface ScrobbleViewBasic {
1111+ $type?: "app.rocksky.scrobble.defs#scrobbleViewBasic";
1212+ /** The unique identifier of the scrobble. */
1313+ id?: string;
1414+ /** The handle of the user who created the scrobble. */
1515+ user?: string;
1616+ /** The display name of the user who created the scrobble. */
1717+ userDisplayName?: string;
1818+ /** The avatar URL of the user who created the scrobble. */
1919+ userAvatar?: string;
2020+ /** The title of the scrobble. */
2121+ title?: string;
2222+ /** The artist of the song. */
2323+ artist?: string;
2424+ /** The URI of the artist. */
2525+ artistUri?: string;
2626+ /** The album of the song. */
2727+ album?: string;
2828+ /** The URI of the album. */
2929+ albumUri?: string;
3030+ /** The album art URL of the song. */
3131+ cover?: string;
3232+ /** The timestamp when the scrobble was created. */
3333+ date?: string;
3434+ /** The URI of the scrobble. */
3535+ uri?: string;
3636+ /** The SHA256 hash of the scrobble data. */
3737+ sha256?: string;
3838+}
3939+4040+const hashScrobbleViewBasic = "scrobbleViewBasic";
4141+4242+export function isScrobbleViewBasic<V>(v: V) {
4343+ return is$typed(v, id, hashScrobbleViewBasic);
4444+}
4545+4646+export function validateScrobbleViewBasic<V>(v: V) {
4747+ return validate<ScrobbleViewBasic & V>(v, id, hashScrobbleViewBasic);
4848+}
4949+5050+export interface ScrobbleViewDetailed {
5151+ $type?: "app.rocksky.scrobble.defs#scrobbleViewDetailed";
5252+ /** The unique identifier of the scrobble. */
5353+ id?: string;
5454+ /** The handle of the user who created the scrobble. */
5555+ user?: string;
5656+ /** The title of the scrobble. */
5757+ title?: string;
5858+ /** The artist of the song. */
5959+ artist?: string;
6060+ /** The URI of the artist. */
6161+ artistUri?: string;
6262+ /** The album of the song. */
6363+ album?: string;
6464+ /** The URI of the album. */
6565+ albumUri?: string;
6666+ /** The album art URL of the song. */
6767+ cover?: string;
6868+ /** The timestamp when the scrobble was created. */
6969+ date?: string;
7070+ /** The URI of the scrobble. */
7171+ uri?: string;
7272+ /** The SHA256 hash of the scrobble data. */
7373+ sha256?: string;
7474+ /** The number of listeners */
7575+ listeners?: number;
7676+ /** The number of scrobbles for this song */
7777+ scrobbles?: number;
7878+}
7979+8080+const hashScrobbleViewDetailed = "scrobbleViewDetailed";
8181+8282+export function isScrobbleViewDetailed<V>(v: V) {
8383+ return is$typed(v, id, hashScrobbleViewDetailed);
8484+}
8585+8686+export function validateScrobbleViewDetailed<V>(v: V) {
8787+ return validate<ScrobbleViewDetailed & V>(v, id, hashScrobbleViewDetailed);
8888+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.shout.defs";
99+1010+export interface Author {
1111+ $type?: "app.rocksky.shout.defs#author";
1212+ /** The unique identifier of the author. */
1313+ id?: string;
1414+ /** The decentralized identifier (DID) of the author. */
1515+ did?: string;
1616+ /** The handle of the author. */
1717+ handle?: string;
1818+ /** The display name of the author. */
1919+ displayName?: string;
2020+ /** The URL of the author's avatar image. */
2121+ avatar?: string;
2222+}
2323+2424+const hashAuthor = "author";
2525+2626+export function isAuthor<V>(v: V) {
2727+ return is$typed(v, id, hashAuthor);
2828+}
2929+3030+export function validateAuthor<V>(v: V) {
3131+ return validate<Author & V>(v, id, hashAuthor);
3232+}
3333+3434+export interface ShoutView {
3535+ $type?: "app.rocksky.shout.defs#shoutView";
3636+ /** The unique identifier of the shout. */
3737+ id?: string;
3838+ /** The content of the shout. */
3939+ message?: string;
4040+ /** The ID of the parent shout if this is a reply, otherwise null. */
4141+ parent?: string;
4242+ /** The date and time when the shout was created. */
4343+ createdAt?: string;
4444+ author?: Author;
4545+}
4646+4747+const hashShoutView = "shoutView";
4848+4949+export function isShoutView<V>(v: V) {
5050+ return is$typed(v, id, hashShoutView);
5151+}
5252+5353+export function validateShoutView<V>(v: V) {
5454+ return validate<ShoutView & V>(v, id, hashShoutView);
5555+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyShoutDefs from "./defs.ts";
55+66+export type QueryParams = {
77+ /** The unique identifier of the album to retrieve shouts for */
88+ uri: string;
99+ /** The maximum number of shouts to return */
1010+ limit?: number;
1111+ /** The number of shouts to skip before starting to collect the result set */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ shouts?: (AppRockskyShoutDefs.ShoutViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyShoutDefs from "./defs.ts";
55+66+export type QueryParams = {
77+ /** The URI of the artist to retrieve shouts for */
88+ uri: string;
99+ /** The maximum number of shouts to return */
1010+ limit?: number;
1111+ /** The number of shouts to skip before starting to collect the result set */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ shouts?: (AppRockskyShoutDefs.ShoutViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyShoutDefs from "./defs.ts";
55+66+export type QueryParams = {
77+ /** The URI of the shout to retrieve replies for */
88+ uri: string;
99+ /** The maximum number of shouts to return */
1010+ limit?: number;
1111+ /** The number of shouts to skip before starting to collect the result set */
1212+ offset?: number;
1313+};
1414+export type InputSchema = undefined;
1515+1616+export interface OutputSchema {
1717+ shouts?: (AppRockskyShoutDefs.ShoutViewBasic)[];
1818+}
1919+2020+export type HandlerInput = void;
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyShoutDefs from "./defs.ts";
55+66+export type QueryParams = globalThis.Record<PropertyKey, never>;
77+88+export interface InputSchema {
99+ /** The unique identifier of the shout to report */
1010+ shoutId: string;
1111+ /** The reason for reporting the shout */
1212+ reason?: string;
1313+}
1414+1515+export type OutputSchema = AppRockskyShoutDefs.ShoutView;
1616+1717+export interface HandlerInput {
1818+ encoding: "application/json";
1919+ body: InputSchema;
2020+}
2121+2222+export interface HandlerSuccess {
2323+ encoding: "application/json";
2424+ body: OutputSchema;
2525+ headers?: { [key: string]: string };
2626+}
2727+2828+export interface HandlerError {
2929+ status: number;
3030+ message?: string;
3131+}
3232+3333+export type HandlerOutput = HandlerError | HandlerSuccess;
+77
apps/feeds/src/lex/types/app/rocksky/song.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type { BlobRef } from "@atp/lexicon";
55+import { validate as _validate } from "../../../lexicons.ts";
66+import { is$typed as _is$typed } from "../../../util.ts";
77+import type * as AppRockskyArtistDefs from "./artist/defs.ts";
88+99+const is$typed = _is$typed, validate = _validate;
1010+const id = "app.rocksky.song";
1111+1212+export interface Record {
1313+ $type: "app.rocksky.song";
1414+ /** The title of the song. */
1515+ title: string;
1616+ /** The artist of the song. */
1717+ artist: string;
1818+ /** The artists of the song with MusicBrainz IDs. */
1919+ artists?: (AppRockskyArtistDefs.ArtistMbid)[];
2020+ /** The album artist of the song. */
2121+ albumArtist: string;
2222+ /** The album of the song. */
2323+ album: string;
2424+ /** The duration of the song in seconds. */
2525+ duration: number;
2626+ /** The track number of the song in the album. */
2727+ trackNumber?: number;
2828+ /** The disc number of the song in the album. */
2929+ discNumber?: number;
3030+ /** The release date of the song. */
3131+ releaseDate?: string;
3232+ /** The year the song was released. */
3333+ year?: number;
3434+ /** The genre of the song. */
3535+ genre?: string;
3636+ /** The tags of the song. */
3737+ tags?: (string)[];
3838+ /** The composer of the song. */
3939+ composer?: string;
4040+ /** The lyrics of the song. */
4141+ lyrics?: string;
4242+ /** The copyright message of the song. */
4343+ copyrightMessage?: string;
4444+ /** Informations about the song */
4545+ wiki?: string;
4646+ /** The album art of the song. */
4747+ albumArt?: BlobRef;
4848+ /** The URL of the album art of the song. */
4949+ albumArtUrl?: string;
5050+ /** The YouTube link of the song. */
5151+ youtubeLink?: string;
5252+ /** The Spotify link of the song. */
5353+ spotifyLink?: string;
5454+ /** The Tidal link of the song. */
5555+ tidalLink?: string;
5656+ /** The Apple Music link of the song. */
5757+ appleMusicLink?: string;
5858+ /** The date when the song was created. */
5959+ createdAt: string;
6060+ /** The MusicBrainz ID of the song. */
6161+ mbid?: string;
6262+ /** The label of the song. */
6363+ label?: string;
6464+ [k: string]: unknown;
6565+}
6666+6767+const hashRecord = "main";
6868+6969+export function isRecord<V>(v: V) {
7070+ return is$typed(v, id, hashRecord);
7171+}
7272+7373+export function validateRecord<V>(v: V) {
7474+ return validate<Record & V>(v, id, hashRecord, true);
7575+}
7676+7777+export type Main = Record;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskySongDefs from "./defs.ts";
55+66+export type QueryParams = globalThis.Record<PropertyKey, never>;
77+88+export interface InputSchema {
99+ /** The title of the song */
1010+ title: string;
1111+ /** The artist of the song */
1212+ artist: string;
1313+ /** The album artist of the song, if different from the main artist */
1414+ albumArtist: string;
1515+ /** The album of the song, if applicable */
1616+ album: string;
1717+ /** The duration of the song in seconds */
1818+ duration?: number;
1919+ /** The MusicBrainz ID of the song, if available */
2020+ mbId?: string;
2121+ /** The URL of the album art for the song */
2222+ albumArt?: string;
2323+ /** The track number of the song in the album, if applicable */
2424+ trackNumber?: number;
2525+ /** The release date of the song, formatted as YYYY-MM-DD */
2626+ releaseDate?: string;
2727+ /** The year the song was released */
2828+ year?: number;
2929+ /** The disc number of the song in the album, if applicable */
3030+ discNumber?: number;
3131+ /** The lyrics of the song, if available */
3232+ lyrics?: string;
3333+}
3434+3535+export type OutputSchema = AppRockskySongDefs.SongViewDetailed;
3636+3737+export interface HandlerInput {
3838+ encoding: "application/json";
3939+ body: InputSchema;
4040+}
4141+4242+export interface HandlerSuccess {
4343+ encoding: "application/json";
4444+ body: OutputSchema;
4545+ headers?: { [key: string]: string };
4646+}
4747+4848+export interface HandlerError {
4949+ status: number;
5050+ message?: string;
5151+}
5252+5353+export type HandlerOutput = HandlerError | HandlerSuccess;
+100
apps/feeds/src/lex/types/app/rocksky/song/defs.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.song.defs";
99+1010+export interface SongViewBasic {
1111+ $type?: "app.rocksky.song.defs#songViewBasic";
1212+ /** The unique identifier of the song. */
1313+ id?: string;
1414+ /** The title of the song. */
1515+ title?: string;
1616+ /** The artist of the song. */
1717+ artist?: string;
1818+ /** The artist of the album the song belongs to. */
1919+ albumArtist?: string;
2020+ /** The URL of the album art image. */
2121+ albumArt?: string;
2222+ /** The URI of the song. */
2323+ uri?: string;
2424+ /** The album of the song. */
2525+ album?: string;
2626+ /** The duration of the song in milliseconds. */
2727+ duration?: number;
2828+ /** The track number of the song in the album. */
2929+ trackNumber?: number;
3030+ /** The disc number of the song in the album. */
3131+ discNumber?: number;
3232+ /** The number of times the song has been played. */
3333+ playCount?: number;
3434+ /** The number of unique listeners who have played the song. */
3535+ uniqueListeners?: number;
3636+ /** The URI of the album the song belongs to. */
3737+ albumUri?: string;
3838+ /** The URI of the artist of the song. */
3939+ artistUri?: string;
4040+ /** The SHA256 hash of the song. */
4141+ sha256?: string;
4242+ /** The timestamp when the song was created. */
4343+ createdAt?: string;
4444+}
4545+4646+const hashSongViewBasic = "songViewBasic";
4747+4848+export function isSongViewBasic<V>(v: V) {
4949+ return is$typed(v, id, hashSongViewBasic);
5050+}
5151+5252+export function validateSongViewBasic<V>(v: V) {
5353+ return validate<SongViewBasic & V>(v, id, hashSongViewBasic);
5454+}
5555+5656+export interface SongViewDetailed {
5757+ $type?: "app.rocksky.song.defs#songViewDetailed";
5858+ /** The unique identifier of the song. */
5959+ id?: string;
6060+ /** The title of the song. */
6161+ title?: string;
6262+ /** The artist of the song. */
6363+ artist?: string;
6464+ /** The artist of the album the song belongs to. */
6565+ albumArtist?: string;
6666+ /** The URL of the album art image. */
6767+ albumArt?: string;
6868+ /** The URI of the song. */
6969+ uri?: string;
7070+ /** The album of the song. */
7171+ album?: string;
7272+ /** The duration of the song in milliseconds. */
7373+ duration?: number;
7474+ /** The track number of the song in the album. */
7575+ trackNumber?: number;
7676+ /** The disc number of the song in the album. */
7777+ discNumber?: number;
7878+ /** The number of times the song has been played. */
7979+ playCount?: number;
8080+ /** The number of unique listeners who have played the song. */
8181+ uniqueListeners?: number;
8282+ /** The URI of the album the song belongs to. */
8383+ albumUri?: string;
8484+ /** The URI of the artist of the song. */
8585+ artistUri?: string;
8686+ /** The SHA256 hash of the song. */
8787+ sha256?: string;
8888+ /** The timestamp when the song was created. */
8989+ createdAt?: string;
9090+}
9191+9292+const hashSongViewDetailed = "songViewDetailed";
9393+9494+export function isSongViewDetailed<V>(v: V) {
9595+ return is$typed(v, id, hashSongViewDetailed);
9696+}
9797+9898+export function validateSongViewDetailed<V>(v: V) {
9999+ return validate<SongViewDetailed & V>(v, id, hashSongViewDetailed);
100100+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.spotify.defs";
99+1010+export interface SpotifyTrackView {
1111+ $type?: "app.rocksky.spotify.defs#spotifyTrackView";
1212+ /** The unique identifier of the Spotify track. */
1313+ id?: string;
1414+ /** The name of the track. */
1515+ name?: string;
1616+ /** The name of the artist. */
1717+ artist?: string;
1818+ /** The name of the album. */
1919+ album?: string;
2020+ /** The duration of the track in milliseconds. */
2121+ duration?: number;
2222+ /** A URL to a preview of the track. */
2323+ previewUrl?: string;
2424+}
2525+2626+const hashSpotifyTrackView = "spotifyTrackView";
2727+2828+export function isSpotifyTrackView<V>(v: V) {
2929+ return is$typed(v, id, hashSpotifyTrackView);
3030+}
3131+3232+export function validateSpotifyTrackView<V>(v: V) {
3333+ return validate<SpotifyTrackView & V>(v, id, hashSpotifyTrackView);
3434+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import type * as AppRockskyPlayerDefs from "../player/defs.ts";
55+66+export type QueryParams = {
77+ /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */
88+ actor?: string;
99+};
1010+export type InputSchema = undefined;
1111+export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed;
1212+export type HandlerInput = void;
1313+1414+export interface HandlerSuccess {
1515+ encoding: "application/json";
1616+ body: OutputSchema;
1717+ headers?: { [key: string]: string };
1818+}
1919+2020+export interface HandlerError {
2121+ status: number;
2222+ message?: string;
2323+}
2424+2525+export type HandlerOutput = HandlerError | HandlerSuccess;
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { validate as _validate } from "../../../../lexicons.ts";
55+import { is$typed as _is$typed } from "../../../../util.ts";
66+77+const is$typed = _is$typed, validate = _validate;
88+const id = "app.rocksky.stats.defs";
99+1010+export interface StatsView {
1111+ $type?: "app.rocksky.stats.defs#statsView";
1212+ /** The total number of scrobbles. */
1313+ scrobbles?: number;
1414+ /** The total number of unique artists scrobbled. */
1515+ artists?: number;
1616+ /** The total number of tracks marked as loved. */
1717+ lovedTracks?: number;
1818+ /** The total number of unique albums scrobbled. */
1919+ albums?: number;
2020+ /** The total number of unique tracks scrobbled. */
2121+ tracks?: number;
2222+}
2323+2424+const hashStatsView = "statsView";
2525+2626+export function isStatsView<V>(v: V) {
2727+ return is$typed(v, id, hashStatsView);
2828+}
2929+3030+export function validateStatsView<V>(v: V) {
3131+ return validate<StatsView & V>(v, id, hashStatsView);
3232+}