diff --git a/apps/cli/drizzle.config.ts b/apps/cli/drizzle.config.ts new file mode 100644 index 00000000..f476ba09 --- /dev/null +++ b/apps/cli/drizzle.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "drizzle-kit"; +import envpaths from "env-paths"; +import fs from "node:fs"; +import chalk from "chalk"; + +fs.mkdirSync(envpaths("rocksky", { suffix: "" }).data, { recursive: true }); +const url = `${envpaths("rocksky", { suffix: "" }).data}/rocksky.sqlite`; + +console.log(`Database URL: ${chalk.greenBright(url)}`); + +export default defineConfig({ + dialect: "sqlite", + schema: "./src/schema", + dbCredentials: { + url, + }, +}); diff --git a/apps/cli/drizzle/0000_amazing_redwing.sql b/apps/cli/drizzle/0000_amazing_redwing.sql new file mode 100644 index 00000000..673baa60 --- /dev/null +++ b/apps/cli/drizzle/0000_amazing_redwing.sql @@ -0,0 +1,159 @@ +CREATE TABLE `album_tracks` ( + `id` text PRIMARY KEY NOT NULL, + `album_id` text NOT NULL, + `track_id` text NOT NULL, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + FOREIGN KEY (`album_id`) REFERENCES `albums`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`track_id`) REFERENCES `tracks`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `albums` ( + `id` text PRIMARY KEY NOT NULL, + `title` text NOT NULL, + `artist` text NOT NULL, + `release_date` text, + `year` integer, + `album_art` text, + `uri` text, + `artist_uri` text, + `apple_music_link` text, + `spotify_link` text, + `tidal_link` text, + `youtube_link` text, + `sha256` text NOT NULL, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `albums_uri_unique` ON `albums` (`uri`);--> statement-breakpoint +CREATE UNIQUE INDEX `albums_apple_music_link_unique` ON `albums` (`apple_music_link`);--> statement-breakpoint +CREATE UNIQUE INDEX `albums_spotify_link_unique` ON `albums` (`spotify_link`);--> statement-breakpoint +CREATE UNIQUE INDEX `albums_tidal_link_unique` ON `albums` (`tidal_link`);--> statement-breakpoint +CREATE UNIQUE INDEX `albums_youtube_link_unique` ON `albums` (`youtube_link`);--> statement-breakpoint +CREATE UNIQUE INDEX `albums_sha256_unique` ON `albums` (`sha256`);--> statement-breakpoint +CREATE TABLE `artist_albums` ( + `id` text PRIMARY KEY NOT NULL, + `artist_id` text NOT NULL, + `album_id` text NOT NULL, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + FOREIGN KEY (`artist_id`) REFERENCES `artists`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`album_id`) REFERENCES `albums`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `artist_tracks` ( + `id` text PRIMARY KEY NOT NULL, + `artist_id` text NOT NULL, + `track_id` text NOT NULL, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + FOREIGN KEY (`artist_id`) REFERENCES `artists`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`track_id`) REFERENCES `tracks`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `artists` ( + `id` text PRIMARY KEY NOT NULL, + `name` text NOT NULL, + `biography` text, + `born` integer, + `born_in` text, + `died` integer, + `picture` text, + `sha256` text NOT NULL, + `uri` text, + `apple_music_link` text, + `spotify_link` text, + `tidal_link` text, + `youtube_link` text, + `genres` text, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `artists_sha256_unique` ON `artists` (`sha256`);--> statement-breakpoint +CREATE UNIQUE INDEX `artists_uri_unique` ON `artists` (`uri`);--> statement-breakpoint +CREATE TABLE `loved_tracks` ( + `id` text PRIMARY KEY NOT NULL, + `user_id` text NOT NULL, + `track_id` text NOT NULL, + `uri` text, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`track_id`) REFERENCES `tracks`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `loved_tracks_uri_unique` ON `loved_tracks` (`uri`);--> statement-breakpoint +CREATE TABLE `tracks` ( + `id` text PRIMARY KEY NOT NULL, + `title` text NOT NULL, + `artist` text NOT NULL, + `album_artist` text NOT NULL, + `album_art` text, + `album` text NOT NULL, + `track_number` integer, + `duration` integer NOT NULL, + `mb_id` text, + `youtube_link` text, + `spotify_link` text, + `apple_music_link` text, + `tidal_link` text, + `sha256` text NOT NULL, + `disc_number` integer, + `lyrics` text, + `composer` text, + `genre` text, + `label` text, + `copyright_message` text, + `uri` text, + `album_uri` text, + `artist_uri` text, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `tracks_mb_id_unique` ON `tracks` (`mb_id`);--> statement-breakpoint +CREATE UNIQUE INDEX `tracks_youtube_link_unique` ON `tracks` (`youtube_link`);--> statement-breakpoint +CREATE UNIQUE INDEX `tracks_spotify_link_unique` ON `tracks` (`spotify_link`);--> statement-breakpoint +CREATE UNIQUE INDEX `tracks_apple_music_link_unique` ON `tracks` (`apple_music_link`);--> statement-breakpoint +CREATE UNIQUE INDEX `tracks_tidal_link_unique` ON `tracks` (`tidal_link`);--> statement-breakpoint +CREATE UNIQUE INDEX `tracks_sha256_unique` ON `tracks` (`sha256`);--> statement-breakpoint +CREATE UNIQUE INDEX `tracks_uri_unique` ON `tracks` (`uri`);--> statement-breakpoint +CREATE TABLE `user_albums` ( + `id` text PRIMARY KEY NOT NULL, + `user_id` text NOT NULL, + `artist_id` text NOT NULL, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `scrobbles` integer, + `uri` text NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`artist_id`) REFERENCES `artists`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `user_albums_uri_unique` ON `user_albums` (`uri`);--> statement-breakpoint +CREATE TABLE `user_tracks` ( + `id` text PRIMARY KEY NOT NULL, + `user_id` text NOT NULL, + `track_id` text NOT NULL, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `scrobbles` integer, + `uri` text NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`track_id`) REFERENCES `tracks`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `user_tracks_uri_unique` ON `user_tracks` (`uri`);--> statement-breakpoint +CREATE TABLE `users` ( + `id` text PRIMARY KEY NOT NULL, + `did` text NOT NULL, + `display_name` text, + `handle` text NOT NULL, + `avatar` text NOT NULL, + `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL, + `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `users_did_unique` ON `users` (`did`);--> statement-breakpoint +CREATE UNIQUE INDEX `users_handle_unique` ON `users` (`handle`); \ No newline at end of file diff --git a/apps/cli/drizzle/meta/0000_snapshot.json b/apps/cli/drizzle/meta/0000_snapshot.json new file mode 100644 index 00000000..3dae2e64 --- /dev/null +++ b/apps/cli/drizzle/meta/0000_snapshot.json @@ -0,0 +1,1125 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "a549f070-9d4d-4d38-bd6a-c04bc9a4889b", + "prevId": "00000000-0000-0000-0000-000000000000", + "tables": { + "album_tracks": { + "name": "album_tracks", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "album_id": { + "name": "album_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "track_id": { + "name": "track_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "album_tracks_album_id_albums_id_fk": { + "name": "album_tracks_album_id_albums_id_fk", + "tableFrom": "album_tracks", + "tableTo": "albums", + "columnsFrom": [ + "album_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "album_tracks_track_id_tracks_id_fk": { + "name": "album_tracks_track_id_tracks_id_fk", + "tableFrom": "album_tracks", + "tableTo": "tracks", + "columnsFrom": [ + "track_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "albums": { + "name": "albums", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "artist": { + "name": "artist", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "release_date": { + "name": "release_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "year": { + "name": "year", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "album_art": { + "name": "album_art", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "artist_uri": { + "name": "artist_uri", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "apple_music_link": { + "name": "apple_music_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "spotify_link": { + "name": "spotify_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tidal_link": { + "name": "tidal_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "youtube_link": { + "name": "youtube_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "albums_uri_unique": { + "name": "albums_uri_unique", + "columns": [ + "uri" + ], + "isUnique": true + }, + "albums_apple_music_link_unique": { + "name": "albums_apple_music_link_unique", + "columns": [ + "apple_music_link" + ], + "isUnique": true + }, + "albums_spotify_link_unique": { + "name": "albums_spotify_link_unique", + "columns": [ + "spotify_link" + ], + "isUnique": true + }, + "albums_tidal_link_unique": { + "name": "albums_tidal_link_unique", + "columns": [ + "tidal_link" + ], + "isUnique": true + }, + "albums_youtube_link_unique": { + "name": "albums_youtube_link_unique", + "columns": [ + "youtube_link" + ], + "isUnique": true + }, + "albums_sha256_unique": { + "name": "albums_sha256_unique", + "columns": [ + "sha256" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "artist_albums": { + "name": "artist_albums", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "artist_id": { + "name": "artist_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "album_id": { + "name": "album_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "artist_albums_artist_id_artists_id_fk": { + "name": "artist_albums_artist_id_artists_id_fk", + "tableFrom": "artist_albums", + "tableTo": "artists", + "columnsFrom": [ + "artist_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "artist_albums_album_id_albums_id_fk": { + "name": "artist_albums_album_id_albums_id_fk", + "tableFrom": "artist_albums", + "tableTo": "albums", + "columnsFrom": [ + "album_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "artist_tracks": { + "name": "artist_tracks", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "artist_id": { + "name": "artist_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "track_id": { + "name": "track_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "artist_tracks_artist_id_artists_id_fk": { + "name": "artist_tracks_artist_id_artists_id_fk", + "tableFrom": "artist_tracks", + "tableTo": "artists", + "columnsFrom": [ + "artist_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "artist_tracks_track_id_tracks_id_fk": { + "name": "artist_tracks_track_id_tracks_id_fk", + "tableFrom": "artist_tracks", + "tableTo": "tracks", + "columnsFrom": [ + "track_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "artists": { + "name": "artists", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "biography": { + "name": "biography", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "born": { + "name": "born", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "born_in": { + "name": "born_in", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "died": { + "name": "died", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "picture": { + "name": "picture", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "apple_music_link": { + "name": "apple_music_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "spotify_link": { + "name": "spotify_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tidal_link": { + "name": "tidal_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "youtube_link": { + "name": "youtube_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "genres": { + "name": "genres", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "artists_sha256_unique": { + "name": "artists_sha256_unique", + "columns": [ + "sha256" + ], + "isUnique": true + }, + "artists_uri_unique": { + "name": "artists_uri_unique", + "columns": [ + "uri" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "loved_tracks": { + "name": "loved_tracks", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "track_id": { + "name": "track_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "loved_tracks_uri_unique": { + "name": "loved_tracks_uri_unique", + "columns": [ + "uri" + ], + "isUnique": true + } + }, + "foreignKeys": { + "loved_tracks_user_id_users_id_fk": { + "name": "loved_tracks_user_id_users_id_fk", + "tableFrom": "loved_tracks", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "loved_tracks_track_id_tracks_id_fk": { + "name": "loved_tracks_track_id_tracks_id_fk", + "tableFrom": "loved_tracks", + "tableTo": "tracks", + "columnsFrom": [ + "track_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "tracks": { + "name": "tracks", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "artist": { + "name": "artist", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "album_artist": { + "name": "album_artist", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "album_art": { + "name": "album_art", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "album": { + "name": "album", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "track_number": { + "name": "track_number", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "mb_id": { + "name": "mb_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "youtube_link": { + "name": "youtube_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "spotify_link": { + "name": "spotify_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "apple_music_link": { + "name": "apple_music_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tidal_link": { + "name": "tidal_link", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "disc_number": { + "name": "disc_number", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "lyrics": { + "name": "lyrics", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "composer": { + "name": "composer", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "genre": { + "name": "genre", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "copyright_message": { + "name": "copyright_message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "album_uri": { + "name": "album_uri", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "artist_uri": { + "name": "artist_uri", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "tracks_mb_id_unique": { + "name": "tracks_mb_id_unique", + "columns": [ + "mb_id" + ], + "isUnique": true + }, + "tracks_youtube_link_unique": { + "name": "tracks_youtube_link_unique", + "columns": [ + "youtube_link" + ], + "isUnique": true + }, + "tracks_spotify_link_unique": { + "name": "tracks_spotify_link_unique", + "columns": [ + "spotify_link" + ], + "isUnique": true + }, + "tracks_apple_music_link_unique": { + "name": "tracks_apple_music_link_unique", + "columns": [ + "apple_music_link" + ], + "isUnique": true + }, + "tracks_tidal_link_unique": { + "name": "tracks_tidal_link_unique", + "columns": [ + "tidal_link" + ], + "isUnique": true + }, + "tracks_sha256_unique": { + "name": "tracks_sha256_unique", + "columns": [ + "sha256" + ], + "isUnique": true + }, + "tracks_uri_unique": { + "name": "tracks_uri_unique", + "columns": [ + "uri" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_albums": { + "name": "user_albums", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "artist_id": { + "name": "artist_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "scrobbles": { + "name": "scrobbles", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "user_albums_uri_unique": { + "name": "user_albums_uri_unique", + "columns": [ + "uri" + ], + "isUnique": true + } + }, + "foreignKeys": { + "user_albums_user_id_users_id_fk": { + "name": "user_albums_user_id_users_id_fk", + "tableFrom": "user_albums", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "user_albums_artist_id_artists_id_fk": { + "name": "user_albums_artist_id_artists_id_fk", + "tableFrom": "user_albums", + "tableTo": "artists", + "columnsFrom": [ + "artist_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_tracks": { + "name": "user_tracks", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "track_id": { + "name": "track_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "scrobbles": { + "name": "scrobbles", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "user_tracks_uri_unique": { + "name": "user_tracks_uri_unique", + "columns": [ + "uri" + ], + "isUnique": true + } + }, + "foreignKeys": { + "user_tracks_user_id_users_id_fk": { + "name": "user_tracks_user_id_users_id_fk", + "tableFrom": "user_tracks", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "user_tracks_track_id_tracks_id_fk": { + "name": "user_tracks_track_id_tracks_id_fk", + "tableFrom": "user_tracks", + "tableTo": "tracks", + "columnsFrom": [ + "track_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users": { + "name": "users", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "handle": { + "name": "handle", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "avatar": { + "name": "avatar", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "users_did_unique": { + "name": "users_did_unique", + "columns": [ + "did" + ], + "isUnique": true + }, + "users_handle_unique": { + "name": "users_handle_unique", + "columns": [ + "handle" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/apps/cli/drizzle/meta/_journal.json b/apps/cli/drizzle/meta/_journal.json new file mode 100644 index 00000000..56e1195f --- /dev/null +++ b/apps/cli/drizzle/meta/_journal.json @@ -0,0 +1,13 @@ +{ + "version": "7", + "dialect": "sqlite", + "entries": [ + { + "idx": 0, + "version": "6", + "when": 1767904137315, + "tag": "0000_amazing_redwing", + "breakpoints": true + } + ] +} \ No newline at end of file diff --git a/apps/cli/lexicons b/apps/cli/lexicons new file mode 120000 index 00000000..4c1273b0 --- /dev/null +++ b/apps/cli/lexicons @@ -0,0 +1 @@ +../api/lexicons \ No newline at end of file diff --git a/apps/cli/package.json b/apps/cli/package.json index 08ace4e9..0901b318 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -8,6 +8,7 @@ "rocksky": "./dist/index.js" }, "scripts": { + "lexgen": "lex gen-server ./src/lexicon ./lexicons/**/* ./lexicons/*", "test": "echo \"Error: no test specified\" && exit 1", "dev": "tsx ./src/index.ts", "build": "pkgroll && chmod +x ./dist/index.js" @@ -22,12 +23,28 @@ "author": "Tsiry Sandratraina ", "license": "Apache-2.0", "dependencies": { + "@atcute/jetstream": "^1.1.2", + "@atproto/api": "^0.13.31", + "@atproto/common": "^0.4.6", + "@atproto/identity": "^0.4.5", + "@atproto/jwk-jose": "0.1.5", + "@atproto/lex-cli": "^0.5.6", + "@atproto/lexicon": "^0.4.5", + "@atproto/sync": "^0.1.11", + "@atproto/syntax": "^0.3.1", "@modelcontextprotocol/sdk": "^1.10.2", + "@paralleldrive/cuid2": "^3.0.6", + "@types/better-sqlite3": "^7.6.13", "axios": "^1.8.4", + "better-sqlite3": "^12.4.1", "chalk": "^5.4.1", "commander": "^13.1.0", "cors": "^2.8.5", "dayjs": "^1.11.13", + "drizzle-kit": "^0.31.1", + "drizzle-orm": "^0.45.1", + "effect": "^3.19.14", + "env-paths": "^3.0.0", "express": "^5.1.0", "md5": "^2.3.0", "open": "^10.1.0", @@ -46,4 +63,4 @@ "import": "./dist/index.js" } } -} \ No newline at end of file +} diff --git a/apps/cli/src/context.ts b/apps/cli/src/context.ts new file mode 100644 index 00000000..4b2dc316 --- /dev/null +++ b/apps/cli/src/context.ts @@ -0,0 +1,5 @@ +import drizzle from "./drizzle"; + +export const context = { + db: drizzle.db, +}; diff --git a/apps/cli/src/drizzle.ts b/apps/cli/src/drizzle.ts new file mode 100644 index 00000000..c6dc17da --- /dev/null +++ b/apps/cli/src/drizzle.ts @@ -0,0 +1,10 @@ +import { drizzle } from "drizzle-orm/better-sqlite3"; +import envpaths from "env-paths"; +import fs from "node:fs"; + +fs.mkdirSync(envpaths("rocksky", { suffix: "" }).data, { recursive: true }); +const url = `${envpaths("rocksky", { suffix: "" }).data}/rocksky.sqlite`; + +const db = drizzle(url); + +export default { db }; diff --git a/apps/cli/src/jetstream.ts b/apps/cli/src/jetstream.ts new file mode 100644 index 00000000..e69de29b diff --git a/apps/cli/src/lexicon/index.ts b/apps/cli/src/lexicon/index.ts new file mode 100644 index 00000000..0e8dceef --- /dev/null +++ b/apps/cli/src/lexicon/index.ts @@ -0,0 +1,1321 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { + createServer as createXrpcServer, + Server as XrpcServer, + Options as XrpcOptions, + AuthVerifier, + StreamAuthVerifier, +} from '@atproto/xrpc-server' +import { schemas } from './lexicons' +import * as AppRockskyActorGetActorAlbums from './types/app/rocksky/actor/getActorAlbums' +import * as AppRockskyActorGetActorArtists from './types/app/rocksky/actor/getActorArtists' +import * as AppRockskyActorGetActorCompatibility from './types/app/rocksky/actor/getActorCompatibility' +import * as AppRockskyActorGetActorLovedSongs from './types/app/rocksky/actor/getActorLovedSongs' +import * as AppRockskyActorGetActorNeighbours from './types/app/rocksky/actor/getActorNeighbours' +import * as AppRockskyActorGetActorPlaylists from './types/app/rocksky/actor/getActorPlaylists' +import * as AppRockskyActorGetActorScrobbles from './types/app/rocksky/actor/getActorScrobbles' +import * as AppRockskyActorGetActorSongs from './types/app/rocksky/actor/getActorSongs' +import * as AppRockskyActorGetProfile from './types/app/rocksky/actor/getProfile' +import * as AppRockskyAlbumGetAlbum from './types/app/rocksky/album/getAlbum' +import * as AppRockskyAlbumGetAlbums from './types/app/rocksky/album/getAlbums' +import * as AppRockskyAlbumGetAlbumTracks from './types/app/rocksky/album/getAlbumTracks' +import * as AppRockskyApikeyCreateApikey from './types/app/rocksky/apikey/createApikey' +import * as AppRockskyApikeyGetApikeys from './types/app/rocksky/apikey/getApikeys' +import * as AppRockskyApikeyRemoveApikey from './types/app/rocksky/apikey/removeApikey' +import * as AppRockskyApikeyUpdateApikey from './types/app/rocksky/apikey/updateApikey' +import * as AppRockskyArtistGetArtist from './types/app/rocksky/artist/getArtist' +import * as AppRockskyArtistGetArtistAlbums from './types/app/rocksky/artist/getArtistAlbums' +import * as AppRockskyArtistGetArtistListeners from './types/app/rocksky/artist/getArtistListeners' +import * as AppRockskyArtistGetArtists from './types/app/rocksky/artist/getArtists' +import * as AppRockskyArtistGetArtistTracks from './types/app/rocksky/artist/getArtistTracks' +import * as AppRockskyChartsGetScrobblesChart from './types/app/rocksky/charts/getScrobblesChart' +import * as AppRockskyDropboxDownloadFile from './types/app/rocksky/dropbox/downloadFile' +import * as AppRockskyDropboxGetFiles from './types/app/rocksky/dropbox/getFiles' +import * as AppRockskyDropboxGetMetadata from './types/app/rocksky/dropbox/getMetadata' +import * as AppRockskyDropboxGetTemporaryLink from './types/app/rocksky/dropbox/getTemporaryLink' +import * as AppRockskyFeedDescribeFeedGenerator from './types/app/rocksky/feed/describeFeedGenerator' +import * as AppRockskyFeedGetFeed from './types/app/rocksky/feed/getFeed' +import * as AppRockskyFeedGetFeedGenerator from './types/app/rocksky/feed/getFeedGenerator' +import * as AppRockskyFeedGetFeedGenerators from './types/app/rocksky/feed/getFeedGenerators' +import * as AppRockskyFeedGetFeedSkeleton from './types/app/rocksky/feed/getFeedSkeleton' +import * as AppRockskyFeedGetNowPlayings from './types/app/rocksky/feed/getNowPlayings' +import * as AppRockskyFeedSearch from './types/app/rocksky/feed/search' +import * as AppRockskyGoogledriveDownloadFile from './types/app/rocksky/googledrive/downloadFile' +import * as AppRockskyGoogledriveGetFile from './types/app/rocksky/googledrive/getFile' +import * as AppRockskyGoogledriveGetFiles from './types/app/rocksky/googledrive/getFiles' +import * as AppRockskyGraphFollowAccount from './types/app/rocksky/graph/followAccount' +import * as AppRockskyGraphGetFollowers from './types/app/rocksky/graph/getFollowers' +import * as AppRockskyGraphGetFollows from './types/app/rocksky/graph/getFollows' +import * as AppRockskyGraphGetKnownFollowers from './types/app/rocksky/graph/getKnownFollowers' +import * as AppRockskyGraphUnfollowAccount from './types/app/rocksky/graph/unfollowAccount' +import * as AppRockskyLikeDislikeShout from './types/app/rocksky/like/dislikeShout' +import * as AppRockskyLikeDislikeSong from './types/app/rocksky/like/dislikeSong' +import * as AppRockskyLikeLikeShout from './types/app/rocksky/like/likeShout' +import * as AppRockskyLikeLikeSong from './types/app/rocksky/like/likeSong' +import * as AppRockskyPlayerAddDirectoryToQueue from './types/app/rocksky/player/addDirectoryToQueue' +import * as AppRockskyPlayerAddItemsToQueue from './types/app/rocksky/player/addItemsToQueue' +import * as AppRockskyPlayerGetCurrentlyPlaying from './types/app/rocksky/player/getCurrentlyPlaying' +import * as AppRockskyPlayerGetPlaybackQueue from './types/app/rocksky/player/getPlaybackQueue' +import * as AppRockskyPlayerNext from './types/app/rocksky/player/next' +import * as AppRockskyPlayerPause from './types/app/rocksky/player/pause' +import * as AppRockskyPlayerPlay from './types/app/rocksky/player/play' +import * as AppRockskyPlayerPlayDirectory from './types/app/rocksky/player/playDirectory' +import * as AppRockskyPlayerPlayFile from './types/app/rocksky/player/playFile' +import * as AppRockskyPlayerPrevious from './types/app/rocksky/player/previous' +import * as AppRockskyPlayerSeek from './types/app/rocksky/player/seek' +import * as AppRockskyPlaylistCreatePlaylist from './types/app/rocksky/playlist/createPlaylist' +import * as AppRockskyPlaylistGetPlaylist from './types/app/rocksky/playlist/getPlaylist' +import * as AppRockskyPlaylistGetPlaylists from './types/app/rocksky/playlist/getPlaylists' +import * as AppRockskyPlaylistInsertDirectory from './types/app/rocksky/playlist/insertDirectory' +import * as AppRockskyPlaylistInsertFiles from './types/app/rocksky/playlist/insertFiles' +import * as AppRockskyPlaylistRemovePlaylist from './types/app/rocksky/playlist/removePlaylist' +import * as AppRockskyPlaylistRemoveTrack from './types/app/rocksky/playlist/removeTrack' +import * as AppRockskyPlaylistStartPlaylist from './types/app/rocksky/playlist/startPlaylist' +import * as AppRockskyScrobbleCreateScrobble from './types/app/rocksky/scrobble/createScrobble' +import * as AppRockskyScrobbleGetScrobble from './types/app/rocksky/scrobble/getScrobble' +import * as AppRockskyScrobbleGetScrobbles from './types/app/rocksky/scrobble/getScrobbles' +import * as AppRockskyShoutCreateShout from './types/app/rocksky/shout/createShout' +import * as AppRockskyShoutGetAlbumShouts from './types/app/rocksky/shout/getAlbumShouts' +import * as AppRockskyShoutGetArtistShouts from './types/app/rocksky/shout/getArtistShouts' +import * as AppRockskyShoutGetProfileShouts from './types/app/rocksky/shout/getProfileShouts' +import * as AppRockskyShoutGetShoutReplies from './types/app/rocksky/shout/getShoutReplies' +import * as AppRockskyShoutGetTrackShouts from './types/app/rocksky/shout/getTrackShouts' +import * as AppRockskyShoutRemoveShout from './types/app/rocksky/shout/removeShout' +import * as AppRockskyShoutReplyShout from './types/app/rocksky/shout/replyShout' +import * as AppRockskyShoutReportShout from './types/app/rocksky/shout/reportShout' +import * as AppRockskySongCreateSong from './types/app/rocksky/song/createSong' +import * as AppRockskySongGetSong from './types/app/rocksky/song/getSong' +import * as AppRockskySongGetSongs from './types/app/rocksky/song/getSongs' +import * as AppRockskySpotifyGetCurrentlyPlaying from './types/app/rocksky/spotify/getCurrentlyPlaying' +import * as AppRockskySpotifyNext from './types/app/rocksky/spotify/next' +import * as AppRockskySpotifyPause from './types/app/rocksky/spotify/pause' +import * as AppRockskySpotifyPlay from './types/app/rocksky/spotify/play' +import * as AppRockskySpotifyPrevious from './types/app/rocksky/spotify/previous' +import * as AppRockskySpotifySeek from './types/app/rocksky/spotify/seek' +import * as AppRockskyStatsGetStats from './types/app/rocksky/stats/getStats' + +export function createServer(options?: XrpcOptions): Server { + return new Server(options) +} + +export class Server { + xrpc: XrpcServer + app: AppNS + com: ComNS + + constructor(options?: XrpcOptions) { + this.xrpc = createXrpcServer(schemas, options) + this.app = new AppNS(this) + this.com = new ComNS(this) + } +} + +export class AppNS { + _server: Server + rocksky: AppRockskyNS + bsky: AppBskyNS + + constructor(server: Server) { + this._server = server + this.rocksky = new AppRockskyNS(server) + this.bsky = new AppBskyNS(server) + } +} + +export class AppRockskyNS { + _server: Server + actor: AppRockskyActorNS + album: AppRockskyAlbumNS + apikey: AppRockskyApikeyNS + artist: AppRockskyArtistNS + charts: AppRockskyChartsNS + dropbox: AppRockskyDropboxNS + feed: AppRockskyFeedNS + googledrive: AppRockskyGoogledriveNS + graph: AppRockskyGraphNS + like: AppRockskyLikeNS + player: AppRockskyPlayerNS + playlist: AppRockskyPlaylistNS + scrobble: AppRockskyScrobbleNS + shout: AppRockskyShoutNS + song: AppRockskySongNS + spotify: AppRockskySpotifyNS + stats: AppRockskyStatsNS + + constructor(server: Server) { + this._server = server + this.actor = new AppRockskyActorNS(server) + this.album = new AppRockskyAlbumNS(server) + this.apikey = new AppRockskyApikeyNS(server) + this.artist = new AppRockskyArtistNS(server) + this.charts = new AppRockskyChartsNS(server) + this.dropbox = new AppRockskyDropboxNS(server) + this.feed = new AppRockskyFeedNS(server) + this.googledrive = new AppRockskyGoogledriveNS(server) + this.graph = new AppRockskyGraphNS(server) + this.like = new AppRockskyLikeNS(server) + this.player = new AppRockskyPlayerNS(server) + this.playlist = new AppRockskyPlaylistNS(server) + this.scrobble = new AppRockskyScrobbleNS(server) + this.shout = new AppRockskyShoutNS(server) + this.song = new AppRockskySongNS(server) + this.spotify = new AppRockskySpotifyNS(server) + this.stats = new AppRockskyStatsNS(server) + } +} + +export class AppRockskyActorNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getActorAlbums( + cfg: ConfigOf< + AV, + AppRockskyActorGetActorAlbums.Handler>, + AppRockskyActorGetActorAlbums.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getActorAlbums' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getActorArtists( + cfg: ConfigOf< + AV, + AppRockskyActorGetActorArtists.Handler>, + AppRockskyActorGetActorArtists.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getActorArtists' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getActorCompatibility( + cfg: ConfigOf< + AV, + AppRockskyActorGetActorCompatibility.Handler>, + AppRockskyActorGetActorCompatibility.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getActorCompatibility' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getActorLovedSongs( + cfg: ConfigOf< + AV, + AppRockskyActorGetActorLovedSongs.Handler>, + AppRockskyActorGetActorLovedSongs.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getActorLovedSongs' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getActorNeighbours( + cfg: ConfigOf< + AV, + AppRockskyActorGetActorNeighbours.Handler>, + AppRockskyActorGetActorNeighbours.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getActorNeighbours' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getActorPlaylists( + cfg: ConfigOf< + AV, + AppRockskyActorGetActorPlaylists.Handler>, + AppRockskyActorGetActorPlaylists.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getActorPlaylists' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getActorScrobbles( + cfg: ConfigOf< + AV, + AppRockskyActorGetActorScrobbles.Handler>, + AppRockskyActorGetActorScrobbles.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getActorScrobbles' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getActorSongs( + cfg: ConfigOf< + AV, + AppRockskyActorGetActorSongs.Handler>, + AppRockskyActorGetActorSongs.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getActorSongs' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getProfile( + cfg: ConfigOf< + AV, + AppRockskyActorGetProfile.Handler>, + AppRockskyActorGetProfile.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.actor.getProfile' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyAlbumNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getAlbum( + cfg: ConfigOf< + AV, + AppRockskyAlbumGetAlbum.Handler>, + AppRockskyAlbumGetAlbum.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.album.getAlbum' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getAlbums( + cfg: ConfigOf< + AV, + AppRockskyAlbumGetAlbums.Handler>, + AppRockskyAlbumGetAlbums.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.album.getAlbums' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getAlbumTracks( + cfg: ConfigOf< + AV, + AppRockskyAlbumGetAlbumTracks.Handler>, + AppRockskyAlbumGetAlbumTracks.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.album.getAlbumTracks' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyApikeyNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + createApikey( + cfg: ConfigOf< + AV, + AppRockskyApikeyCreateApikey.Handler>, + AppRockskyApikeyCreateApikey.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.apikey.createApikey' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getApikeys( + cfg: ConfigOf< + AV, + AppRockskyApikeyGetApikeys.Handler>, + AppRockskyApikeyGetApikeys.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.apikey.getApikeys' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + removeApikey( + cfg: ConfigOf< + AV, + AppRockskyApikeyRemoveApikey.Handler>, + AppRockskyApikeyRemoveApikey.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.apikey.removeApikey' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + updateApikey( + cfg: ConfigOf< + AV, + AppRockskyApikeyUpdateApikey.Handler>, + AppRockskyApikeyUpdateApikey.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.apikey.updateApikey' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyArtistNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getArtist( + cfg: ConfigOf< + AV, + AppRockskyArtistGetArtist.Handler>, + AppRockskyArtistGetArtist.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.artist.getArtist' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getArtistAlbums( + cfg: ConfigOf< + AV, + AppRockskyArtistGetArtistAlbums.Handler>, + AppRockskyArtistGetArtistAlbums.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.artist.getArtistAlbums' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getArtistListeners( + cfg: ConfigOf< + AV, + AppRockskyArtistGetArtistListeners.Handler>, + AppRockskyArtistGetArtistListeners.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.artist.getArtistListeners' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getArtists( + cfg: ConfigOf< + AV, + AppRockskyArtistGetArtists.Handler>, + AppRockskyArtistGetArtists.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.artist.getArtists' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getArtistTracks( + cfg: ConfigOf< + AV, + AppRockskyArtistGetArtistTracks.Handler>, + AppRockskyArtistGetArtistTracks.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.artist.getArtistTracks' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyChartsNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getScrobblesChart( + cfg: ConfigOf< + AV, + AppRockskyChartsGetScrobblesChart.Handler>, + AppRockskyChartsGetScrobblesChart.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.charts.getScrobblesChart' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyDropboxNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + downloadFile( + cfg: ConfigOf< + AV, + AppRockskyDropboxDownloadFile.Handler>, + AppRockskyDropboxDownloadFile.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.dropbox.downloadFile' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFiles( + cfg: ConfigOf< + AV, + AppRockskyDropboxGetFiles.Handler>, + AppRockskyDropboxGetFiles.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.dropbox.getFiles' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getMetadata( + cfg: ConfigOf< + AV, + AppRockskyDropboxGetMetadata.Handler>, + AppRockskyDropboxGetMetadata.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.dropbox.getMetadata' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getTemporaryLink( + cfg: ConfigOf< + AV, + AppRockskyDropboxGetTemporaryLink.Handler>, + AppRockskyDropboxGetTemporaryLink.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.dropbox.getTemporaryLink' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyFeedNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + describeFeedGenerator( + cfg: ConfigOf< + AV, + AppRockskyFeedDescribeFeedGenerator.Handler>, + AppRockskyFeedDescribeFeedGenerator.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.feed.describeFeedGenerator' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFeed( + cfg: ConfigOf< + AV, + AppRockskyFeedGetFeed.Handler>, + AppRockskyFeedGetFeed.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.feed.getFeed' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFeedGenerator( + cfg: ConfigOf< + AV, + AppRockskyFeedGetFeedGenerator.Handler>, + AppRockskyFeedGetFeedGenerator.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.feed.getFeedGenerator' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFeedGenerators( + cfg: ConfigOf< + AV, + AppRockskyFeedGetFeedGenerators.Handler>, + AppRockskyFeedGetFeedGenerators.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.feed.getFeedGenerators' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFeedSkeleton( + cfg: ConfigOf< + AV, + AppRockskyFeedGetFeedSkeleton.Handler>, + AppRockskyFeedGetFeedSkeleton.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.feed.getFeedSkeleton' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getNowPlayings( + cfg: ConfigOf< + AV, + AppRockskyFeedGetNowPlayings.Handler>, + AppRockskyFeedGetNowPlayings.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.feed.getNowPlayings' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + search( + cfg: ConfigOf< + AV, + AppRockskyFeedSearch.Handler>, + AppRockskyFeedSearch.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.feed.search' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyGoogledriveNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + downloadFile( + cfg: ConfigOf< + AV, + AppRockskyGoogledriveDownloadFile.Handler>, + AppRockskyGoogledriveDownloadFile.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.googledrive.downloadFile' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFile( + cfg: ConfigOf< + AV, + AppRockskyGoogledriveGetFile.Handler>, + AppRockskyGoogledriveGetFile.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.googledrive.getFile' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFiles( + cfg: ConfigOf< + AV, + AppRockskyGoogledriveGetFiles.Handler>, + AppRockskyGoogledriveGetFiles.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.googledrive.getFiles' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyGraphNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + followAccount( + cfg: ConfigOf< + AV, + AppRockskyGraphFollowAccount.Handler>, + AppRockskyGraphFollowAccount.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.graph.followAccount' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFollowers( + cfg: ConfigOf< + AV, + AppRockskyGraphGetFollowers.Handler>, + AppRockskyGraphGetFollowers.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.graph.getFollowers' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getFollows( + cfg: ConfigOf< + AV, + AppRockskyGraphGetFollows.Handler>, + AppRockskyGraphGetFollows.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.graph.getFollows' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getKnownFollowers( + cfg: ConfigOf< + AV, + AppRockskyGraphGetKnownFollowers.Handler>, + AppRockskyGraphGetKnownFollowers.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.graph.getKnownFollowers' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + unfollowAccount( + cfg: ConfigOf< + AV, + AppRockskyGraphUnfollowAccount.Handler>, + AppRockskyGraphUnfollowAccount.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.graph.unfollowAccount' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyLikeNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + dislikeShout( + cfg: ConfigOf< + AV, + AppRockskyLikeDislikeShout.Handler>, + AppRockskyLikeDislikeShout.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.like.dislikeShout' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + dislikeSong( + cfg: ConfigOf< + AV, + AppRockskyLikeDislikeSong.Handler>, + AppRockskyLikeDislikeSong.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.like.dislikeSong' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + likeShout( + cfg: ConfigOf< + AV, + AppRockskyLikeLikeShout.Handler>, + AppRockskyLikeLikeShout.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.like.likeShout' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + likeSong( + cfg: ConfigOf< + AV, + AppRockskyLikeLikeSong.Handler>, + AppRockskyLikeLikeSong.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.like.likeSong' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyPlayerNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + addDirectoryToQueue( + cfg: ConfigOf< + AV, + AppRockskyPlayerAddDirectoryToQueue.Handler>, + AppRockskyPlayerAddDirectoryToQueue.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.addDirectoryToQueue' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + addItemsToQueue( + cfg: ConfigOf< + AV, + AppRockskyPlayerAddItemsToQueue.Handler>, + AppRockskyPlayerAddItemsToQueue.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.addItemsToQueue' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getCurrentlyPlaying( + cfg: ConfigOf< + AV, + AppRockskyPlayerGetCurrentlyPlaying.Handler>, + AppRockskyPlayerGetCurrentlyPlaying.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.getCurrentlyPlaying' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getPlaybackQueue( + cfg: ConfigOf< + AV, + AppRockskyPlayerGetPlaybackQueue.Handler>, + AppRockskyPlayerGetPlaybackQueue.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.getPlaybackQueue' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + next( + cfg: ConfigOf< + AV, + AppRockskyPlayerNext.Handler>, + AppRockskyPlayerNext.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.next' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + pause( + cfg: ConfigOf< + AV, + AppRockskyPlayerPause.Handler>, + AppRockskyPlayerPause.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.pause' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + play( + cfg: ConfigOf< + AV, + AppRockskyPlayerPlay.Handler>, + AppRockskyPlayerPlay.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.play' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + playDirectory( + cfg: ConfigOf< + AV, + AppRockskyPlayerPlayDirectory.Handler>, + AppRockskyPlayerPlayDirectory.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.playDirectory' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + playFile( + cfg: ConfigOf< + AV, + AppRockskyPlayerPlayFile.Handler>, + AppRockskyPlayerPlayFile.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.playFile' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + previous( + cfg: ConfigOf< + AV, + AppRockskyPlayerPrevious.Handler>, + AppRockskyPlayerPrevious.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.previous' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + seek( + cfg: ConfigOf< + AV, + AppRockskyPlayerSeek.Handler>, + AppRockskyPlayerSeek.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.player.seek' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyPlaylistNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + createPlaylist( + cfg: ConfigOf< + AV, + AppRockskyPlaylistCreatePlaylist.Handler>, + AppRockskyPlaylistCreatePlaylist.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.playlist.createPlaylist' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getPlaylist( + cfg: ConfigOf< + AV, + AppRockskyPlaylistGetPlaylist.Handler>, + AppRockskyPlaylistGetPlaylist.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.playlist.getPlaylist' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getPlaylists( + cfg: ConfigOf< + AV, + AppRockskyPlaylistGetPlaylists.Handler>, + AppRockskyPlaylistGetPlaylists.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.playlist.getPlaylists' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + insertDirectory( + cfg: ConfigOf< + AV, + AppRockskyPlaylistInsertDirectory.Handler>, + AppRockskyPlaylistInsertDirectory.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.playlist.insertDirectory' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + insertFiles( + cfg: ConfigOf< + AV, + AppRockskyPlaylistInsertFiles.Handler>, + AppRockskyPlaylistInsertFiles.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.playlist.insertFiles' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + removePlaylist( + cfg: ConfigOf< + AV, + AppRockskyPlaylistRemovePlaylist.Handler>, + AppRockskyPlaylistRemovePlaylist.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.playlist.removePlaylist' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + removeTrack( + cfg: ConfigOf< + AV, + AppRockskyPlaylistRemoveTrack.Handler>, + AppRockskyPlaylistRemoveTrack.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.playlist.removeTrack' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + startPlaylist( + cfg: ConfigOf< + AV, + AppRockskyPlaylistStartPlaylist.Handler>, + AppRockskyPlaylistStartPlaylist.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.playlist.startPlaylist' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyScrobbleNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + createScrobble( + cfg: ConfigOf< + AV, + AppRockskyScrobbleCreateScrobble.Handler>, + AppRockskyScrobbleCreateScrobble.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.scrobble.createScrobble' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getScrobble( + cfg: ConfigOf< + AV, + AppRockskyScrobbleGetScrobble.Handler>, + AppRockskyScrobbleGetScrobble.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.scrobble.getScrobble' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getScrobbles( + cfg: ConfigOf< + AV, + AppRockskyScrobbleGetScrobbles.Handler>, + AppRockskyScrobbleGetScrobbles.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.scrobble.getScrobbles' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyShoutNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + createShout( + cfg: ConfigOf< + AV, + AppRockskyShoutCreateShout.Handler>, + AppRockskyShoutCreateShout.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.createShout' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getAlbumShouts( + cfg: ConfigOf< + AV, + AppRockskyShoutGetAlbumShouts.Handler>, + AppRockskyShoutGetAlbumShouts.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.getAlbumShouts' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getArtistShouts( + cfg: ConfigOf< + AV, + AppRockskyShoutGetArtistShouts.Handler>, + AppRockskyShoutGetArtistShouts.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.getArtistShouts' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getProfileShouts( + cfg: ConfigOf< + AV, + AppRockskyShoutGetProfileShouts.Handler>, + AppRockskyShoutGetProfileShouts.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.getProfileShouts' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getShoutReplies( + cfg: ConfigOf< + AV, + AppRockskyShoutGetShoutReplies.Handler>, + AppRockskyShoutGetShoutReplies.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.getShoutReplies' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getTrackShouts( + cfg: ConfigOf< + AV, + AppRockskyShoutGetTrackShouts.Handler>, + AppRockskyShoutGetTrackShouts.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.getTrackShouts' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + removeShout( + cfg: ConfigOf< + AV, + AppRockskyShoutRemoveShout.Handler>, + AppRockskyShoutRemoveShout.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.removeShout' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + replyShout( + cfg: ConfigOf< + AV, + AppRockskyShoutReplyShout.Handler>, + AppRockskyShoutReplyShout.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.replyShout' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + reportShout( + cfg: ConfigOf< + AV, + AppRockskyShoutReportShout.Handler>, + AppRockskyShoutReportShout.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.shout.reportShout' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskySongNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + createSong( + cfg: ConfigOf< + AV, + AppRockskySongCreateSong.Handler>, + AppRockskySongCreateSong.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.song.createSong' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getSong( + cfg: ConfigOf< + AV, + AppRockskySongGetSong.Handler>, + AppRockskySongGetSong.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.song.getSong' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + getSongs( + cfg: ConfigOf< + AV, + AppRockskySongGetSongs.Handler>, + AppRockskySongGetSongs.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.song.getSongs' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskySpotifyNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getCurrentlyPlaying( + cfg: ConfigOf< + AV, + AppRockskySpotifyGetCurrentlyPlaying.Handler>, + AppRockskySpotifyGetCurrentlyPlaying.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.spotify.getCurrentlyPlaying' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + next( + cfg: ConfigOf< + AV, + AppRockskySpotifyNext.Handler>, + AppRockskySpotifyNext.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.spotify.next' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + pause( + cfg: ConfigOf< + AV, + AppRockskySpotifyPause.Handler>, + AppRockskySpotifyPause.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.spotify.pause' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + play( + cfg: ConfigOf< + AV, + AppRockskySpotifyPlay.Handler>, + AppRockskySpotifyPlay.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.spotify.play' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + previous( + cfg: ConfigOf< + AV, + AppRockskySpotifyPrevious.Handler>, + AppRockskySpotifyPrevious.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.spotify.previous' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + + seek( + cfg: ConfigOf< + AV, + AppRockskySpotifySeek.Handler>, + AppRockskySpotifySeek.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.spotify.seek' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppRockskyStatsNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getStats( + cfg: ConfigOf< + AV, + AppRockskyStatsGetStats.Handler>, + AppRockskyStatsGetStats.HandlerReqCtx> + >, + ) { + const nsid = 'app.rocksky.stats.getStats' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + +export class AppBskyNS { + _server: Server + actor: AppBskyActorNS + + constructor(server: Server) { + this._server = server + this.actor = new AppBskyActorNS(server) + } +} + +export class AppBskyActorNS { + _server: Server + + constructor(server: Server) { + this._server = server + } +} + +export class ComNS { + _server: Server + atproto: ComAtprotoNS + + constructor(server: Server) { + this._server = server + this.atproto = new ComAtprotoNS(server) + } +} + +export class ComAtprotoNS { + _server: Server + repo: ComAtprotoRepoNS + + constructor(server: Server) { + this._server = server + this.repo = new ComAtprotoRepoNS(server) + } +} + +export class ComAtprotoRepoNS { + _server: Server + + constructor(server: Server) { + this._server = server + } +} + +type SharedRateLimitOpts = { + name: string + calcKey?: (ctx: T) => string | null + calcPoints?: (ctx: T) => number +} +type RouteRateLimitOpts = { + durationMs: number + points: number + calcKey?: (ctx: T) => string | null + calcPoints?: (ctx: T) => number +} +type HandlerOpts = { blobLimit?: number } +type HandlerRateLimitOpts = SharedRateLimitOpts | RouteRateLimitOpts +type ConfigOf = + | Handler + | { + auth?: Auth + opts?: HandlerOpts + rateLimit?: HandlerRateLimitOpts | HandlerRateLimitOpts[] + handler: Handler + } +type ExtractAuth = Extract< + Awaited>, + { credentials: unknown } +> diff --git a/apps/cli/src/lexicon/lexicons.ts b/apps/cli/src/lexicon/lexicons.ts new file mode 100644 index 00000000..822d668c --- /dev/null +++ b/apps/cli/src/lexicon/lexicons.ts @@ -0,0 +1,5453 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { LexiconDoc, Lexicons } from '@atproto/lexicon' + +export const schemaDict = { + AppRockskyActorDefs: { + lexicon: 1, + id: 'app.rocksky.actor.defs', + defs: { + profileViewDetailed: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the actor.', + }, + did: { + type: 'string', + description: 'The DID of the actor.', + }, + handle: { + type: 'string', + description: 'The handle of the actor.', + }, + displayName: { + type: 'string', + description: 'The display name of the actor.', + }, + avatar: { + type: 'string', + description: "The URL of the actor's avatar image.", + format: 'uri', + }, + createdAt: { + type: 'string', + description: 'The date and time when the actor was created.', + format: 'datetime', + }, + updatedAt: { + type: 'string', + description: 'The date and time when the actor was last updated.', + format: 'datetime', + }, + }, + }, + profileViewBasic: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the actor.', + }, + did: { + type: 'string', + description: 'The DID of the actor.', + }, + handle: { + type: 'string', + description: 'The handle of the actor.', + }, + displayName: { + type: 'string', + description: 'The display name of the actor.', + }, + avatar: { + type: 'string', + description: "The URL of the actor's avatar image.", + format: 'uri', + }, + createdAt: { + type: 'string', + description: 'The date and time when the actor was created.', + format: 'datetime', + }, + updatedAt: { + type: 'string', + description: 'The date and time when the actor was last updated.', + format: 'datetime', + }, + }, + }, + neighbourViewBasic: { + type: 'object', + properties: { + userId: { + type: 'string', + }, + did: { + type: 'string', + }, + handle: { + type: 'string', + }, + displayName: { + type: 'string', + }, + avatar: { + type: 'string', + description: "The URL of the actor's avatar image.", + format: 'uri', + }, + sharedArtistsCount: { + type: 'integer', + description: 'The number of artists shared with the actor.', + }, + similarityScore: { + type: 'integer', + description: 'The similarity score with the actor.', + }, + topSharedArtistNames: { + type: 'array', + description: 'The top shared artist names with the actor.', + items: { + type: 'string', + }, + }, + topSharedArtistsDetails: { + type: 'array', + description: 'The top shared artist details with the actor.', + items: { + type: 'ref', + ref: 'lex:app.rocksky.artist.defs#artistViewBasic', + }, + }, + }, + }, + compatibilityViewBasic: { + type: 'object', + properties: { + compatibilityLevel: { + type: 'integer', + }, + compatibilityPercentage: { + type: 'integer', + }, + sharedArtists: { + type: 'integer', + }, + topSharedArtistNames: { + type: 'array', + items: { + type: 'string', + }, + }, + topSharedDetailedArtists: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#artistViewBasic', + }, + }, + user1ArtistCount: { + type: 'integer', + }, + user2ArtistCount: { + type: 'integer', + }, + }, + }, + artistViewBasic: { + type: 'object', + properties: { + id: { + type: 'string', + }, + name: { + type: 'string', + }, + picture: { + type: 'string', + format: 'uri', + }, + uri: { + type: 'string', + format: 'at-uri', + }, + user1Rank: { + type: 'integer', + }, + user2Rank: { + type: 'integer', + }, + weight: { + type: 'integer', + }, + }, + }, + }, + }, + AppRockskyActorGetActorAlbums: { + lexicon: 1, + id: 'app.rocksky.actor.getActorAlbums', + defs: { + main: { + type: 'query', + description: 'Get albums for an actor', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + limit: { + type: 'integer', + description: 'The maximum number of albums to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + startDate: { + type: 'string', + description: + 'The start date to filter albums from (ISO 8601 format)', + format: 'datetime', + }, + endDate: { + type: 'string', + description: 'The end date to filter albums to (ISO 8601 format)', + format: 'datetime', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + albums: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.album.defs#albumViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyActorGetActorArtists: { + lexicon: 1, + id: 'app.rocksky.actor.getActorArtists', + defs: { + main: { + type: 'query', + description: 'Get artists for an actor', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + limit: { + type: 'integer', + description: 'The maximum number of albums to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + startDate: { + type: 'string', + description: + 'The start date to filter albums from (ISO 8601 format)', + format: 'datetime', + }, + endDate: { + type: 'string', + description: 'The end date to filter albums to (ISO 8601 format)', + format: 'datetime', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + artists: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.artist.defs#artistViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyActorGetActorCompatibility: { + lexicon: 1, + id: 'app.rocksky.actor.getActorCompatibility', + defs: { + main: { + type: 'query', + description: 'Get compatibility for an actor', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'DID or handle to get compatibility for', + format: 'at-identifier', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + compatibility: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#compatibilityViewBasic', + }, + }, + }, + }, + }, + }, + }, + AppRockskyActorGetActorLovedSongs: { + lexicon: 1, + id: 'app.rocksky.actor.getActorLovedSongs', + defs: { + main: { + type: 'query', + description: 'Get loved songs for an actor', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + limit: { + type: 'integer', + description: 'The maximum number of albums to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + tracks: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyActorGetActorNeighbours: { + lexicon: 1, + id: 'app.rocksky.actor.getActorNeighbours', + defs: { + main: { + type: 'query', + description: 'Get neighbours for an actor', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + neighbours: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#neighbourViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyActorGetActorPlaylists: { + lexicon: 1, + id: 'app.rocksky.actor.getActorPlaylists', + defs: { + main: { + type: 'query', + description: 'Get playlists for an actor', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + limit: { + type: 'integer', + description: 'The maximum number of albums to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + playlists: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.playlist.defs#playlistViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyActorGetActorScrobbles: { + lexicon: 1, + id: 'app.rocksky.actor.getActorScrobbles', + defs: { + main: { + type: 'query', + description: 'Get scrobbles for an actor', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + limit: { + type: 'integer', + description: 'The maximum number of albums to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + scrobbles: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyActorGetActorSongs: { + lexicon: 1, + id: 'app.rocksky.actor.getActorSongs', + defs: { + main: { + type: 'query', + description: 'Get songs for an actor', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + limit: { + type: 'integer', + description: 'The maximum number of albums to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + startDate: { + type: 'string', + description: + 'The start date to filter albums from (ISO 8601 format)', + format: 'datetime', + }, + endDate: { + type: 'string', + description: 'The end date to filter albums to (ISO 8601 format)', + format: 'datetime', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + songs: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyActorGetProfile: { + lexicon: 1, + id: 'app.rocksky.actor.getProfile', + defs: { + main: { + type: 'query', + description: 'Get the profile of an actor', + parameters: { + type: 'params', + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewDetailed', + }, + }, + }, + }, + }, + AppBskyActorProfile: { + lexicon: 1, + id: 'app.bsky.actor.profile', + defs: { + main: { + type: 'record', + description: 'A declaration of a Bluesky account profile.', + key: 'literal:self', + record: { + type: 'object', + properties: { + displayName: { + type: 'string', + maxGraphemes: 64, + maxLength: 640, + }, + description: { + type: 'string', + description: 'Free-form profile description text.', + maxGraphemes: 256, + maxLength: 2560, + }, + avatar: { + type: 'blob', + description: + "Small image to be displayed next to posts from account. AKA, 'profile picture'", + accept: ['image/png', 'image/jpeg'], + maxSize: 1000000, + }, + banner: { + type: 'blob', + description: + 'Larger horizontal image to display behind profile view.', + accept: ['image/png', 'image/jpeg'], + maxSize: 10000000, + }, + labels: { + type: 'union', + description: + 'Self-label values, specific to the Bluesky application, on the overall account.', + refs: ['lex:com.atproto.label.defs#selfLabels'], + }, + joinedViaStarterPack: { + type: 'ref', + ref: 'lex:com.atproto.repo.strongRef', + }, + createdAt: { + type: 'string', + format: 'datetime', + }, + }, + }, + }, + }, + }, + AppRockskyAlbum: { + lexicon: 1, + id: 'app.rocksky.album', + defs: { + main: { + type: 'record', + description: 'A declaration of an album.', + key: 'tid', + record: { + type: 'object', + required: ['title', 'artist', 'createdAt'], + properties: { + title: { + type: 'string', + description: 'The title of the album.', + minLength: 1, + maxLength: 512, + }, + artist: { + type: 'string', + description: 'The artist of the album.', + minLength: 1, + maxLength: 256, + }, + duration: { + type: 'integer', + description: 'The duration of the album in seconds.', + }, + releaseDate: { + type: 'string', + description: 'The release date of the album.', + format: 'datetime', + }, + year: { + type: 'integer', + description: 'The year the album was released.', + }, + genre: { + type: 'string', + description: 'The genre of the album.', + maxLength: 256, + }, + albumArt: { + type: 'blob', + description: 'The album art of the album.', + accept: ['image/png', 'image/jpeg'], + maxSize: 2000000, + }, + albumArtUrl: { + type: 'string', + description: 'The URL of the album art of the album.', + format: 'uri', + }, + tags: { + type: 'array', + description: 'The tags of the album.', + items: { + type: 'string', + minLength: 1, + maxLength: 256, + }, + }, + youtubeLink: { + type: 'string', + description: 'The YouTube link of the album.', + format: 'uri', + }, + spotifyLink: { + type: 'string', + description: 'The Spotify link of the album.', + format: 'uri', + }, + tidalLink: { + type: 'string', + description: 'The tidal link of the album.', + format: 'uri', + }, + appleMusicLink: { + type: 'string', + description: 'The Apple Music link of the album.', + format: 'uri', + }, + createdAt: { + type: 'string', + description: 'The date and time when the album was created.', + format: 'datetime', + }, + }, + }, + }, + }, + }, + AppRockskyAlbumDefs: { + lexicon: 1, + id: 'app.rocksky.album.defs', + defs: { + albumViewBasic: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the album.', + }, + uri: { + type: 'string', + description: 'The URI of the album.', + format: 'at-uri', + }, + title: { + type: 'string', + description: 'The title of the album.', + }, + artist: { + type: 'string', + description: 'The artist of the album.', + }, + artistUri: { + type: 'string', + description: "The URI of the album's artist.", + format: 'at-uri', + }, + year: { + type: 'integer', + description: 'The year the album was released.', + }, + albumArt: { + type: 'string', + description: 'The URL of the album art image.', + format: 'uri', + }, + releaseDate: { + type: 'string', + description: 'The release date of the album.', + }, + sha256: { + type: 'string', + description: 'The SHA256 hash of the album.', + }, + playCount: { + type: 'integer', + description: 'The number of times the album has been played.', + minimum: 0, + }, + uniqueListeners: { + type: 'integer', + description: + 'The number of unique listeners who have played the album.', + minimum: 0, + }, + }, + }, + albumViewDetailed: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the album.', + }, + uri: { + type: 'string', + description: 'The URI of the album.', + format: 'at-uri', + }, + title: { + type: 'string', + description: 'The title of the album.', + }, + artist: { + type: 'string', + description: 'The artist of the album.', + }, + artistUri: { + type: 'string', + description: "The URI of the album's artist.", + format: 'at-uri', + }, + year: { + type: 'integer', + description: 'The year the album was released.', + }, + albumArt: { + type: 'string', + description: 'The URL of the album art image.', + format: 'uri', + }, + releaseDate: { + type: 'string', + description: 'The release date of the album.', + }, + sha256: { + type: 'string', + description: 'The SHA256 hash of the album.', + }, + playCount: { + type: 'integer', + description: 'The number of times the album has been played.', + minimum: 0, + }, + uniqueListeners: { + type: 'integer', + description: + 'The number of unique listeners who have played the album.', + minimum: 0, + }, + tracks: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs.songViewBasic', + }, + }, + }, + }, + }, + }, + AppRockskyAlbumGetAlbum: { + lexicon: 1, + id: 'app.rocksky.album.getAlbum', + defs: { + main: { + type: 'query', + description: 'Get detailed album view', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the album to retrieve.', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.album.defs#albumViewDetailed', + }, + }, + }, + }, + }, + AppRockskyAlbumGetAlbums: { + lexicon: 1, + id: 'app.rocksky.album.getAlbums', + defs: { + main: { + type: 'query', + description: 'Get albums', + parameters: { + type: 'params', + properties: { + limit: { + type: 'integer', + description: 'The maximum number of albums to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + albums: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.album.defs#albumViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyAlbumGetAlbumTracks: { + lexicon: 1, + id: 'app.rocksky.album.getAlbumTracks', + defs: { + main: { + type: 'query', + description: 'Get tracks for an album', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the album to retrieve tracks from', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + tracks: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyApikeyCreateApikey: { + lexicon: 1, + id: 'app.rocksky.apikey.createApikey', + defs: { + main: { + type: 'procedure', + description: 'Create a new API key for the authenticated user', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['name'], + properties: { + name: { + type: 'string', + description: 'The name of the API key.', + }, + description: { + type: 'string', + description: 'A description for the API key.', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.apikey.defs#apiKey', + }, + }, + }, + }, + }, + AppRockskyApikeyDefs: { + lexicon: 1, + id: 'app.rocksky.apikey.defs', + defs: { + apiKeyView: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the API key.', + }, + name: { + type: 'string', + description: 'The name of the API key.', + }, + description: { + type: 'string', + description: 'A description for the API key.', + }, + createdAt: { + type: 'string', + description: 'The date and time when the API key was created.', + format: 'datetime', + }, + }, + }, + }, + }, + AppRockskyApikeysDefs: { + lexicon: 1, + id: 'app.rocksky.apikeys.defs', + defs: {}, + }, + AppRockskyApikeyGetApikeys: { + lexicon: 1, + id: 'app.rocksky.apikey.getApikeys', + defs: { + main: { + type: 'query', + description: 'Get a list of API keys for the authenticated user', + parameters: { + type: 'params', + properties: { + offset: { + type: 'integer', + description: + 'The number of API keys to skip before starting to collect the result set.', + }, + limit: { + type: 'integer', + description: 'The number of API keys to return per page.', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + apiKeys: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.apikey.defs#apikeyView', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyApikeyRemoveApikey: { + lexicon: 1, + id: 'app.rocksky.apikey.removeApikey', + defs: { + main: { + type: 'procedure', + description: 'Remove an API key for the authenticated user', + parameters: { + type: 'params', + required: ['id'], + properties: { + id: { + type: 'string', + description: 'The ID of the API key to remove.', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.apikey.defs#apiKey', + }, + }, + }, + }, + }, + AppRockskyApikeyUpdateApikey: { + lexicon: 1, + id: 'app.rocksky.apikey.updateApikey', + defs: { + main: { + type: 'procedure', + description: 'Update an existing API key for the authenticated user', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['id', 'name'], + properties: { + id: { + type: 'string', + description: 'The ID of the API key to update.', + }, + name: { + type: 'string', + description: 'The new name of the API key.', + }, + description: { + type: 'string', + description: 'A new description for the API key.', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.apikey.defs#apiKey', + }, + }, + }, + }, + }, + AppRockskyArtist: { + lexicon: 1, + id: 'app.rocksky.artist', + defs: { + main: { + type: 'record', + description: 'A declaration of an artist.', + key: 'tid', + record: { + type: 'object', + required: ['name', 'createdAt'], + properties: { + name: { + type: 'string', + description: 'The name of the artist.', + minLength: 1, + maxLength: 512, + }, + bio: { + type: 'string', + description: 'The biography of the artist.', + maxLength: 1000, + }, + picture: { + type: 'blob', + description: 'The picture of the artist.', + accept: ['image/png', 'image/jpeg'], + maxSize: 2000000, + }, + pictureUrl: { + type: 'string', + description: 'The URL of the picture of the artist.', + format: 'uri', + }, + tags: { + type: 'array', + description: 'The tags of the artist.', + items: { + type: 'string', + minLength: 1, + maxLength: 256, + }, + }, + born: { + type: 'string', + description: 'The birth date of the artist.', + format: 'datetime', + }, + died: { + type: 'string', + description: 'The death date of the artist.', + format: 'datetime', + }, + bornIn: { + type: 'string', + description: 'The birth place of the artist.', + maxLength: 256, + }, + createdAt: { + type: 'string', + description: 'The date when the artist was created.', + format: 'datetime', + }, + }, + }, + }, + }, + }, + AppRockskyArtistDefs: { + lexicon: 1, + id: 'app.rocksky.artist.defs', + defs: { + artistViewBasic: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the artist.', + }, + uri: { + type: 'string', + description: 'The URI of the artist.', + format: 'at-uri', + }, + name: { + type: 'string', + description: 'The name of the artist.', + }, + picture: { + type: 'string', + description: 'The picture of the artist.', + }, + sha256: { + type: 'string', + description: 'The SHA256 hash of the artist.', + }, + playCount: { + type: 'integer', + description: 'The number of times the artist has been played.', + minimum: 0, + }, + uniqueListeners: { + type: 'integer', + description: + 'The number of unique listeners who have played the artist.', + minimum: 0, + }, + }, + }, + artistViewDetailed: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the artist.', + }, + uri: { + type: 'string', + description: 'The URI of the artist.', + format: 'at-uri', + }, + name: { + type: 'string', + description: 'The name of the artist.', + }, + picture: { + type: 'string', + description: 'The picture of the artist.', + }, + sha256: { + type: 'string', + description: 'The SHA256 hash of the artist.', + }, + playCount: { + type: 'integer', + description: 'The number of times the artist has been played.', + minimum: 0, + }, + uniqueListeners: { + type: 'integer', + description: + 'The number of unique listeners who have played the artist.', + minimum: 0, + }, + }, + }, + songViewBasic: { + type: 'object', + properties: { + uri: { + type: 'string', + description: 'The URI of the song.', + format: 'at-uri', + }, + title: { + type: 'string', + description: 'The title of the song.', + }, + playCount: { + type: 'integer', + description: 'The number of times the song has been played.', + minimum: 0, + }, + }, + }, + listenerViewBasic: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the actor.', + }, + did: { + type: 'string', + description: 'The DID of the listener.', + }, + handle: { + type: 'string', + description: 'The handle of the listener.', + }, + displayName: { + type: 'string', + description: 'The display name of the listener.', + }, + avatar: { + type: 'string', + description: "The URL of the listener's avatar image.", + format: 'uri', + }, + mostListenedSong: { + type: 'ref', + ref: 'lex:app.rocksky.artist.defs#songViewBasic', + }, + totalPlays: { + type: 'integer', + description: 'The total number of plays by the listener.', + minimum: 0, + }, + rank: { + type: 'integer', + description: + 'The rank of the listener among all listeners of the artist.', + minimum: 1, + }, + }, + }, + artistMbid: { + type: 'object', + properties: { + mbid: { + type: 'string', + description: 'The MusicBrainz Identifier (MBID) of the artist.', + }, + name: { + type: 'string', + description: 'The name of the artist.', + minLength: 1, + maxLength: 256, + }, + }, + }, + }, + }, + AppRockskyArtistGetArtist: { + lexicon: 1, + id: 'app.rocksky.artist.getArtist', + defs: { + main: { + type: 'query', + description: 'Get artist details', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the artist to retrieve details from', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.artist.defs#artistViewDetailed', + }, + }, + }, + }, + }, + AppRockskyArtistGetArtistAlbums: { + lexicon: 1, + id: 'app.rocksky.artist.getArtistAlbums', + defs: { + main: { + type: 'query', + description: "Get artist's albums", + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the artist to retrieve albums from', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + albums: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.album.defs#albumViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyArtistGetArtistListeners: { + lexicon: 1, + id: 'app.rocksky.artist.getArtistListeners', + defs: { + main: { + type: 'query', + description: 'Get artist listeners', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the artist to retrieve listeners from', + format: 'at-uri', + }, + offset: { + type: 'integer', + description: 'Number of items to skip before returning results', + }, + limit: { + type: 'integer', + description: 'Maximum number of results to return', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + listeners: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.artist.defs#listenerViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyArtistGetArtists: { + lexicon: 1, + id: 'app.rocksky.artist.getArtists', + defs: { + main: { + type: 'query', + description: 'Get artists', + parameters: { + type: 'params', + properties: { + limit: { + type: 'integer', + description: 'The maximum number of artists to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + names: { + type: 'string', + description: 'The names of the artists to return', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + artists: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.artist.defs#artistViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyArtistGetArtistTracks: { + lexicon: 1, + id: 'app.rocksky.artist.getArtistTracks', + defs: { + main: { + type: 'query', + description: "Get artist's tracks", + parameters: { + type: 'params', + properties: { + uri: { + type: 'string', + description: 'The URI of the artist to retrieve albums from', + format: 'at-uri', + }, + limit: { + type: 'integer', + description: 'The maximum number of tracks to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + tracks: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyChartsDefs: { + lexicon: 1, + id: 'app.rocksky.charts.defs', + defs: { + chartsView: { + type: 'object', + properties: { + scrobbles: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.charts.defs#scrobbleViewBasic', + }, + }, + }, + }, + scrobbleViewBasic: { + type: 'object', + properties: { + date: { + type: 'string', + description: 'The date of the scrobble.', + format: 'datetime', + }, + count: { + type: 'integer', + description: 'The number of scrobbles on this date.', + }, + }, + }, + }, + }, + AppRockskyChartsGetScrobblesChart: { + lexicon: 1, + id: 'app.rocksky.charts.getScrobblesChart', + defs: { + main: { + type: 'query', + description: 'Get the scrobbles chart', + parameters: { + type: 'params', + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + artisturi: { + type: 'string', + description: 'The URI of the artist to filter by', + format: 'at-uri', + }, + albumuri: { + type: 'string', + description: 'The URI of the album to filter by', + format: 'at-uri', + }, + songuri: { + type: 'string', + description: 'The URI of the track to filter by', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.charts.defs#chartsView', + }, + }, + }, + }, + }, + AppRockskyDropboxDefs: { + lexicon: 1, + id: 'app.rocksky.dropbox.defs', + defs: { + fileView: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the file.', + }, + name: { + type: 'string', + description: 'The name of the file.', + }, + pathLower: { + type: 'string', + description: 'The lowercased path of the file.', + }, + pathDisplay: { + type: 'string', + description: 'The display path of the file.', + }, + clientModified: { + type: 'string', + description: + 'The last modified date and time of the file on the client.', + format: 'datetime', + }, + serverModified: { + type: 'string', + description: + 'The last modified date and time of the file on the server.', + format: 'datetime', + }, + }, + }, + fileListView: { + type: 'object', + properties: { + files: { + type: 'array', + description: 'A list of files in the Dropbox.', + items: { + type: 'ref', + ref: 'lex:app.rocksky.dropbox.defs#fileView', + }, + }, + }, + }, + temporaryLinkView: { + type: 'object', + properties: { + link: { + type: 'string', + description: 'The temporary link to access the file.', + format: 'uri', + }, + }, + }, + }, + }, + AppRockskyDropboxDownloadFile: { + lexicon: 1, + id: 'app.rocksky.dropbox.downloadFile', + defs: { + main: { + type: 'query', + description: 'Download a file from Dropbox by its unique identifier', + parameters: { + type: 'params', + required: ['fileId'], + properties: { + fileId: { + type: 'string', + description: 'The unique identifier of the file to download', + }, + }, + }, + output: { + encoding: 'application/octet-stream', + }, + }, + }, + }, + AppRockskyDropboxGetFiles: { + lexicon: 1, + id: 'app.rocksky.dropbox.getFiles', + defs: { + main: { + type: 'query', + description: 'Retrieve a list of files from Dropbox', + parameters: { + type: 'params', + properties: { + at: { + type: 'string', + description: 'Path to the Dropbox folder or root directory', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.dropbox.defs#fileListView', + }, + }, + }, + }, + }, + AppRockskyDropboxGetMetadata: { + lexicon: 1, + id: 'app.rocksky.dropbox.getMetadata', + defs: { + main: { + type: 'query', + description: 'Retrieve metadata of a file or folder in Dropbox', + parameters: { + type: 'params', + required: ['path'], + properties: { + path: { + type: 'string', + description: 'Path to the file or folder in Dropbox', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.dropbox.defs#fileView', + }, + }, + }, + }, + }, + AppRockskyDropboxGetTemporaryLink: { + lexicon: 1, + id: 'app.rocksky.dropbox.getTemporaryLink', + defs: { + main: { + type: 'query', + description: 'Retrieve a temporary link to access a file in Dropbox', + parameters: { + type: 'params', + required: ['path'], + properties: { + path: { + type: 'string', + description: 'Path to the file in Dropbox', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.dropbox.defs#temporaryLinkView', + }, + }, + }, + }, + }, + AppRockskyFeedDefs: { + lexicon: 1, + id: 'app.rocksky.feed.defs', + defs: { + searchResultsView: { + type: 'object', + properties: { + hits: { + type: 'array', + items: { + type: 'union', + refs: [ + 'lex:app.rocksky.song.defs#songViewBasic', + 'lex:app.rocksky.album.defs#albumViewBasic', + 'lex:app.rocksky.artist.defs#artistViewBasic', + 'lex:app.rocksky.playlist.defs#playlistViewBasic', + 'lex:app.rocksky.actor.defs#profileViewBasic', + ], + }, + }, + processingTimeMs: { + type: 'integer', + }, + limit: { + type: 'integer', + }, + offset: { + type: 'integer', + }, + estimatedTotalHits: { + type: 'integer', + }, + }, + }, + nowPlayingView: { + type: 'object', + properties: { + album: { + type: 'string', + }, + albumArt: { + type: 'string', + format: 'uri', + }, + albumArtist: { + type: 'string', + }, + albumUri: { + type: 'string', + format: 'at-uri', + }, + artist: { + type: 'string', + }, + artistUri: { + type: 'string', + format: 'at-uri', + }, + avatar: { + type: 'string', + format: 'uri', + }, + createdAt: { + type: 'string', + }, + did: { + type: 'string', + format: 'at-identifier', + }, + handle: { + type: 'string', + }, + id: { + type: 'string', + }, + title: { + type: 'string', + }, + trackId: { + type: 'string', + }, + trackUri: { + type: 'string', + format: 'at-uri', + }, + uri: { + type: 'string', + format: 'at-uri', + }, + }, + }, + nowPlayingsView: { + type: 'object', + properties: { + nowPlayings: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#nowPlayingView', + }, + }, + }, + }, + feedGeneratorsView: { + type: 'object', + properties: { + feeds: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#feedGeneratorView', + }, + }, + }, + }, + feedGeneratorView: { + type: 'object', + properties: { + id: { + type: 'string', + }, + name: { + type: 'string', + }, + description: { + type: 'string', + }, + uri: { + type: 'string', + format: 'at-uri', + }, + avatar: { + type: 'string', + format: 'uri', + }, + creator: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + }, + }, + feedUriView: { + type: 'object', + properties: { + uri: { + type: 'string', + description: 'The feed URI.', + format: 'at-uri', + }, + }, + }, + feedItemView: { + type: 'object', + properties: { + scrobble: { + type: 'ref', + ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', + }, + }, + }, + feedView: { + type: 'object', + properties: { + feed: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#feedItemView', + }, + }, + cursor: { + type: 'string', + description: 'The pagination cursor for the next set of results.', + }, + }, + }, + }, + }, + AppRockskyFeedDescribeFeedGenerator: { + lexicon: 1, + id: 'app.rocksky.feed.describeFeedGenerator', + defs: { + main: { + type: 'query', + description: 'Get information about a feed generator', + parameters: { + type: 'params', + properties: {}, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + did: { + type: 'string', + description: 'The DID of the feed generator.', + format: 'at-identifier', + }, + feeds: { + type: 'array', + description: + 'List of feed URIs generated by this feed generator.', + items: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#feedUriView', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyFeedGenerator: { + lexicon: 1, + id: 'app.rocksky.feed.generator', + defs: { + main: { + type: 'record', + description: + 'Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.', + key: 'tid', + record: { + type: 'object', + required: ['did', 'displayName', 'createdAt'], + properties: { + did: { + type: 'string', + format: 'did', + }, + avatar: { + type: 'blob', + accept: ['image/png', 'image/jpeg'], + maxSize: 1000000, + }, + displayName: { + type: 'string', + maxGraphemes: 24, + maxLength: 240, + }, + description: { + type: 'string', + maxGraphemes: 300, + maxLength: 3000, + }, + createdAt: { + type: 'string', + format: 'datetime', + }, + }, + }, + }, + }, + }, + AppRockskyFeedGetFeed: { + lexicon: 1, + id: 'app.rocksky.feed.getFeed', + defs: { + main: { + type: 'query', + description: 'Get the feed by uri', + parameters: { + type: 'params', + required: ['feed'], + properties: { + feed: { + type: 'string', + description: 'The feed URI.', + format: 'at-uri', + }, + limit: { + type: 'integer', + description: 'The maximum number of scrobbles to return', + minimum: 1, + }, + cursor: { + type: 'string', + description: 'The cursor for pagination', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#feedView', + }, + }, + }, + }, + }, + AppRockskyFeedGetFeedGenerator: { + lexicon: 1, + id: 'app.rocksky.feed.getFeedGenerator', + defs: { + main: { + type: 'query', + description: 'Get information about a feed generator', + parameters: { + type: 'params', + required: ['feed'], + properties: { + feed: { + type: 'string', + description: 'AT-URI of the feed generator record.', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + view: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#feedGeneratorView', + }, + }, + }, + }, + }, + }, + }, + AppRockskyFeedGetFeedGenerators: { + lexicon: 1, + id: 'app.rocksky.feed.getFeedGenerators', + defs: { + main: { + type: 'query', + description: 'Get all feed generators', + parameters: { + type: 'params', + properties: { + size: { + type: 'integer', + description: 'The maximum number of feed generators to return.', + minimum: 1, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#feedGeneratorsView', + }, + }, + }, + }, + }, + AppRockskyFeedGetFeedSkeleton: { + lexicon: 1, + id: 'app.rocksky.feed.getFeedSkeleton', + defs: { + main: { + type: 'query', + description: 'Get the feed by uri', + parameters: { + type: 'params', + required: ['feed'], + properties: { + feed: { + type: 'string', + description: 'The feed URI.', + format: 'at-uri', + }, + limit: { + type: 'integer', + description: 'The maximum number of scrobbles to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + cursor: { + type: 'string', + description: 'The pagination cursor.', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + scrobbles: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', + }, + }, + cursor: { + type: 'string', + description: + 'The pagination cursor for the next set of results.', + }, + }, + }, + }, + }, + }, + }, + AppRockskyFeedGetNowPlayings: { + lexicon: 1, + id: 'app.rocksky.feed.getNowPlayings', + defs: { + main: { + type: 'query', + description: 'Get all currently playing tracks by users', + parameters: { + type: 'params', + properties: { + size: { + type: 'integer', + description: + 'The maximum number of now playing tracks to return.', + minimum: 1, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#nowPlayingsView', + }, + }, + }, + }, + }, + AppRockskyFeedSearch: { + lexicon: 1, + id: 'app.rocksky.feed.search', + defs: { + main: { + type: 'query', + description: 'Search for content in the feed', + parameters: { + type: 'params', + required: ['query'], + properties: { + query: { + type: 'string', + description: 'The search query string', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.feed.defs#searchResultsView', + }, + }, + }, + }, + }, + AppRockskyGoogledriveDefs: { + lexicon: 1, + id: 'app.rocksky.googledrive.defs', + defs: { + fileView: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the file.', + }, + }, + }, + fileListView: { + type: 'object', + properties: { + files: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.googledrive.defs#fileView', + }, + }, + }, + }, + }, + }, + AppRockskyGoogledriveDownloadFile: { + lexicon: 1, + id: 'app.rocksky.googledrive.downloadFile', + defs: { + main: { + type: 'query', + description: + 'Download a file from Google Drive by its unique identifier', + parameters: { + type: 'params', + required: ['fileId'], + properties: { + fileId: { + type: 'string', + description: 'The unique identifier of the file to download', + }, + }, + }, + output: { + encoding: 'application/octet-stream', + }, + }, + }, + }, + AppRockskyGoogledriveGetFile: { + lexicon: 1, + id: 'app.rocksky.googledrive.getFile', + defs: { + main: { + type: 'query', + description: 'Get a file from Google Drive by its unique identifier', + parameters: { + type: 'params', + required: ['fileId'], + properties: { + fileId: { + type: 'string', + description: 'The unique identifier of the file to retrieve', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.googledrive.defs#fileView', + }, + }, + }, + }, + }, + AppRockskyGoogledriveGetFiles: { + lexicon: 1, + id: 'app.rocksky.googledrive.getFiles', + defs: { + main: { + type: 'query', + description: 'Get a list of files from Google Drive', + parameters: { + type: 'params', + properties: { + at: { + type: 'string', + description: 'Path to the Google Drive folder or root directory', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.googledrive.defs#fileListView', + }, + }, + }, + }, + }, + AppRockskyGraphDefs: { + lexicon: 1, + id: 'app.rocksky.graph.defs', + defs: { + notFoundActor: { + type: 'object', + description: 'indicates that a handle or DID could not be resolved', + required: ['actor', 'notFound'], + properties: { + actor: { + type: 'string', + format: 'at-identifier', + }, + notFound: { + type: 'boolean', + }, + }, + }, + relationship: { + type: 'object', + required: ['did'], + properties: { + did: { + type: 'string', + format: 'did', + }, + following: { + type: 'string', + description: + 'if the actor follows this DID, this is the AT-URI of the follow record', + format: 'at-uri', + }, + followedBy: { + type: 'string', + description: + 'if the actor is followed by this DID, contains the AT-URI of the follow record', + format: 'at-uri', + }, + }, + }, + }, + }, + AppRockskyGraphFollow: { + lexicon: 1, + id: 'app.rocksky.graph.follow', + defs: { + main: { + type: 'record', + description: + "Record declaring a social 'follow' relationship of another account.", + key: 'tid', + record: { + type: 'object', + required: ['createdAt', 'subject'], + properties: { + createdAt: { + type: 'string', + format: 'datetime', + }, + subject: { + type: 'string', + format: 'did', + }, + via: { + type: 'ref', + ref: 'lex:com.atproto.repo.strongRef', + }, + }, + }, + }, + }, + }, + AppRockskyGraphFollowAccount: { + lexicon: 1, + id: 'app.rocksky.graph.followAccount', + defs: { + main: { + type: 'procedure', + description: + "Creates a 'follow' relationship from the authenticated account to a specified account.", + parameters: { + type: 'params', + required: ['account'], + properties: { + account: { + type: 'string', + format: 'at-identifier', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['subject', 'followers'], + properties: { + subject: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + followers: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + }, + cursor: { + type: 'string', + description: + 'A cursor value to pass to subsequent calls to get the next page of results.', + }, + }, + }, + }, + }, + }, + }, + AppRockskyGraphGetFollowers: { + lexicon: 1, + id: 'app.rocksky.graph.getFollowers', + defs: { + main: { + type: 'query', + description: + 'Enumerates accounts which follow a specified account (actor).', + parameters: { + type: 'params', + required: ['actor'], + properties: { + actor: { + type: 'string', + format: 'at-identifier', + }, + limit: { + type: 'integer', + maximum: 100, + minimum: 1, + default: 50, + }, + dids: { + type: 'array', + description: + 'If provided, filters the followers to only include those with DIDs in this list.', + items: { + type: 'string', + format: 'did', + }, + }, + cursor: { + type: 'string', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['subject', 'followers'], + properties: { + subject: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + followers: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + }, + cursor: { + type: 'string', + description: + 'A cursor value to pass to subsequent calls to get the next page of results.', + }, + count: { + type: 'integer', + description: 'The total number of followers.', + }, + }, + }, + }, + }, + }, + }, + AppRockskyGraphGetFollows: { + lexicon: 1, + id: 'app.rocksky.graph.getFollows', + defs: { + main: { + type: 'query', + description: + 'Enumerates accounts which a specified account (actor) follows.', + parameters: { + type: 'params', + required: ['actor'], + properties: { + actor: { + type: 'string', + format: 'at-identifier', + }, + limit: { + type: 'integer', + maximum: 100, + minimum: 1, + default: 50, + }, + dids: { + type: 'array', + description: + 'If provided, filters the follows to only include those with DIDs in this list.', + items: { + type: 'string', + format: 'did', + }, + }, + cursor: { + type: 'string', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['subject', 'follows'], + properties: { + subject: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + follows: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + }, + cursor: { + type: 'string', + description: + 'A cursor value to pass to subsequent calls to get the next page of results.', + }, + count: { + type: 'integer', + description: 'The total number of follows.', + }, + }, + }, + }, + }, + }, + }, + AppRockskyGraphGetKnownFollowers: { + lexicon: 1, + id: 'app.rocksky.graph.getKnownFollowers', + defs: { + main: { + type: 'query', + description: + 'Enumerates accounts which follow a specified account (actor) and are followed by the viewer.', + parameters: { + type: 'params', + required: ['actor'], + properties: { + actor: { + type: 'string', + format: 'at-identifier', + }, + limit: { + type: 'integer', + maximum: 100, + minimum: 1, + default: 50, + }, + cursor: { + type: 'string', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['subject', 'followers'], + properties: { + subject: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + followers: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + }, + cursor: { + type: 'string', + description: + 'A cursor value to pass to subsequent calls to get the next page of results.', + }, + }, + }, + }, + }, + }, + }, + AppRockskyGraphUnfollowAccount: { + lexicon: 1, + id: 'app.rocksky.graph.unfollowAccount', + defs: { + main: { + type: 'procedure', + description: + "Removes a 'follow' relationship from the authenticated account to a specified account.", + parameters: { + type: 'params', + required: ['account'], + properties: { + account: { + type: 'string', + format: 'at-identifier', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['subject', 'followers'], + properties: { + subject: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + followers: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.actor.defs#profileViewBasic', + }, + }, + cursor: { + type: 'string', + description: + 'A cursor value to pass to subsequent calls to get the next page of results.', + }, + }, + }, + }, + }, + }, + }, + AppRockskyLikeDislikeShout: { + lexicon: 1, + id: 'app.rocksky.like.dislikeShout', + defs: { + main: { + type: 'procedure', + description: 'Dislike a shout', + input: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + uri: { + type: 'string', + description: 'The unique identifier of the shout to dislike', + format: 'at-uri', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutView', + }, + }, + }, + }, + }, + AppRockskyLikeDislikeSong: { + lexicon: 1, + id: 'app.rocksky.like.dislikeSong', + defs: { + main: { + type: 'procedure', + description: 'Dislike a song', + input: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + uri: { + type: 'string', + description: 'The unique identifier of the song to dislike', + format: 'at-uri', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewDetailed', + }, + }, + }, + }, + }, + AppRockskyLike: { + lexicon: 1, + id: 'app.rocksky.like', + defs: { + main: { + type: 'record', + description: 'A declaration of a like.', + key: 'tid', + record: { + type: 'object', + required: ['createdAt', 'subject'], + properties: { + createdAt: { + type: 'string', + description: 'The date when the like was created.', + format: 'datetime', + }, + subject: { + type: 'ref', + ref: 'lex:com.atproto.repo.strongRef', + }, + }, + }, + }, + }, + }, + AppRockskyLikeLikeShout: { + lexicon: 1, + id: 'app.rocksky.like.likeShout', + defs: { + main: { + type: 'procedure', + description: 'Like a shout', + input: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + uri: { + type: 'string', + description: 'The unique identifier of the shout to like', + format: 'at-uri', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutView', + }, + }, + }, + }, + }, + AppRockskyLikeLikeSong: { + lexicon: 1, + id: 'app.rocksky.like.likeSong', + defs: { + main: { + type: 'procedure', + description: 'Like a song', + input: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + uri: { + type: 'string', + description: 'The unique identifier of the song to like', + format: 'at-uri', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewDetailed', + }, + }, + }, + }, + }, + AppRockskyPlayerAddDirectoryToQueue: { + lexicon: 1, + id: 'app.rocksky.player.addDirectoryToQueue', + defs: { + main: { + type: 'procedure', + description: "Add directory to the player's queue", + parameters: { + type: 'params', + required: ['directory'], + properties: { + playerId: { + type: 'string', + }, + directory: { + type: 'string', + description: 'The directory to add to the queue', + }, + position: { + type: 'integer', + description: + 'Position in the queue to insert the directory at, defaults to the end if not specified', + }, + shuffle: { + type: 'boolean', + description: + 'Whether to shuffle the added directory in the queue', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerAddItemsToQueue: { + lexicon: 1, + id: 'app.rocksky.player.addItemsToQueue', + defs: { + main: { + type: 'procedure', + description: "Add items to the player's queue", + parameters: { + type: 'params', + required: ['items'], + properties: { + playerId: { + type: 'string', + }, + items: { + type: 'array', + items: { + type: 'string', + description: 'List of file identifiers to add to the queue', + }, + }, + position: { + type: 'integer', + description: + 'Position in the queue to insert the items at, defaults to the end if not specified', + }, + shuffle: { + type: 'boolean', + description: 'Whether to shuffle the added items in the queue', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerDefs: { + lexicon: 1, + id: 'app.rocksky.player.defs', + defs: { + currentlyPlayingViewDetailed: { + type: 'object', + properties: { + title: { + type: 'string', + description: 'The title of the currently playing track', + }, + }, + }, + playbackQueueViewDetailed: { + type: 'object', + properties: { + tracks: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs.songViewBasic', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerGetCurrentlyPlaying: { + lexicon: 1, + id: 'app.rocksky.player.getCurrentlyPlaying', + defs: { + main: { + type: 'query', + description: 'Get the currently playing track', + parameters: { + type: 'params', + properties: { + playerId: { + type: 'string', + }, + actor: { + type: 'string', + description: + 'Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.', + format: 'at-identifier', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.player.defs#currentlyPlayingViewDetailed', + }, + }, + }, + }, + }, + AppRockskyPlayerGetPlaybackQueue: { + lexicon: 1, + id: 'app.rocksky.player.getPlaybackQueue', + defs: { + main: { + type: 'query', + description: 'Retrieve the current playback queue', + parameters: { + type: 'params', + properties: { + playerId: { + type: 'string', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.player.defs#playbackQueueViewDetailed', + }, + }, + }, + }, + }, + AppRockskyPlayerNext: { + lexicon: 1, + id: 'app.rocksky.player.next', + defs: { + main: { + type: 'procedure', + description: 'Play the next track in the queue', + parameters: { + type: 'params', + properties: { + playerId: { + type: 'string', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerPause: { + lexicon: 1, + id: 'app.rocksky.player.pause', + defs: { + main: { + type: 'procedure', + description: 'Pause the currently playing track', + parameters: { + type: 'params', + properties: { + playerId: { + type: 'string', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerPlay: { + lexicon: 1, + id: 'app.rocksky.player.play', + defs: { + main: { + type: 'procedure', + description: 'Resume playback of the currently paused track', + parameters: { + type: 'params', + properties: { + playerId: { + type: 'string', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerPlayDirectory: { + lexicon: 1, + id: 'app.rocksky.player.playDirectory', + defs: { + main: { + type: 'procedure', + description: 'Play all tracks in a directory', + parameters: { + type: 'params', + required: ['directoryId'], + properties: { + playerId: { + type: 'string', + }, + directoryId: { + type: 'string', + }, + shuffle: { + type: 'boolean', + }, + recurse: { + type: 'boolean', + }, + position: { + type: 'integer', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerPlayFile: { + lexicon: 1, + id: 'app.rocksky.player.playFile', + defs: { + main: { + type: 'procedure', + description: 'Play a specific audio file', + parameters: { + type: 'params', + required: ['fileId'], + properties: { + playerId: { + type: 'string', + }, + fileId: { + type: 'string', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerPrevious: { + lexicon: 1, + id: 'app.rocksky.player.previous', + defs: { + main: { + type: 'procedure', + description: 'Play the previous track in the queue', + parameters: { + type: 'params', + properties: { + playerId: { + type: 'string', + }, + }, + }, + }, + }, + }, + AppRockskyPlayerSeek: { + lexicon: 1, + id: 'app.rocksky.player.seek', + defs: { + main: { + type: 'procedure', + description: + 'Seek to a specific position in the currently playing track', + parameters: { + type: 'params', + required: ['position'], + properties: { + playerId: { + type: 'string', + }, + position: { + type: 'integer', + description: 'The position in seconds to seek to', + }, + }, + }, + }, + }, + }, + AppRockskyPlaylistCreatePlaylist: { + lexicon: 1, + id: 'app.rocksky.playlist.createPlaylist', + defs: { + main: { + type: 'procedure', + description: 'Create a new playlist', + parameters: { + type: 'params', + required: ['name'], + properties: { + name: { + type: 'string', + description: 'The name of the playlist', + }, + description: { + type: 'string', + description: 'A brief description of the playlist', + }, + }, + }, + }, + }, + }, + AppRockskyPlaylistDefs: { + lexicon: 1, + id: 'app.rocksky.playlist.defs', + defs: { + playlistViewDetailed: { + type: 'object', + description: + 'Detailed view of a playlist, including its tracks and metadata', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the playlist.', + }, + title: { + type: 'string', + description: 'The title of the playlist.', + }, + uri: { + type: 'string', + description: 'The URI of the playlist.', + format: 'at-uri', + }, + curatorDid: { + type: 'string', + description: 'The DID of the curator of the playlist.', + format: 'at-identifier', + }, + curatorHandle: { + type: 'string', + description: 'The handle of the curator of the playlist.', + format: 'at-identifier', + }, + curatorName: { + type: 'string', + description: 'The name of the curator of the playlist.', + }, + curatorAvatarUrl: { + type: 'string', + description: 'The URL of the avatar image of the curator.', + format: 'uri', + }, + description: { + type: 'string', + description: 'A description of the playlist.', + }, + coverImageUrl: { + type: 'string', + description: 'The URL of the cover image for the playlist.', + format: 'uri', + }, + createdAt: { + type: 'string', + description: 'The date and time when the playlist was created.', + format: 'datetime', + }, + tracks: { + type: 'array', + description: 'A list of tracks in the playlist.', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewBasic', + }, + }, + }, + }, + playlistViewBasic: { + type: 'object', + description: 'Basic view of a playlist, including its metadata', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the playlist.', + }, + title: { + type: 'string', + description: 'The title of the playlist.', + }, + uri: { + type: 'string', + description: 'The URI of the playlist.', + format: 'at-uri', + }, + curatorDid: { + type: 'string', + description: 'The DID of the curator of the playlist.', + format: 'at-identifier', + }, + curatorHandle: { + type: 'string', + description: 'The handle of the curator of the playlist.', + format: 'at-identifier', + }, + curatorName: { + type: 'string', + description: 'The name of the curator of the playlist.', + }, + curatorAvatarUrl: { + type: 'string', + description: 'The URL of the avatar image of the curator.', + format: 'uri', + }, + description: { + type: 'string', + description: 'A description of the playlist.', + }, + coverImageUrl: { + type: 'string', + description: 'The URL of the cover image for the playlist.', + format: 'uri', + }, + createdAt: { + type: 'string', + description: 'The date and time when the playlist was created.', + format: 'datetime', + }, + trackCount: { + type: 'integer', + description: 'The number of tracks in the playlist.', + minimum: 0, + }, + }, + }, + }, + }, + AppRockskyPlaylistGetPlaylist: { + lexicon: 1, + id: 'app.rocksky.playlist.getPlaylist', + defs: { + main: { + type: 'query', + description: 'Retrieve a playlist by its ID', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the playlist to retrieve.', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.playlist.defs#playlistViewDetailed', + }, + }, + }, + }, + }, + AppRockskyPlaylistGetPlaylists: { + lexicon: 1, + id: 'app.rocksky.playlist.getPlaylists', + defs: { + main: { + type: 'query', + description: 'Retrieve a list of playlists', + parameters: { + type: 'params', + properties: { + limit: { + type: 'integer', + description: 'The maximum number of playlists to return.', + }, + offset: { + type: 'integer', + description: + 'The offset for pagination, used to skip a number of playlists.', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + playlists: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.playlist.defs#playlistViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyPlaylistInsertDirectory: { + lexicon: 1, + id: 'app.rocksky.playlist.insertDirectory', + defs: { + main: { + type: 'procedure', + description: 'Insert a directory into a playlist', + parameters: { + type: 'params', + required: ['uri', 'directory'], + properties: { + uri: { + type: 'string', + description: 'The URI of the playlist to start', + format: 'at-uri', + }, + directory: { + type: 'string', + description: 'The directory (id) to insert into the playlist', + }, + position: { + type: 'integer', + description: + 'The position in the playlist to insert the directory at, if not specified, the directory will be appended', + }, + }, + }, + }, + }, + }, + AppRockskyPlaylistInsertFiles: { + lexicon: 1, + id: 'app.rocksky.playlist.insertFiles', + defs: { + main: { + type: 'procedure', + description: 'Insert files into a playlist', + parameters: { + type: 'params', + required: ['uri', 'files'], + properties: { + uri: { + type: 'string', + description: 'The URI of the playlist to start', + format: 'at-uri', + }, + files: { + type: 'array', + items: { + type: 'string', + description: 'List of file (id) to insert into the playlist', + }, + }, + position: { + type: 'integer', + description: + 'The position in the playlist to insert the files at, if not specified, files will be appended', + }, + }, + }, + }, + }, + }, + AppRockskyPlaylist: { + lexicon: 1, + id: 'app.rocksky.playlist', + defs: { + main: { + type: 'record', + description: 'A declaration of a playlist.', + key: 'tid', + record: { + type: 'object', + required: ['name', 'createdAt'], + properties: { + name: { + type: 'string', + description: 'The name of the playlist.', + minLength: 1, + maxLength: 512, + }, + description: { + type: 'string', + description: 'The playlist description.', + minLength: 1, + maxLength: 256, + }, + picture: { + type: 'blob', + description: 'The picture of the playlist.', + accept: ['image/png', 'image/jpeg'], + maxSize: 2000000, + }, + tracks: { + type: 'array', + description: 'The tracks in the playlist.', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song#record', + }, + }, + createdAt: { + type: 'string', + description: 'The date the playlist was created.', + format: 'datetime', + }, + spotifyLink: { + type: 'string', + description: 'The Spotify link of the playlist.', + }, + tidalLink: { + type: 'string', + description: 'The Tidal link of the playlist.', + }, + youtubeLink: { + type: 'string', + description: 'The YouTube link of the playlist.', + }, + appleMusicLink: { + type: 'string', + description: 'The Apple Music link of the playlist.', + }, + }, + }, + }, + }, + }, + AppRockskyPlaylistRemovePlaylist: { + lexicon: 1, + id: 'app.rocksky.playlist.removePlaylist', + defs: { + main: { + type: 'procedure', + description: 'Remove a playlist', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the playlist to remove', + format: 'at-uri', + }, + }, + }, + }, + }, + }, + AppRockskyPlaylistRemoveTrack: { + lexicon: 1, + id: 'app.rocksky.playlist.removeTrack', + defs: { + main: { + type: 'procedure', + description: 'Remove a track from a playlist', + parameters: { + type: 'params', + required: ['uri', 'position'], + properties: { + uri: { + type: 'string', + description: 'The URI of the playlist to remove the track from', + format: 'at-uri', + }, + position: { + type: 'integer', + description: + 'The position of the track to remove in the playlist', + }, + }, + }, + }, + }, + }, + AppRockskyPlaylistStartPlaylist: { + lexicon: 1, + id: 'app.rocksky.playlist.startPlaylist', + defs: { + main: { + type: 'procedure', + description: 'Start a playlist', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the playlist to start', + format: 'at-uri', + }, + shuffle: { + type: 'boolean', + description: 'Whether to shuffle the playlist when starting it', + }, + position: { + type: 'integer', + description: + 'The position in the playlist to start from, if not specified, starts from the beginning', + }, + }, + }, + }, + }, + }, + AppRockskyRadioDefs: { + lexicon: 1, + id: 'app.rocksky.radio.defs', + defs: { + radioViewBasic: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the radio.', + }, + name: { + type: 'string', + description: 'The name of the radio.', + }, + description: { + type: 'string', + description: 'A brief description of the radio.', + }, + createdAt: { + type: 'string', + description: 'The date and time when the radio was created.', + format: 'datetime', + }, + }, + }, + radioViewDetailed: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the radio.', + }, + name: { + type: 'string', + description: 'The name of the radio.', + }, + description: { + type: 'string', + description: 'A brief description of the radio.', + }, + website: { + type: 'string', + description: 'The website of the radio.', + format: 'uri', + }, + url: { + type: 'string', + description: 'The streaming URL of the radio.', + format: 'uri', + }, + genre: { + type: 'string', + description: 'The genre of the radio.', + }, + logo: { + type: 'string', + description: 'The logo of the radio station.', + }, + createdAt: { + type: 'string', + description: 'The date and time when the radio was created.', + format: 'datetime', + }, + }, + }, + }, + }, + AppRockskyRadio: { + lexicon: 1, + id: 'app.rocksky.radio', + defs: { + main: { + type: 'record', + description: 'A declaration of a radio station.', + key: 'tid', + record: { + type: 'object', + required: ['name', 'url', 'createdAt'], + properties: { + name: { + type: 'string', + description: 'The name of the radio station.', + minLength: 1, + maxLength: 512, + }, + url: { + type: 'string', + description: 'The URL of the radio station.', + format: 'uri', + }, + description: { + type: 'string', + description: 'A description of the radio station.', + minLength: 1, + maxLength: 1000, + }, + genre: { + type: 'string', + description: 'The genre of the radio station.', + minLength: 1, + maxLength: 256, + }, + logo: { + type: 'blob', + description: 'The logo of the radio station.', + accept: ['image/png', 'image/jpeg'], + maxSize: 2000000, + }, + website: { + type: 'string', + description: 'The website of the radio station.', + format: 'uri', + }, + createdAt: { + type: 'string', + description: 'The date when the radio station was created.', + format: 'datetime', + }, + }, + }, + }, + }, + }, + AppRockskyScrobbleCreateScrobble: { + lexicon: 1, + id: 'app.rocksky.scrobble.createScrobble', + defs: { + main: { + type: 'procedure', + description: 'Create a new scrobble', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['title', 'artist'], + properties: { + title: { + type: 'string', + description: 'The title of the track being scrobbled', + }, + artist: { + type: 'string', + description: 'The artist of the track being scrobbled', + }, + album: { + type: 'string', + description: 'The album of the track being scrobbled', + }, + duration: { + type: 'integer', + description: 'The duration of the track in seconds', + }, + mbId: { + type: 'string', + description: 'The MusicBrainz ID of the track, if available', + }, + albumArt: { + type: 'string', + description: 'The URL of the album art for the track', + format: 'uri', + }, + trackNumber: { + type: 'integer', + description: 'The track number of the track in the album', + }, + releaseDate: { + type: 'string', + description: + 'The release date of the track, formatted as YYYY-MM-DD', + }, + year: { + type: 'integer', + description: 'The year the track was released', + }, + discNumber: { + type: 'integer', + description: + 'The disc number of the track in the album, if applicable', + }, + lyrics: { + type: 'string', + description: 'The lyrics of the track, if available', + }, + composer: { + type: 'string', + description: 'The composer of the track, if available', + }, + copyrightMessage: { + type: 'string', + description: + 'The copyright message for the track, if available', + }, + label: { + type: 'string', + description: 'The record label of the track, if available', + }, + artistPicture: { + type: 'string', + description: "The URL of the artist's picture, if available", + format: 'uri', + }, + spotifyLink: { + type: 'string', + description: 'The Spotify link for the track, if available', + format: 'uri', + }, + lastfmLink: { + type: 'string', + description: 'The Last.fm link for the track, if available', + format: 'uri', + }, + tidalLink: { + type: 'string', + description: 'The Tidal link for the track, if available', + format: 'uri', + }, + appleMusicLink: { + type: 'string', + description: 'The Apple Music link for the track, if available', + format: 'uri', + }, + youtubeLink: { + type: 'string', + description: 'The Youtube link for the track, if available', + format: 'uri', + }, + deezerLink: { + type: 'string', + description: 'The Deezer link for the track, if available', + format: 'uri', + }, + timestamp: { + type: 'integer', + description: + 'The timestamp of the scrobble in milliseconds since epoch', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', + }, + }, + }, + }, + }, + AppRockskyScrobbleDefs: { + lexicon: 1, + id: 'app.rocksky.scrobble.defs', + defs: { + scrobbleViewBasic: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the scrobble.', + }, + user: { + type: 'string', + description: 'The handle of the user who created the scrobble.', + }, + userDisplayName: { + type: 'string', + description: + 'The display name of the user who created the scrobble.', + }, + userAvatar: { + type: 'string', + description: 'The avatar URL of the user who created the scrobble.', + format: 'uri', + }, + title: { + type: 'string', + description: 'The title of the scrobble.', + }, + artist: { + type: 'string', + description: 'The artist of the song.', + }, + artistUri: { + type: 'string', + description: 'The URI of the artist.', + format: 'at-uri', + }, + album: { + type: 'string', + description: 'The album of the song.', + }, + albumUri: { + type: 'string', + description: 'The URI of the album.', + format: 'at-uri', + }, + cover: { + type: 'string', + description: 'The album art URL of the song.', + format: 'uri', + }, + date: { + type: 'string', + description: 'The timestamp when the scrobble was created.', + format: 'datetime', + }, + uri: { + type: 'string', + description: 'The URI of the scrobble.', + format: 'uri', + }, + sha256: { + type: 'string', + description: 'The SHA256 hash of the scrobble data.', + }, + liked: { + type: 'boolean', + }, + likesCount: { + type: 'integer', + }, + }, + }, + scrobbleViewDetailed: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the scrobble.', + }, + user: { + type: 'string', + description: 'The handle of the user who created the scrobble.', + }, + title: { + type: 'string', + description: 'The title of the scrobble.', + }, + artist: { + type: 'string', + description: 'The artist of the song.', + }, + artistUri: { + type: 'string', + description: 'The URI of the artist.', + format: 'at-uri', + }, + album: { + type: 'string', + description: 'The album of the song.', + }, + albumUri: { + type: 'string', + description: 'The URI of the album.', + format: 'at-uri', + }, + cover: { + type: 'string', + description: 'The album art URL of the song.', + format: 'uri', + }, + date: { + type: 'string', + description: 'The timestamp when the scrobble was created.', + format: 'datetime', + }, + uri: { + type: 'string', + description: 'The URI of the scrobble.', + format: 'uri', + }, + sha256: { + type: 'string', + description: 'The SHA256 hash of the scrobble data.', + }, + listeners: { + type: 'integer', + description: 'The number of listeners', + }, + scrobbles: { + type: 'integer', + description: 'The number of scrobbles for this song', + }, + }, + }, + }, + }, + AppRockskyScrobbleGetScrobble: { + lexicon: 1, + id: 'app.rocksky.scrobble.getScrobble', + defs: { + main: { + type: 'query', + description: 'Get a scrobble by its unique identifier', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The unique identifier of the scrobble', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewDetailed', + }, + }, + }, + }, + }, + AppRockskyScrobbleGetScrobbles: { + lexicon: 1, + id: 'app.rocksky.scrobble.getScrobbles', + defs: { + main: { + type: 'query', + description: 'Get scrobbles all scrobbles', + parameters: { + type: 'params', + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + following: { + type: 'boolean', + description: + 'If true, only return scrobbles from actors the viewer is following.', + }, + limit: { + type: 'integer', + description: 'The maximum number of scrobbles to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + scrobbles: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyScrobble: { + lexicon: 1, + id: 'app.rocksky.scrobble', + defs: { + main: { + type: 'record', + description: 'A declaration of a scrobble.', + key: 'tid', + record: { + type: 'object', + required: [ + 'title', + 'artist', + 'album', + 'albumArtist', + 'duration', + 'createdAt', + ], + properties: { + title: { + type: 'string', + description: 'The title of the song.', + minLength: 1, + maxLength: 512, + }, + artist: { + type: 'string', + description: 'The artist of the song.', + minLength: 1, + maxLength: 256, + }, + artists: { + type: 'array', + description: 'The artists of the song with MusicBrainz IDs.', + items: { + type: 'ref', + ref: 'lex:app.rocksky.artist.defs#artistMbid', + }, + }, + albumArtist: { + type: 'string', + description: 'The album artist of the song.', + minLength: 1, + maxLength: 256, + }, + album: { + type: 'string', + description: 'The album of the song.', + minLength: 1, + maxLength: 256, + }, + duration: { + type: 'integer', + description: 'The duration of the song in seconds.', + minimum: 1, + }, + trackNumber: { + type: 'integer', + description: 'The track number of the song in the album.', + minimum: 1, + }, + discNumber: { + type: 'integer', + description: 'The disc number of the song in the album.', + minimum: 1, + }, + releaseDate: { + type: 'string', + description: 'The release date of the song.', + format: 'datetime', + }, + year: { + type: 'integer', + description: 'The year the song was released.', + }, + genre: { + type: 'string', + description: 'The genre of the song.', + maxLength: 256, + }, + tags: { + type: 'array', + description: 'The tags of the song.', + items: { + type: 'string', + minLength: 1, + maxLength: 256, + }, + }, + composer: { + type: 'string', + description: 'The composer of the song.', + maxLength: 256, + }, + lyrics: { + type: 'string', + description: 'The lyrics of the song.', + maxLength: 10000, + }, + copyrightMessage: { + type: 'string', + description: 'The copyright message of the song.', + maxLength: 256, + }, + wiki: { + type: 'string', + description: 'Informations about the song', + maxLength: 10000, + }, + albumArt: { + type: 'blob', + description: 'The album art of the song.', + accept: ['image/png', 'image/jpeg'], + maxSize: 2000000, + }, + albumArtUrl: { + type: 'string', + description: 'The URL of the album art of the song.', + format: 'uri', + }, + youtubeLink: { + type: 'string', + description: 'The YouTube link of the song.', + format: 'uri', + }, + spotifyLink: { + type: 'string', + description: 'The Spotify link of the song.', + format: 'uri', + }, + tidalLink: { + type: 'string', + description: 'The Tidal link of the song.', + format: 'uri', + }, + appleMusicLink: { + type: 'string', + description: 'The Apple Music link of the song.', + format: 'uri', + }, + createdAt: { + type: 'string', + description: 'The date when the song was created.', + format: 'datetime', + }, + mbid: { + type: 'string', + description: 'The MusicBrainz ID of the song.', + }, + label: { + type: 'string', + description: 'The label of the song.', + maxLength: 256, + }, + }, + }, + }, + }, + }, + AppRockskyShoutCreateShout: { + lexicon: 1, + id: 'app.rocksky.shout.createShout', + defs: { + main: { + type: 'procedure', + description: 'Create a new shout', + input: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + message: { + type: 'string', + description: 'The content of the shout', + minLength: 1, + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutView', + }, + }, + }, + }, + }, + AppRockskyShoutDefs: { + lexicon: 1, + id: 'app.rocksky.shout.defs', + defs: { + author: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the author.', + }, + did: { + type: 'string', + description: 'The decentralized identifier (DID) of the author.', + format: 'at-identifier', + }, + handle: { + type: 'string', + description: 'The handle of the author.', + format: 'at-identifier', + }, + displayName: { + type: 'string', + description: 'The display name of the author.', + }, + avatar: { + type: 'string', + description: "The URL of the author's avatar image.", + format: 'uri', + }, + }, + }, + shoutView: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the shout.', + }, + message: { + type: 'string', + description: 'The content of the shout.', + }, + parent: { + type: 'string', + description: + 'The ID of the parent shout if this is a reply, otherwise null.', + }, + createdAt: { + type: 'string', + description: 'The date and time when the shout was created.', + format: 'datetime', + }, + author: { + type: 'ref', + description: 'The author of the shout.', + ref: 'lex:app.rocksky.shout.defs#author', + }, + }, + }, + }, + }, + AppRockskyShoutGetAlbumShouts: { + lexicon: 1, + id: 'app.rocksky.shout.getAlbumShouts', + defs: { + main: { + type: 'query', + description: 'Get shouts for an album', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: + 'The unique identifier of the album to retrieve shouts for', + format: 'at-uri', + }, + limit: { + type: 'integer', + description: 'The maximum number of shouts to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: + 'The number of shouts to skip before starting to collect the result set', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + shouts: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyShoutGetArtistShouts: { + lexicon: 1, + id: 'app.rocksky.shout.getArtistShouts', + defs: { + main: { + type: 'query', + description: 'Get shouts for an artist', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the artist to retrieve shouts for', + format: 'at-uri', + }, + limit: { + type: 'integer', + description: 'The maximum number of shouts to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: + 'The number of shouts to skip before starting to collect the result set', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + shouts: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyShoutGetProfileShouts: { + lexicon: 1, + id: 'app.rocksky.shout.getProfileShouts', + defs: { + main: { + type: 'query', + description: "Get the shouts of an actor's profile", + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the actor', + format: 'at-identifier', + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + limit: { + type: 'integer', + description: 'The maximum number of shouts to return', + minimum: 1, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + shouts: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyShoutGetShoutReplies: { + lexicon: 1, + id: 'app.rocksky.shout.getShoutReplies', + defs: { + main: { + type: 'query', + description: 'Get replies to a shout', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the shout to retrieve replies for', + format: 'at-uri', + }, + limit: { + type: 'integer', + description: 'The maximum number of shouts to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: + 'The number of shouts to skip before starting to collect the result set', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + shouts: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyShoutGetTrackShouts: { + lexicon: 1, + id: 'app.rocksky.shout.getTrackShouts', + defs: { + main: { + type: 'query', + description: 'Get all shouts for a specific track', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The URI of the track to retrieve shouts for', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + shouts: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskyShoutRemoveShout: { + lexicon: 1, + id: 'app.rocksky.shout.removeShout', + defs: { + main: { + type: 'procedure', + description: 'Remove a shout by its ID', + parameters: { + type: 'params', + required: ['id'], + properties: { + id: { + type: 'string', + description: 'The ID of the shout to be removed', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutView', + }, + }, + }, + }, + }, + AppRockskyShoutReplyShout: { + lexicon: 1, + id: 'app.rocksky.shout.replyShout', + defs: { + main: { + type: 'procedure', + description: 'Reply to a shout', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['shoutId', 'message'], + properties: { + shoutId: { + type: 'string', + description: 'The unique identifier of the shout to reply to', + }, + message: { + type: 'string', + description: 'The content of the reply', + minLength: 1, + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutView', + }, + }, + }, + }, + }, + AppRockskyShoutReportShout: { + lexicon: 1, + id: 'app.rocksky.shout.reportShout', + defs: { + main: { + type: 'procedure', + description: 'Report a shout for moderation', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['shoutId'], + properties: { + shoutId: { + type: 'string', + description: 'The unique identifier of the shout to report', + }, + reason: { + type: 'string', + description: 'The reason for reporting the shout', + minLength: 1, + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.shout.defs#shoutView', + }, + }, + }, + }, + }, + AppRockskyShout: { + lexicon: 1, + id: 'app.rocksky.shout', + defs: { + main: { + type: 'record', + description: 'A declaration of a shout.', + key: 'tid', + record: { + type: 'object', + required: ['message', 'createdAt', 'subject'], + properties: { + message: { + type: 'string', + description: 'The message of the shout.', + minLength: 1, + maxLength: 1000, + }, + createdAt: { + type: 'string', + description: 'The date when the shout was created.', + format: 'datetime', + }, + parent: { + type: 'ref', + ref: 'lex:com.atproto.repo.strongRef', + }, + subject: { + type: 'ref', + ref: 'lex:com.atproto.repo.strongRef', + }, + }, + }, + }, + }, + }, + AppRockskySongCreateSong: { + lexicon: 1, + id: 'app.rocksky.song.createSong', + defs: { + main: { + type: 'procedure', + description: 'Create a new song', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['title', 'artist', 'album', 'albumArtist'], + properties: { + title: { + type: 'string', + description: 'The title of the song', + }, + artist: { + type: 'string', + description: 'The artist of the song', + }, + albumArtist: { + type: 'string', + description: + 'The album artist of the song, if different from the main artist', + }, + album: { + type: 'string', + description: 'The album of the song, if applicable', + }, + duration: { + type: 'integer', + description: 'The duration of the song in seconds', + }, + mbId: { + type: 'string', + description: 'The MusicBrainz ID of the song, if available', + }, + albumArt: { + type: 'string', + description: 'The URL of the album art for the song', + format: 'uri', + }, + trackNumber: { + type: 'integer', + description: + 'The track number of the song in the album, if applicable', + }, + releaseDate: { + type: 'string', + description: + 'The release date of the song, formatted as YYYY-MM-DD', + }, + year: { + type: 'integer', + description: 'The year the song was released', + }, + discNumber: { + type: 'integer', + description: + 'The disc number of the song in the album, if applicable', + }, + lyrics: { + type: 'string', + description: 'The lyrics of the song, if available', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewDetailed', + }, + }, + }, + }, + }, + AppRockskySongDefs: { + lexicon: 1, + id: 'app.rocksky.song.defs', + defs: { + songViewBasic: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the song.', + }, + title: { + type: 'string', + description: 'The title of the song.', + }, + artist: { + type: 'string', + description: 'The artist of the song.', + }, + albumArtist: { + type: 'string', + description: 'The artist of the album the song belongs to.', + }, + albumArt: { + type: 'string', + description: 'The URL of the album art image.', + format: 'uri', + }, + uri: { + type: 'string', + description: 'The URI of the song.', + format: 'at-uri', + }, + album: { + type: 'string', + description: 'The album of the song.', + }, + duration: { + type: 'integer', + description: 'The duration of the song in milliseconds.', + }, + trackNumber: { + type: 'integer', + description: 'The track number of the song in the album.', + }, + discNumber: { + type: 'integer', + description: 'The disc number of the song in the album.', + }, + playCount: { + type: 'integer', + description: 'The number of times the song has been played.', + minimum: 0, + }, + uniqueListeners: { + type: 'integer', + description: + 'The number of unique listeners who have played the song.', + minimum: 0, + }, + albumUri: { + type: 'string', + description: 'The URI of the album the song belongs to.', + format: 'at-uri', + }, + artistUri: { + type: 'string', + description: 'The URI of the artist of the song.', + format: 'at-uri', + }, + sha256: { + type: 'string', + description: 'The SHA256 hash of the song.', + }, + createdAt: { + type: 'string', + description: 'The timestamp when the song was created.', + format: 'datetime', + }, + }, + }, + songViewDetailed: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the song.', + }, + title: { + type: 'string', + description: 'The title of the song.', + }, + artist: { + type: 'string', + description: 'The artist of the song.', + }, + albumArtist: { + type: 'string', + description: 'The artist of the album the song belongs to.', + }, + albumArt: { + type: 'string', + description: 'The URL of the album art image.', + format: 'uri', + }, + uri: { + type: 'string', + description: 'The URI of the song.', + format: 'at-uri', + }, + album: { + type: 'string', + description: 'The album of the song.', + }, + duration: { + type: 'integer', + description: 'The duration of the song in milliseconds.', + }, + trackNumber: { + type: 'integer', + description: 'The track number of the song in the album.', + }, + discNumber: { + type: 'integer', + description: 'The disc number of the song in the album.', + }, + playCount: { + type: 'integer', + description: 'The number of times the song has been played.', + minimum: 0, + }, + uniqueListeners: { + type: 'integer', + description: + 'The number of unique listeners who have played the song.', + minimum: 0, + }, + albumUri: { + type: 'string', + description: 'The URI of the album the song belongs to.', + format: 'at-uri', + }, + artistUri: { + type: 'string', + description: 'The URI of the artist of the song.', + format: 'at-uri', + }, + sha256: { + type: 'string', + description: 'The SHA256 hash of the song.', + }, + createdAt: { + type: 'string', + description: 'The timestamp when the song was created.', + format: 'datetime', + }, + }, + }, + }, + }, + AppRockskySongGetSong: { + lexicon: 1, + id: 'app.rocksky.song.getSong', + defs: { + main: { + type: 'query', + description: 'Get a song by its uri', + parameters: { + type: 'params', + required: ['uri'], + properties: { + uri: { + type: 'string', + description: 'The unique identifier of the song to retrieve', + format: 'at-uri', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewDetailed', + }, + }, + }, + }, + }, + AppRockskySongGetSongs: { + lexicon: 1, + id: 'app.rocksky.song.getSongs', + defs: { + main: { + type: 'query', + description: 'Get songs', + parameters: { + type: 'params', + properties: { + limit: { + type: 'integer', + description: 'The maximum number of songs to return', + minimum: 1, + }, + offset: { + type: 'integer', + description: 'The offset for pagination', + minimum: 0, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: { + songs: { + type: 'array', + items: { + type: 'ref', + ref: 'lex:app.rocksky.song.defs#songViewBasic', + }, + }, + }, + }, + }, + }, + }, + }, + AppRockskySong: { + lexicon: 1, + id: 'app.rocksky.song', + defs: { + main: { + type: 'record', + description: 'A declaration of a song.', + key: 'tid', + record: { + type: 'object', + required: [ + 'title', + 'artist', + 'album', + 'albumArtist', + 'duration', + 'createdAt', + ], + properties: { + title: { + type: 'string', + description: 'The title of the song.', + minLength: 1, + maxLength: 512, + }, + artist: { + type: 'string', + description: 'The artist of the song.', + minLength: 1, + maxLength: 256, + }, + artists: { + type: 'array', + description: 'The artists of the song with MusicBrainz IDs.', + items: { + type: 'ref', + ref: 'lex:app.rocksky.artist.defs#artistMbid', + }, + }, + albumArtist: { + type: 'string', + description: 'The album artist of the song.', + minLength: 1, + maxLength: 256, + }, + album: { + type: 'string', + description: 'The album of the song.', + minLength: 1, + maxLength: 256, + }, + duration: { + type: 'integer', + description: 'The duration of the song in seconds.', + minimum: 1, + }, + trackNumber: { + type: 'integer', + description: 'The track number of the song in the album.', + minimum: 1, + }, + discNumber: { + type: 'integer', + description: 'The disc number of the song in the album.', + minimum: 1, + }, + releaseDate: { + type: 'string', + description: 'The release date of the song.', + format: 'datetime', + }, + year: { + type: 'integer', + description: 'The year the song was released.', + }, + genre: { + type: 'string', + description: 'The genre of the song.', + minLength: 1, + maxLength: 256, + }, + tags: { + type: 'array', + description: 'The tags of the song.', + items: { + type: 'string', + minLength: 1, + maxLength: 256, + }, + }, + composer: { + type: 'string', + description: 'The composer of the song.', + maxLength: 256, + }, + lyrics: { + type: 'string', + description: 'The lyrics of the song.', + maxLength: 10000, + }, + copyrightMessage: { + type: 'string', + description: 'The copyright message of the song.', + maxLength: 256, + }, + wiki: { + type: 'string', + description: 'Informations about the song', + maxLength: 10000, + }, + albumArt: { + type: 'blob', + description: 'The album art of the song.', + accept: ['image/png', 'image/jpeg'], + maxSize: 2000000, + }, + albumArtUrl: { + type: 'string', + description: 'The URL of the album art of the song.', + format: 'uri', + }, + youtubeLink: { + type: 'string', + description: 'The YouTube link of the song.', + format: 'uri', + }, + spotifyLink: { + type: 'string', + description: 'The Spotify link of the song.', + format: 'uri', + }, + tidalLink: { + type: 'string', + description: 'The Tidal link of the song.', + format: 'uri', + }, + appleMusicLink: { + type: 'string', + description: 'The Apple Music link of the song.', + format: 'uri', + }, + createdAt: { + type: 'string', + description: 'The date when the song was created.', + format: 'datetime', + }, + mbid: { + type: 'string', + description: 'The MusicBrainz ID of the song.', + }, + label: { + type: 'string', + description: 'The label of the song.', + maxLength: 256, + }, + }, + }, + }, + }, + }, + AppRockskySpotifyDefs: { + lexicon: 1, + id: 'app.rocksky.spotify.defs', + defs: { + spotifyTrackView: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'The unique identifier of the Spotify track.', + }, + name: { + type: 'string', + description: 'The name of the track.', + }, + artist: { + type: 'string', + description: 'The name of the artist.', + }, + album: { + type: 'string', + description: 'The name of the album.', + }, + duration: { + type: 'integer', + description: 'The duration of the track in milliseconds.', + }, + previewUrl: { + type: 'string', + description: 'A URL to a preview of the track.', + }, + }, + }, + }, + }, + AppRockskySpotifyGetCurrentlyPlaying: { + lexicon: 1, + id: 'app.rocksky.spotify.getCurrentlyPlaying', + defs: { + main: { + type: 'query', + description: 'Get the currently playing track', + parameters: { + type: 'params', + properties: { + actor: { + type: 'string', + description: + 'Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.', + format: 'at-identifier', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.player.defs#currentlyPlayingViewDetailed', + }, + }, + }, + }, + }, + AppRockskySpotifyNext: { + lexicon: 1, + id: 'app.rocksky.spotify.next', + defs: { + main: { + type: 'procedure', + description: 'Play the next track in the queue', + }, + }, + }, + AppRockskySpotifyPause: { + lexicon: 1, + id: 'app.rocksky.spotify.pause', + defs: { + main: { + type: 'procedure', + description: 'Pause the currently playing track', + }, + }, + }, + AppRockskySpotifyPlay: { + lexicon: 1, + id: 'app.rocksky.spotify.play', + defs: { + main: { + type: 'procedure', + description: 'Resume playback of the currently paused track', + }, + }, + }, + AppRockskySpotifyPrevious: { + lexicon: 1, + id: 'app.rocksky.spotify.previous', + defs: { + main: { + type: 'procedure', + description: 'Play the previous track in the queue', + }, + }, + }, + AppRockskySpotifySeek: { + lexicon: 1, + id: 'app.rocksky.spotify.seek', + defs: { + main: { + type: 'procedure', + description: + 'Seek to a specific position in the currently playing track', + parameters: { + type: 'params', + required: ['position'], + properties: { + position: { + type: 'integer', + description: 'The position in seconds to seek to', + }, + }, + }, + }, + }, + }, + AppRockskyStatsDefs: { + lexicon: 1, + id: 'app.rocksky.stats.defs', + defs: { + statsView: { + type: 'object', + properties: { + scrobbles: { + type: 'integer', + description: 'The total number of scrobbles.', + }, + artists: { + type: 'integer', + description: 'The total number of unique artists scrobbled.', + }, + lovedTracks: { + type: 'integer', + description: 'The total number of tracks marked as loved.', + }, + albums: { + type: 'integer', + description: 'The total number of unique albums scrobbled.', + }, + tracks: { + type: 'integer', + description: 'The total number of unique tracks scrobbled.', + }, + }, + }, + }, + }, + AppRockskyStatsGetStats: { + lexicon: 1, + id: 'app.rocksky.stats.getStats', + defs: { + main: { + type: 'query', + parameters: { + type: 'params', + required: ['did'], + properties: { + did: { + type: 'string', + description: 'The DID or handle of the user to get stats for.', + format: 'at-identifier', + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'ref', + ref: 'lex:app.rocksky.stats.defs#statsView', + }, + }, + }, + }, + }, + ComAtprotoRepoStrongRef: { + lexicon: 1, + id: 'com.atproto.repo.strongRef', + description: 'A URI with a content-hash fingerprint.', + defs: { + main: { + type: 'object', + required: ['uri', 'cid'], + properties: { + uri: { + type: 'string', + format: 'at-uri', + }, + cid: { + type: 'string', + format: 'cid', + }, + }, + }, + }, + }, +} as const satisfies Record + +export const schemas = Object.values(schemaDict) +export const lexicons: Lexicons = new Lexicons(schemas) +export const ids = { + AppRockskyActorDefs: 'app.rocksky.actor.defs', + AppRockskyActorGetActorAlbums: 'app.rocksky.actor.getActorAlbums', + AppRockskyActorGetActorArtists: 'app.rocksky.actor.getActorArtists', + AppRockskyActorGetActorCompatibility: + 'app.rocksky.actor.getActorCompatibility', + AppRockskyActorGetActorLovedSongs: 'app.rocksky.actor.getActorLovedSongs', + AppRockskyActorGetActorNeighbours: 'app.rocksky.actor.getActorNeighbours', + AppRockskyActorGetActorPlaylists: 'app.rocksky.actor.getActorPlaylists', + AppRockskyActorGetActorScrobbles: 'app.rocksky.actor.getActorScrobbles', + AppRockskyActorGetActorSongs: 'app.rocksky.actor.getActorSongs', + AppRockskyActorGetProfile: 'app.rocksky.actor.getProfile', + AppBskyActorProfile: 'app.bsky.actor.profile', + AppRockskyAlbum: 'app.rocksky.album', + AppRockskyAlbumDefs: 'app.rocksky.album.defs', + AppRockskyAlbumGetAlbum: 'app.rocksky.album.getAlbum', + AppRockskyAlbumGetAlbums: 'app.rocksky.album.getAlbums', + AppRockskyAlbumGetAlbumTracks: 'app.rocksky.album.getAlbumTracks', + AppRockskyApikeyCreateApikey: 'app.rocksky.apikey.createApikey', + AppRockskyApikeyDefs: 'app.rocksky.apikey.defs', + AppRockskyApikeysDefs: 'app.rocksky.apikeys.defs', + AppRockskyApikeyGetApikeys: 'app.rocksky.apikey.getApikeys', + AppRockskyApikeyRemoveApikey: 'app.rocksky.apikey.removeApikey', + AppRockskyApikeyUpdateApikey: 'app.rocksky.apikey.updateApikey', + AppRockskyArtist: 'app.rocksky.artist', + AppRockskyArtistDefs: 'app.rocksky.artist.defs', + AppRockskyArtistGetArtist: 'app.rocksky.artist.getArtist', + AppRockskyArtistGetArtistAlbums: 'app.rocksky.artist.getArtistAlbums', + AppRockskyArtistGetArtistListeners: 'app.rocksky.artist.getArtistListeners', + AppRockskyArtistGetArtists: 'app.rocksky.artist.getArtists', + AppRockskyArtistGetArtistTracks: 'app.rocksky.artist.getArtistTracks', + AppRockskyChartsDefs: 'app.rocksky.charts.defs', + AppRockskyChartsGetScrobblesChart: 'app.rocksky.charts.getScrobblesChart', + AppRockskyDropboxDefs: 'app.rocksky.dropbox.defs', + AppRockskyDropboxDownloadFile: 'app.rocksky.dropbox.downloadFile', + AppRockskyDropboxGetFiles: 'app.rocksky.dropbox.getFiles', + AppRockskyDropboxGetMetadata: 'app.rocksky.dropbox.getMetadata', + AppRockskyDropboxGetTemporaryLink: 'app.rocksky.dropbox.getTemporaryLink', + AppRockskyFeedDefs: 'app.rocksky.feed.defs', + AppRockskyFeedDescribeFeedGenerator: 'app.rocksky.feed.describeFeedGenerator', + AppRockskyFeedGenerator: 'app.rocksky.feed.generator', + AppRockskyFeedGetFeed: 'app.rocksky.feed.getFeed', + AppRockskyFeedGetFeedGenerator: 'app.rocksky.feed.getFeedGenerator', + AppRockskyFeedGetFeedGenerators: 'app.rocksky.feed.getFeedGenerators', + AppRockskyFeedGetFeedSkeleton: 'app.rocksky.feed.getFeedSkeleton', + AppRockskyFeedGetNowPlayings: 'app.rocksky.feed.getNowPlayings', + AppRockskyFeedSearch: 'app.rocksky.feed.search', + AppRockskyGoogledriveDefs: 'app.rocksky.googledrive.defs', + AppRockskyGoogledriveDownloadFile: 'app.rocksky.googledrive.downloadFile', + AppRockskyGoogledriveGetFile: 'app.rocksky.googledrive.getFile', + AppRockskyGoogledriveGetFiles: 'app.rocksky.googledrive.getFiles', + AppRockskyGraphDefs: 'app.rocksky.graph.defs', + AppRockskyGraphFollow: 'app.rocksky.graph.follow', + AppRockskyGraphFollowAccount: 'app.rocksky.graph.followAccount', + AppRockskyGraphGetFollowers: 'app.rocksky.graph.getFollowers', + AppRockskyGraphGetFollows: 'app.rocksky.graph.getFollows', + AppRockskyGraphGetKnownFollowers: 'app.rocksky.graph.getKnownFollowers', + AppRockskyGraphUnfollowAccount: 'app.rocksky.graph.unfollowAccount', + AppRockskyLikeDislikeShout: 'app.rocksky.like.dislikeShout', + AppRockskyLikeDislikeSong: 'app.rocksky.like.dislikeSong', + AppRockskyLike: 'app.rocksky.like', + AppRockskyLikeLikeShout: 'app.rocksky.like.likeShout', + AppRockskyLikeLikeSong: 'app.rocksky.like.likeSong', + AppRockskyPlayerAddDirectoryToQueue: 'app.rocksky.player.addDirectoryToQueue', + AppRockskyPlayerAddItemsToQueue: 'app.rocksky.player.addItemsToQueue', + AppRockskyPlayerDefs: 'app.rocksky.player.defs', + AppRockskyPlayerGetCurrentlyPlaying: 'app.rocksky.player.getCurrentlyPlaying', + AppRockskyPlayerGetPlaybackQueue: 'app.rocksky.player.getPlaybackQueue', + AppRockskyPlayerNext: 'app.rocksky.player.next', + AppRockskyPlayerPause: 'app.rocksky.player.pause', + AppRockskyPlayerPlay: 'app.rocksky.player.play', + AppRockskyPlayerPlayDirectory: 'app.rocksky.player.playDirectory', + AppRockskyPlayerPlayFile: 'app.rocksky.player.playFile', + AppRockskyPlayerPrevious: 'app.rocksky.player.previous', + AppRockskyPlayerSeek: 'app.rocksky.player.seek', + AppRockskyPlaylistCreatePlaylist: 'app.rocksky.playlist.createPlaylist', + AppRockskyPlaylistDefs: 'app.rocksky.playlist.defs', + AppRockskyPlaylistGetPlaylist: 'app.rocksky.playlist.getPlaylist', + AppRockskyPlaylistGetPlaylists: 'app.rocksky.playlist.getPlaylists', + AppRockskyPlaylistInsertDirectory: 'app.rocksky.playlist.insertDirectory', + AppRockskyPlaylistInsertFiles: 'app.rocksky.playlist.insertFiles', + AppRockskyPlaylist: 'app.rocksky.playlist', + AppRockskyPlaylistRemovePlaylist: 'app.rocksky.playlist.removePlaylist', + AppRockskyPlaylistRemoveTrack: 'app.rocksky.playlist.removeTrack', + AppRockskyPlaylistStartPlaylist: 'app.rocksky.playlist.startPlaylist', + AppRockskyRadioDefs: 'app.rocksky.radio.defs', + AppRockskyRadio: 'app.rocksky.radio', + AppRockskyScrobbleCreateScrobble: 'app.rocksky.scrobble.createScrobble', + AppRockskyScrobbleDefs: 'app.rocksky.scrobble.defs', + AppRockskyScrobbleGetScrobble: 'app.rocksky.scrobble.getScrobble', + AppRockskyScrobbleGetScrobbles: 'app.rocksky.scrobble.getScrobbles', + AppRockskyScrobble: 'app.rocksky.scrobble', + AppRockskyShoutCreateShout: 'app.rocksky.shout.createShout', + AppRockskyShoutDefs: 'app.rocksky.shout.defs', + AppRockskyShoutGetAlbumShouts: 'app.rocksky.shout.getAlbumShouts', + AppRockskyShoutGetArtistShouts: 'app.rocksky.shout.getArtistShouts', + AppRockskyShoutGetProfileShouts: 'app.rocksky.shout.getProfileShouts', + AppRockskyShoutGetShoutReplies: 'app.rocksky.shout.getShoutReplies', + AppRockskyShoutGetTrackShouts: 'app.rocksky.shout.getTrackShouts', + AppRockskyShoutRemoveShout: 'app.rocksky.shout.removeShout', + AppRockskyShoutReplyShout: 'app.rocksky.shout.replyShout', + AppRockskyShoutReportShout: 'app.rocksky.shout.reportShout', + AppRockskyShout: 'app.rocksky.shout', + AppRockskySongCreateSong: 'app.rocksky.song.createSong', + AppRockskySongDefs: 'app.rocksky.song.defs', + AppRockskySongGetSong: 'app.rocksky.song.getSong', + AppRockskySongGetSongs: 'app.rocksky.song.getSongs', + AppRockskySong: 'app.rocksky.song', + AppRockskySpotifyDefs: 'app.rocksky.spotify.defs', + AppRockskySpotifyGetCurrentlyPlaying: + 'app.rocksky.spotify.getCurrentlyPlaying', + AppRockskySpotifyNext: 'app.rocksky.spotify.next', + AppRockskySpotifyPause: 'app.rocksky.spotify.pause', + AppRockskySpotifyPlay: 'app.rocksky.spotify.play', + AppRockskySpotifyPrevious: 'app.rocksky.spotify.previous', + AppRockskySpotifySeek: 'app.rocksky.spotify.seek', + AppRockskyStatsDefs: 'app.rocksky.stats.defs', + AppRockskyStatsGetStats: 'app.rocksky.stats.getStats', + ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef', +} diff --git a/apps/cli/src/lexicon/types/app/bsky/actor/profile.ts b/apps/cli/src/lexicon/types/app/bsky/actor/profile.ts new file mode 100644 index 00000000..9fd9b737 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/bsky/actor/profile.ts @@ -0,0 +1,38 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' +import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' + +export interface Record { + displayName?: string + /** Free-form profile description text. */ + description?: string + /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ + avatar?: BlobRef + /** Larger horizontal image to display behind profile view. */ + banner?: BlobRef + labels?: + | ComAtprotoLabelDefs.SelfLabels + | { $type: string; [k: string]: unknown } + joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main + createdAt?: string + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.bsky.actor.profile#main' || + v.$type === 'app.bsky.actor.profile') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.bsky.actor.profile#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/defs.ts new file mode 100644 index 00000000..c3d931f8 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/defs.ts @@ -0,0 +1,146 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import * as AppRockskyArtistDefs from '../artist/defs' + +export interface ProfileViewDetailed { + /** The unique identifier of the actor. */ + id?: string + /** The DID of the actor. */ + did?: string + /** The handle of the actor. */ + handle?: string + /** The display name of the actor. */ + displayName?: string + /** The URL of the actor's avatar image. */ + avatar?: string + /** The date and time when the actor was created. */ + createdAt?: string + /** The date and time when the actor was last updated. */ + updatedAt?: string + [k: string]: unknown +} + +export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.actor.defs#profileViewDetailed' + ) +} + +export function validateProfileViewDetailed(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.actor.defs#profileViewDetailed', v) +} + +export interface ProfileViewBasic { + /** The unique identifier of the actor. */ + id?: string + /** The DID of the actor. */ + did?: string + /** The handle of the actor. */ + handle?: string + /** The display name of the actor. */ + displayName?: string + /** The URL of the actor's avatar image. */ + avatar?: string + /** The date and time when the actor was created. */ + createdAt?: string + /** The date and time when the actor was last updated. */ + updatedAt?: string + [k: string]: unknown +} + +export function isProfileViewBasic(v: unknown): v is ProfileViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.actor.defs#profileViewBasic' + ) +} + +export function validateProfileViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.actor.defs#profileViewBasic', v) +} + +export interface NeighbourViewBasic { + userId?: string + did?: string + handle?: string + displayName?: string + /** The URL of the actor's avatar image. */ + avatar?: string + /** The number of artists shared with the actor. */ + sharedArtistsCount?: number + /** The similarity score with the actor. */ + similarityScore?: number + /** The top shared artist names with the actor. */ + topSharedArtistNames?: string[] + /** The top shared artist details with the actor. */ + topSharedArtistsDetails?: AppRockskyArtistDefs.ArtistViewBasic[] + [k: string]: unknown +} + +export function isNeighbourViewBasic(v: unknown): v is NeighbourViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.actor.defs#neighbourViewBasic' + ) +} + +export function validateNeighbourViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.actor.defs#neighbourViewBasic', v) +} + +export interface CompatibilityViewBasic { + compatibilityLevel?: number + compatibilityPercentage?: number + sharedArtists?: number + topSharedArtistNames?: string[] + topSharedDetailedArtists?: ArtistViewBasic[] + user1ArtistCount?: number + user2ArtistCount?: number + [k: string]: unknown +} + +export function isCompatibilityViewBasic( + v: unknown, +): v is CompatibilityViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.actor.defs#compatibilityViewBasic' + ) +} + +export function validateCompatibilityViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.actor.defs#compatibilityViewBasic', v) +} + +export interface ArtistViewBasic { + id?: string + name?: string + picture?: string + uri?: string + user1Rank?: number + user2Rank?: number + weight?: number + [k: string]: unknown +} + +export function isArtistViewBasic(v: unknown): v is ArtistViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.actor.defs#artistViewBasic' + ) +} + +export function validateArtistViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.actor.defs#artistViewBasic', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts new file mode 100644 index 00000000..d1260883 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts @@ -0,0 +1,56 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyAlbumDefs from '../album/defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did: string + /** The maximum number of albums to return */ + limit?: number + /** The offset for pagination */ + offset?: number + /** The start date to filter albums from (ISO 8601 format) */ + startDate?: string + /** The end date to filter albums to (ISO 8601 format) */ + endDate?: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + albums?: AppRockskyAlbumDefs.AlbumViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getActorArtists.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorArtists.ts new file mode 100644 index 00000000..aff66110 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorArtists.ts @@ -0,0 +1,56 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyArtistDefs from '../artist/defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did: string + /** The maximum number of albums to return */ + limit?: number + /** The offset for pagination */ + offset?: number + /** The start date to filter albums from (ISO 8601 format) */ + startDate?: string + /** The end date to filter albums to (ISO 8601 format) */ + endDate?: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + artists?: AppRockskyArtistDefs.ArtistViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getActorCompatibility.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorCompatibility.ts new file mode 100644 index 00000000..7ca39fb5 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorCompatibility.ts @@ -0,0 +1,48 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyActorDefs from './defs' + +export interface QueryParams { + /** DID or handle to get compatibility for */ + did: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + compatibility?: AppRockskyActorDefs.CompatibilityViewBasic + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts new file mode 100644 index 00000000..cc1a8128 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from '../song/defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did: string + /** The maximum number of albums to return */ + limit?: number + /** The offset for pagination */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + tracks?: AppRockskySongDefs.SongViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getActorNeighbours.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorNeighbours.ts new file mode 100644 index 00000000..4d701cf6 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorNeighbours.ts @@ -0,0 +1,48 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyActorDefs from './defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + neighbours?: AppRockskyActorDefs.NeighbourViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts new file mode 100644 index 00000000..8efd9ec3 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyPlaylistDefs from '../playlist/defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did: string + /** The maximum number of albums to return */ + limit?: number + /** The offset for pagination */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts new file mode 100644 index 00000000..f16bfaee --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyScrobbleDefs from '../scrobble/defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did: string + /** The maximum number of albums to return */ + limit?: number + /** The offset for pagination */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getActorSongs.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorSongs.ts new file mode 100644 index 00000000..545435cb --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getActorSongs.ts @@ -0,0 +1,56 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from '../song/defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did: string + /** The maximum number of albums to return */ + limit?: number + /** The offset for pagination */ + offset?: number + /** The start date to filter albums from (ISO 8601 format) */ + startDate?: string + /** The end date to filter albums to (ISO 8601 format) */ + endDate?: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + songs?: AppRockskySongDefs.SongViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/actor/getProfile.ts b/apps/cli/src/lexicon/types/app/rocksky/actor/getProfile.ts new file mode 100644 index 00000000..3b2e62fe --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/actor/getProfile.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyActorDefs from './defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did?: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyActorDefs.ProfileViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/album.ts b/apps/cli/src/lexicon/types/app/rocksky/album.ts new file mode 100644 index 00000000..3cb27ffd --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/album.ts @@ -0,0 +1,51 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../lexicons' +import { isObj, hasProp } from '../../../util' +import { CID } from 'multiformats/cid' + +export interface Record { + /** The title of the album. */ + title: string + /** The artist of the album. */ + artist: string + /** The duration of the album in seconds. */ + duration?: number + /** The release date of the album. */ + releaseDate?: string + /** The year the album was released. */ + year?: number + /** The genre of the album. */ + genre?: string + /** The album art of the album. */ + albumArt?: BlobRef + /** The URL of the album art of the album. */ + albumArtUrl?: string + /** The tags of the album. */ + tags?: string[] + /** The YouTube link of the album. */ + youtubeLink?: string + /** The Spotify link of the album. */ + spotifyLink?: string + /** The tidal link of the album. */ + tidalLink?: string + /** The Apple Music link of the album. */ + appleMusicLink?: string + /** The date and time when the album was created. */ + createdAt: string + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.album#main' || v.$type === 'app.rocksky.album') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.album#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/album/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/album/defs.ts new file mode 100644 index 00000000..43b0a717 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/album/defs.ts @@ -0,0 +1,85 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import * as AppRockskySongDefsSongViewBasic from '../song/defs/songViewBasic' + +export interface AlbumViewBasic { + /** The unique identifier of the album. */ + id?: string + /** The URI of the album. */ + uri?: string + /** The title of the album. */ + title?: string + /** The artist of the album. */ + artist?: string + /** The URI of the album's artist. */ + artistUri?: string + /** The year the album was released. */ + year?: number + /** The URL of the album art image. */ + albumArt?: string + /** The release date of the album. */ + releaseDate?: string + /** The SHA256 hash of the album. */ + sha256?: string + /** The number of times the album has been played. */ + playCount?: number + /** The number of unique listeners who have played the album. */ + uniqueListeners?: number + [k: string]: unknown +} + +export function isAlbumViewBasic(v: unknown): v is AlbumViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.album.defs#albumViewBasic' + ) +} + +export function validateAlbumViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.album.defs#albumViewBasic', v) +} + +export interface AlbumViewDetailed { + /** The unique identifier of the album. */ + id?: string + /** The URI of the album. */ + uri?: string + /** The title of the album. */ + title?: string + /** The artist of the album. */ + artist?: string + /** The URI of the album's artist. */ + artistUri?: string + /** The year the album was released. */ + year?: number + /** The URL of the album art image. */ + albumArt?: string + /** The release date of the album. */ + releaseDate?: string + /** The SHA256 hash of the album. */ + sha256?: string + /** The number of times the album has been played. */ + playCount?: number + /** The number of unique listeners who have played the album. */ + uniqueListeners?: number + tracks?: AppRockskySongDefsSongViewBasic.Main[] + [k: string]: unknown +} + +export function isAlbumViewDetailed(v: unknown): v is AlbumViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.album.defs#albumViewDetailed' + ) +} + +export function validateAlbumViewDetailed(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.album.defs#albumViewDetailed', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/album/getAlbum.ts b/apps/cli/src/lexicon/types/app/rocksky/album/getAlbum.ts new file mode 100644 index 00000000..89f0be90 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/album/getAlbum.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyAlbumDefs from './defs' + +export interface QueryParams { + /** The URI of the album to retrieve. */ + uri: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyAlbumDefs.AlbumViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts b/apps/cli/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts new file mode 100644 index 00000000..3a32b5bc --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts @@ -0,0 +1,48 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from '../song/defs' + +export interface QueryParams { + /** The URI of the album to retrieve tracks from */ + uri: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + tracks?: AppRockskySongDefs.SongViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/album/getAlbums.ts b/apps/cli/src/lexicon/types/app/rocksky/album/getAlbums.ts new file mode 100644 index 00000000..3b914f80 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/album/getAlbums.ts @@ -0,0 +1,50 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyAlbumDefs from './defs' + +export interface QueryParams { + /** The maximum number of albums to return */ + limit?: number + /** The offset for pagination */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + albums?: AppRockskyAlbumDefs.AlbumViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/apikey/createApikey.ts b/apps/cli/src/lexicon/types/app/rocksky/apikey/createApikey.ts new file mode 100644 index 00000000..68490540 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/apikey/createApikey.ts @@ -0,0 +1,51 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyApikeyDefs from './defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The name of the API key. */ + name: string + /** A description for the API key. */ + description?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskyApikeyDefs.ApiKey + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/apikey/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/apikey/defs.ts new file mode 100644 index 00000000..5ff984d9 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/apikey/defs.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface ApiKeyView { + /** The unique identifier of the API key. */ + id?: string + /** The name of the API key. */ + name?: string + /** A description for the API key. */ + description?: string + /** The date and time when the API key was created. */ + createdAt?: string + [k: string]: unknown +} + +export function isApiKeyView(v: unknown): v is ApiKeyView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.apikey.defs#apiKeyView' + ) +} + +export function validateApiKeyView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.apikey.defs#apiKeyView', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/apikey/getApikeys.ts b/apps/cli/src/lexicon/types/app/rocksky/apikey/getApikeys.ts new file mode 100644 index 00000000..f0429569 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/apikey/getApikeys.ts @@ -0,0 +1,50 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyApikeyDefs from './defs' + +export interface QueryParams { + /** The number of API keys to skip before starting to collect the result set. */ + offset?: number + /** The number of API keys to return per page. */ + limit?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + apiKeys?: AppRockskyApikeyDefs.ApikeyView[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/apikey/removeApikey.ts b/apps/cli/src/lexicon/types/app/rocksky/apikey/removeApikey.ts new file mode 100644 index 00000000..3ec6a1c0 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/apikey/removeApikey.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyApikeyDefs from './defs' + +export interface QueryParams { + /** The ID of the API key to remove. */ + id: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyApikeyDefs.ApiKey +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/apikey/updateApikey.ts b/apps/cli/src/lexicon/types/app/rocksky/apikey/updateApikey.ts new file mode 100644 index 00000000..46ccc6cd --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/apikey/updateApikey.ts @@ -0,0 +1,53 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyApikeyDefs from './defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The ID of the API key to update. */ + id: string + /** The new name of the API key. */ + name: string + /** A new description for the API key. */ + description?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskyApikeyDefs.ApiKey + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/apikeys/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/apikeys/defs.ts new file mode 100644 index 00000000..3943ee36 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/apikeys/defs.ts @@ -0,0 +1,7 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' diff --git a/apps/cli/src/lexicon/types/app/rocksky/artist.ts b/apps/cli/src/lexicon/types/app/rocksky/artist.ts new file mode 100644 index 00000000..c611a35a --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/artist.ts @@ -0,0 +1,41 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../lexicons' +import { isObj, hasProp } from '../../../util' +import { CID } from 'multiformats/cid' + +export interface Record { + /** The name of the artist. */ + name: string + /** The biography of the artist. */ + bio?: string + /** The picture of the artist. */ + picture?: BlobRef + /** The URL of the picture of the artist. */ + pictureUrl?: string + /** The tags of the artist. */ + tags?: string[] + /** The birth date of the artist. */ + born?: string + /** The death date of the artist. */ + died?: string + /** The birth place of the artist. */ + bornIn?: string + /** The date when the artist was created. */ + createdAt: string + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.artist#main' || v.$type === 'app.rocksky.artist') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.artist#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/artist/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/artist/defs.ts new file mode 100644 index 00000000..74e73bac --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/artist/defs.ts @@ -0,0 +1,140 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface ArtistViewBasic { + /** The unique identifier of the artist. */ + id?: string + /** The URI of the artist. */ + uri?: string + /** The name of the artist. */ + name?: string + /** The picture of the artist. */ + picture?: string + /** The SHA256 hash of the artist. */ + sha256?: string + /** The number of times the artist has been played. */ + playCount?: number + /** The number of unique listeners who have played the artist. */ + uniqueListeners?: number + [k: string]: unknown +} + +export function isArtistViewBasic(v: unknown): v is ArtistViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.artist.defs#artistViewBasic' + ) +} + +export function validateArtistViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.artist.defs#artistViewBasic', v) +} + +export interface ArtistViewDetailed { + /** The unique identifier of the artist. */ + id?: string + /** The URI of the artist. */ + uri?: string + /** The name of the artist. */ + name?: string + /** The picture of the artist. */ + picture?: string + /** The SHA256 hash of the artist. */ + sha256?: string + /** The number of times the artist has been played. */ + playCount?: number + /** The number of unique listeners who have played the artist. */ + uniqueListeners?: number + [k: string]: unknown +} + +export function isArtistViewDetailed(v: unknown): v is ArtistViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.artist.defs#artistViewDetailed' + ) +} + +export function validateArtistViewDetailed(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.artist.defs#artistViewDetailed', v) +} + +export interface SongViewBasic { + /** The URI of the song. */ + uri?: string + /** The title of the song. */ + title?: string + /** The number of times the song has been played. */ + playCount?: number + [k: string]: unknown +} + +export function isSongViewBasic(v: unknown): v is SongViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.artist.defs#songViewBasic' + ) +} + +export function validateSongViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.artist.defs#songViewBasic', v) +} + +export interface ListenerViewBasic { + /** The unique identifier of the actor. */ + id?: string + /** The DID of the listener. */ + did?: string + /** The handle of the listener. */ + handle?: string + /** The display name of the listener. */ + displayName?: string + /** The URL of the listener's avatar image. */ + avatar?: string + mostListenedSong?: SongViewBasic + /** The total number of plays by the listener. */ + totalPlays?: number + /** The rank of the listener among all listeners of the artist. */ + rank?: number + [k: string]: unknown +} + +export function isListenerViewBasic(v: unknown): v is ListenerViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.artist.defs#listenerViewBasic' + ) +} + +export function validateListenerViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.artist.defs#listenerViewBasic', v) +} + +export interface ArtistMbid { + /** The MusicBrainz Identifier (MBID) of the artist. */ + mbid?: string + /** The name of the artist. */ + name?: string + [k: string]: unknown +} + +export function isArtistMbid(v: unknown): v is ArtistMbid { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.artist.defs#artistMbid' + ) +} + +export function validateArtistMbid(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.artist.defs#artistMbid', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/artist/getArtist.ts b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtist.ts new file mode 100644 index 00000000..b3d0a5ff --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtist.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyArtistDefs from './defs' + +export interface QueryParams { + /** The URI of the artist to retrieve details from */ + uri: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyArtistDefs.ArtistViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts new file mode 100644 index 00000000..681ef9c9 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts @@ -0,0 +1,48 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyAlbumDefs from '../album/defs' + +export interface QueryParams { + /** The URI of the artist to retrieve albums from */ + uri: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + albums?: AppRockskyAlbumDefs.AlbumViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistListeners.ts b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistListeners.ts new file mode 100644 index 00000000..98219bb8 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistListeners.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyArtistDefs from './defs' + +export interface QueryParams { + /** The URI of the artist to retrieve listeners from */ + uri: string + /** Number of items to skip before returning results */ + offset?: number + /** Maximum number of results to return */ + limit?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + listeners?: AppRockskyArtistDefs.ListenerViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts new file mode 100644 index 00000000..db1f6497 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from '../song/defs' + +export interface QueryParams { + /** The URI of the artist to retrieve albums from */ + uri?: string + /** The maximum number of tracks to return */ + limit?: number + /** The offset for pagination */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + tracks?: AppRockskySongDefs.SongViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/artist/getArtists.ts b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtists.ts new file mode 100644 index 00000000..5066107b --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/artist/getArtists.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyArtistDefs from './defs' + +export interface QueryParams { + /** The maximum number of artists to return */ + limit?: number + /** The offset for pagination */ + offset?: number + /** The names of the artists to return */ + names?: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + artists?: AppRockskyArtistDefs.ArtistViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/charts/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/charts/defs.ts new file mode 100644 index 00000000..4f54fc53 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/charts/defs.ts @@ -0,0 +1,44 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface ChartsView { + scrobbles?: ScrobbleViewBasic[] + [k: string]: unknown +} + +export function isChartsView(v: unknown): v is ChartsView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.charts.defs#chartsView' + ) +} + +export function validateChartsView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.charts.defs#chartsView', v) +} + +export interface ScrobbleViewBasic { + /** The date of the scrobble. */ + date?: string + /** The number of scrobbles on this date. */ + count?: number + [k: string]: unknown +} + +export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.charts.defs#scrobbleViewBasic' + ) +} + +export function validateScrobbleViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.charts.defs#scrobbleViewBasic', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts b/apps/cli/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts new file mode 100644 index 00000000..b814f99e --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts @@ -0,0 +1,49 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyChartsDefs from './defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did?: string + /** The URI of the artist to filter by */ + artisturi?: string + /** The URI of the album to filter by */ + albumuri?: string + /** The URI of the track to filter by */ + songuri?: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyChartsDefs.ChartsView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/dropbox/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/dropbox/defs.ts new file mode 100644 index 00000000..a451452e --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/dropbox/defs.ts @@ -0,0 +1,71 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface FileView { + /** The unique identifier of the file. */ + id?: string + /** The name of the file. */ + name?: string + /** The lowercased path of the file. */ + pathLower?: string + /** The display path of the file. */ + pathDisplay?: string + /** The last modified date and time of the file on the client. */ + clientModified?: string + /** The last modified date and time of the file on the server. */ + serverModified?: string + [k: string]: unknown +} + +export function isFileView(v: unknown): v is FileView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.dropbox.defs#fileView' + ) +} + +export function validateFileView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.dropbox.defs#fileView', v) +} + +export interface FileListView { + /** A list of files in the Dropbox. */ + files?: FileView[] + [k: string]: unknown +} + +export function isFileListView(v: unknown): v is FileListView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.dropbox.defs#fileListView' + ) +} + +export function validateFileListView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.dropbox.defs#fileListView', v) +} + +export interface TemporaryLinkView { + /** The temporary link to access the file. */ + link?: string + [k: string]: unknown +} + +export function isTemporaryLinkView(v: unknown): v is TemporaryLinkView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.dropbox.defs#temporaryLinkView' + ) +} + +export function validateTemporaryLinkView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.dropbox.defs#temporaryLinkView', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts b/apps/cli/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts new file mode 100644 index 00000000..271eab55 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts @@ -0,0 +1,42 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import stream from 'stream' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The unique identifier of the file to download */ + fileId: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/octet-stream' + body: Uint8Array | stream.Readable + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/dropbox/getFiles.ts b/apps/cli/src/lexicon/types/app/rocksky/dropbox/getFiles.ts new file mode 100644 index 00000000..9f432db0 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/dropbox/getFiles.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyDropboxDefs from './defs' + +export interface QueryParams { + /** Path to the Dropbox folder or root directory */ + at?: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyDropboxDefs.FileListView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts b/apps/cli/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts new file mode 100644 index 00000000..267f0576 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyDropboxDefs from './defs' + +export interface QueryParams { + /** Path to the file or folder in Dropbox */ + path: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyDropboxDefs.FileView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts b/apps/cli/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts new file mode 100644 index 00000000..ac51e328 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyDropboxDefs from './defs' + +export interface QueryParams { + /** Path to the file in Dropbox */ + path: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyDropboxDefs.TemporaryLinkView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/defs.ts new file mode 100644 index 00000000..c466e7f9 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/defs.ts @@ -0,0 +1,182 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import * as AppRockskySongDefs from '../song/defs' +import * as AppRockskyAlbumDefs from '../album/defs' +import * as AppRockskyArtistDefs from '../artist/defs' +import * as AppRockskyPlaylistDefs from '../playlist/defs' +import * as AppRockskyActorDefs from '../actor/defs' +import * as AppRockskyScrobbleDefs from '../scrobble/defs' + +export interface SearchResultsView { + hits?: ( + | AppRockskySongDefs.SongViewBasic + | AppRockskyAlbumDefs.AlbumViewBasic + | AppRockskyArtistDefs.ArtistViewBasic + | AppRockskyPlaylistDefs.PlaylistViewBasic + | AppRockskyActorDefs.ProfileViewBasic + | { $type: string; [k: string]: unknown } + )[] + processingTimeMs?: number + limit?: number + offset?: number + estimatedTotalHits?: number + [k: string]: unknown +} + +export function isSearchResultsView(v: unknown): v is SearchResultsView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.feed.defs#searchResultsView' + ) +} + +export function validateSearchResultsView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.defs#searchResultsView', v) +} + +export interface NowPlayingView { + album?: string + albumArt?: string + albumArtist?: string + albumUri?: string + artist?: string + artistUri?: string + avatar?: string + createdAt?: string + did?: string + handle?: string + id?: string + title?: string + trackId?: string + trackUri?: string + uri?: string + [k: string]: unknown +} + +export function isNowPlayingView(v: unknown): v is NowPlayingView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.feed.defs#nowPlayingView' + ) +} + +export function validateNowPlayingView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.defs#nowPlayingView', v) +} + +export interface NowPlayingsView { + nowPlayings?: NowPlayingView[] + [k: string]: unknown +} + +export function isNowPlayingsView(v: unknown): v is NowPlayingsView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.feed.defs#nowPlayingsView' + ) +} + +export function validateNowPlayingsView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.defs#nowPlayingsView', v) +} + +export interface FeedGeneratorsView { + feeds?: FeedGeneratorView[] + [k: string]: unknown +} + +export function isFeedGeneratorsView(v: unknown): v is FeedGeneratorsView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.feed.defs#feedGeneratorsView' + ) +} + +export function validateFeedGeneratorsView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.defs#feedGeneratorsView', v) +} + +export interface FeedGeneratorView { + id?: string + name?: string + description?: string + uri?: string + avatar?: string + creator?: AppRockskyActorDefs.ProfileViewBasic + [k: string]: unknown +} + +export function isFeedGeneratorView(v: unknown): v is FeedGeneratorView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.feed.defs#feedGeneratorView' + ) +} + +export function validateFeedGeneratorView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.defs#feedGeneratorView', v) +} + +export interface FeedUriView { + /** The feed URI. */ + uri?: string + [k: string]: unknown +} + +export function isFeedUriView(v: unknown): v is FeedUriView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.feed.defs#feedUriView' + ) +} + +export function validateFeedUriView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.defs#feedUriView', v) +} + +export interface FeedItemView { + scrobble?: AppRockskyScrobbleDefs.ScrobbleViewBasic + [k: string]: unknown +} + +export function isFeedItemView(v: unknown): v is FeedItemView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.feed.defs#feedItemView' + ) +} + +export function validateFeedItemView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.defs#feedItemView', v) +} + +export interface FeedView { + feed?: FeedItemView[] + /** The pagination cursor for the next set of results. */ + cursor?: string + [k: string]: unknown +} + +export function isFeedView(v: unknown): v is FeedView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.feed.defs#feedView' + ) +} + +export function validateFeedView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.defs#feedView', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/describeFeedGenerator.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/describeFeedGenerator.ts new file mode 100644 index 00000000..dfa2b2f8 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/describeFeedGenerator.ts @@ -0,0 +1,48 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyFeedDefs from './defs' + +export interface QueryParams {} + +export type InputSchema = undefined + +export interface OutputSchema { + /** The DID of the feed generator. */ + did?: string + /** List of feed URIs generated by this feed generator. */ + feeds?: AppRockskyFeedDefs.FeedUriView[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/generator.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/generator.ts new file mode 100644 index 00000000..6161413b --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/generator.ts @@ -0,0 +1,29 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface Record { + did: string + avatar?: BlobRef + displayName: string + description?: string + createdAt: string + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.feed.generator#main' || + v.$type === 'app.rocksky.feed.generator') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.feed.generator#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/getFeed.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/getFeed.ts new file mode 100644 index 00000000..8f497558 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/getFeed.ts @@ -0,0 +1,47 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyFeedDefs from './defs' + +export interface QueryParams { + /** The feed URI. */ + feed: string + /** The maximum number of scrobbles to return */ + limit?: number + /** The cursor for pagination */ + cursor?: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyFeedDefs.FeedView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedGenerator.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedGenerator.ts new file mode 100644 index 00000000..1fb49e49 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedGenerator.ts @@ -0,0 +1,48 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyFeedDefs from './defs' + +export interface QueryParams { + /** AT-URI of the feed generator record. */ + feed: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + view?: AppRockskyFeedDefs.FeedGeneratorView + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedGenerators.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedGenerators.ts new file mode 100644 index 00000000..407141a6 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedGenerators.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyFeedDefs from './defs' + +export interface QueryParams { + /** The maximum number of feed generators to return. */ + size?: number +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyFeedDefs.FeedGeneratorsView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedSkeleton.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedSkeleton.ts new file mode 100644 index 00000000..e1abcb37 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/getFeedSkeleton.ts @@ -0,0 +1,56 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyScrobbleDefs from '../scrobble/defs' + +export interface QueryParams { + /** The feed URI. */ + feed: string + /** The maximum number of scrobbles to return */ + limit?: number + /** The offset for pagination */ + offset?: number + /** The pagination cursor. */ + cursor?: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[] + /** The pagination cursor for the next set of results. */ + cursor?: string + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts new file mode 100644 index 00000000..b16b579c --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyFeedDefs from './defs' + +export interface QueryParams { + /** The maximum number of now playing tracks to return. */ + size?: number +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyFeedDefs.NowPlayingsView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/feed/search.ts b/apps/cli/src/lexicon/types/app/rocksky/feed/search.ts new file mode 100644 index 00000000..1209fec8 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/feed/search.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyFeedDefs from './defs' + +export interface QueryParams { + /** The search query string */ + query: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyFeedDefs.SearchResultsView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/googledrive/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/googledrive/defs.ts new file mode 100644 index 00000000..7d93cc5c --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/googledrive/defs.ts @@ -0,0 +1,42 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface FileView { + /** The unique identifier of the file. */ + id?: string + [k: string]: unknown +} + +export function isFileView(v: unknown): v is FileView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.googledrive.defs#fileView' + ) +} + +export function validateFileView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.googledrive.defs#fileView', v) +} + +export interface FileListView { + files?: FileView[] + [k: string]: unknown +} + +export function isFileListView(v: unknown): v is FileListView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.googledrive.defs#fileListView' + ) +} + +export function validateFileListView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.googledrive.defs#fileListView', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts b/apps/cli/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts new file mode 100644 index 00000000..271eab55 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts @@ -0,0 +1,42 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import stream from 'stream' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The unique identifier of the file to download */ + fileId: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/octet-stream' + body: Uint8Array | stream.Readable + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/googledrive/getFile.ts b/apps/cli/src/lexicon/types/app/rocksky/googledrive/getFile.ts new file mode 100644 index 00000000..c8ce3937 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/googledrive/getFile.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyGoogledriveDefs from './defs' + +export interface QueryParams { + /** The unique identifier of the file to retrieve */ + fileId: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyGoogledriveDefs.FileView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/googledrive/getFiles.ts b/apps/cli/src/lexicon/types/app/rocksky/googledrive/getFiles.ts new file mode 100644 index 00000000..9fc99f61 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/googledrive/getFiles.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyGoogledriveDefs from './defs' + +export interface QueryParams { + /** Path to the Google Drive folder or root directory */ + at?: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyGoogledriveDefs.FileListView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/graph/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/graph/defs.ts new file mode 100644 index 00000000..61b9caa9 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/graph/defs.ts @@ -0,0 +1,47 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +/** indicates that a handle or DID could not be resolved */ +export interface NotFoundActor { + actor: string + notFound: boolean + [k: string]: unknown +} + +export function isNotFoundActor(v: unknown): v is NotFoundActor { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.graph.defs#notFoundActor' + ) +} + +export function validateNotFoundActor(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.graph.defs#notFoundActor', v) +} + +export interface Relationship { + did: string + /** if the actor follows this DID, this is the AT-URI of the follow record */ + following?: string + /** if the actor is followed by this DID, contains the AT-URI of the follow record */ + followedBy?: string + [k: string]: unknown +} + +export function isRelationship(v: unknown): v is Relationship { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.graph.defs#relationship' + ) +} + +export function validateRelationship(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.graph.defs#relationship', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/graph/follow.ts b/apps/cli/src/lexicon/types/app/rocksky/graph/follow.ts new file mode 100644 index 00000000..ba134d85 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/graph/follow.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' + +export interface Record { + createdAt: string + subject: string + via?: ComAtprotoRepoStrongRef.Main + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.graph.follow#main' || + v.$type === 'app.rocksky.graph.follow') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.graph.follow#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/graph/followAccount.ts b/apps/cli/src/lexicon/types/app/rocksky/graph/followAccount.ts new file mode 100644 index 00000000..e6ac74e5 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/graph/followAccount.ts @@ -0,0 +1,50 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyActorDefs from '../actor/defs' + +export interface QueryParams { + account: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + subject: AppRockskyActorDefs.ProfileViewBasic + followers: AppRockskyActorDefs.ProfileViewBasic[] + /** A cursor value to pass to subsequent calls to get the next page of results. */ + cursor?: string + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/graph/getFollowers.ts b/apps/cli/src/lexicon/types/app/rocksky/graph/getFollowers.ts new file mode 100644 index 00000000..3b131af1 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/graph/getFollowers.ts @@ -0,0 +1,56 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyActorDefs from '../actor/defs' + +export interface QueryParams { + actor: string + limit: number + /** If provided, filters the followers to only include those with DIDs in this list. */ + dids?: string[] + cursor?: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + subject: AppRockskyActorDefs.ProfileViewBasic + followers: AppRockskyActorDefs.ProfileViewBasic[] + /** A cursor value to pass to subsequent calls to get the next page of results. */ + cursor?: string + /** The total number of followers. */ + count?: number + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/graph/getFollows.ts b/apps/cli/src/lexicon/types/app/rocksky/graph/getFollows.ts new file mode 100644 index 00000000..bd3a8e9f --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/graph/getFollows.ts @@ -0,0 +1,56 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyActorDefs from '../actor/defs' + +export interface QueryParams { + actor: string + limit: number + /** If provided, filters the follows to only include those with DIDs in this list. */ + dids?: string[] + cursor?: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + subject: AppRockskyActorDefs.ProfileViewBasic + follows: AppRockskyActorDefs.ProfileViewBasic[] + /** A cursor value to pass to subsequent calls to get the next page of results. */ + cursor?: string + /** The total number of follows. */ + count?: number + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/graph/getKnownFollowers.ts b/apps/cli/src/lexicon/types/app/rocksky/graph/getKnownFollowers.ts new file mode 100644 index 00000000..0845ef70 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/graph/getKnownFollowers.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyActorDefs from '../actor/defs' + +export interface QueryParams { + actor: string + limit: number + cursor?: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + subject: AppRockskyActorDefs.ProfileViewBasic + followers: AppRockskyActorDefs.ProfileViewBasic[] + /** A cursor value to pass to subsequent calls to get the next page of results. */ + cursor?: string + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/graph/unfollowAccount.ts b/apps/cli/src/lexicon/types/app/rocksky/graph/unfollowAccount.ts new file mode 100644 index 00000000..e6ac74e5 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/graph/unfollowAccount.ts @@ -0,0 +1,50 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyActorDefs from '../actor/defs' + +export interface QueryParams { + account: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + subject: AppRockskyActorDefs.ProfileViewBasic + followers: AppRockskyActorDefs.ProfileViewBasic[] + /** A cursor value to pass to subsequent calls to get the next page of results. */ + cursor?: string + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/like.ts b/apps/cli/src/lexicon/types/app/rocksky/like.ts new file mode 100644 index 00000000..e58657aa --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/like.ts @@ -0,0 +1,27 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../lexicons' +import { isObj, hasProp } from '../../../util' +import { CID } from 'multiformats/cid' +import * as ComAtprotoRepoStrongRef from '../../com/atproto/repo/strongRef' + +export interface Record { + /** The date when the like was created. */ + createdAt: string + subject: ComAtprotoRepoStrongRef.Main + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.like#main' || v.$type === 'app.rocksky.like') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.like#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/like/dislikeShout.ts b/apps/cli/src/lexicon/types/app/rocksky/like/dislikeShout.ts new file mode 100644 index 00000000..5e5a140f --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/like/dislikeShout.ts @@ -0,0 +1,49 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from '../shout/defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The unique identifier of the shout to dislike */ + uri?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskyShoutDefs.ShoutView + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/like/dislikeSong.ts b/apps/cli/src/lexicon/types/app/rocksky/like/dislikeSong.ts new file mode 100644 index 00000000..fb31df74 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/like/dislikeSong.ts @@ -0,0 +1,49 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from '../song/defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The unique identifier of the song to dislike */ + uri?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskySongDefs.SongViewDetailed + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/like/likeShout.ts b/apps/cli/src/lexicon/types/app/rocksky/like/likeShout.ts new file mode 100644 index 00000000..07174581 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/like/likeShout.ts @@ -0,0 +1,49 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from '../shout/defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The unique identifier of the shout to like */ + uri?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskyShoutDefs.ShoutView + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/like/likeSong.ts b/apps/cli/src/lexicon/types/app/rocksky/like/likeSong.ts new file mode 100644 index 00000000..68655fcd --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/like/likeSong.ts @@ -0,0 +1,49 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from '../song/defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The unique identifier of the song to like */ + uri?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskySongDefs.SongViewDetailed + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts b/apps/cli/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts new file mode 100644 index 00000000..fb2133c3 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts @@ -0,0 +1,40 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string + /** The directory to add to the queue */ + directory: string + /** Position in the queue to insert the directory at, defaults to the end if not specified */ + position?: number + /** Whether to shuffle the added directory in the queue */ + shuffle?: boolean +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts b/apps/cli/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts new file mode 100644 index 00000000..9388d3ab --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts @@ -0,0 +1,39 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string + items: string[] + /** Position in the queue to insert the items at, defaults to the end if not specified */ + position?: number + /** Whether to shuffle the added items in the queue */ + shuffle?: boolean +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/player/defs.ts new file mode 100644 index 00000000..4b198ece --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/defs.ts @@ -0,0 +1,57 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import * as AppRockskySongDefsSongViewBasic from '../song/defs/songViewBasic' + +export interface CurrentlyPlayingViewDetailed { + /** The title of the currently playing track */ + title?: string + [k: string]: unknown +} + +export function isCurrentlyPlayingViewDetailed( + v: unknown, +): v is CurrentlyPlayingViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.player.defs#currentlyPlayingViewDetailed' + ) +} + +export function validateCurrentlyPlayingViewDetailed( + v: unknown, +): ValidationResult { + return lexicons.validate( + 'app.rocksky.player.defs#currentlyPlayingViewDetailed', + v, + ) +} + +export interface PlaybackQueueViewDetailed { + tracks?: AppRockskySongDefsSongViewBasic.Main[] + [k: string]: unknown +} + +export function isPlaybackQueueViewDetailed( + v: unknown, +): v is PlaybackQueueViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.player.defs#playbackQueueViewDetailed' + ) +} + +export function validatePlaybackQueueViewDetailed( + v: unknown, +): ValidationResult { + return lexicons.validate( + 'app.rocksky.player.defs#playbackQueueViewDetailed', + v, + ) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts b/apps/cli/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts new file mode 100644 index 00000000..d8839126 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts @@ -0,0 +1,44 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyPlayerDefs from './defs' + +export interface QueryParams { + playerId?: string + /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ + actor?: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts b/apps/cli/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts new file mode 100644 index 00000000..c8538f72 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts @@ -0,0 +1,42 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyPlayerDefs from './defs' + +export interface QueryParams { + playerId?: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyPlayerDefs.PlaybackQueueViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/next.ts b/apps/cli/src/lexicon/types/app/rocksky/player/next.ts new file mode 100644 index 00000000..6538f68b --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/next.ts @@ -0,0 +1,34 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/pause.ts b/apps/cli/src/lexicon/types/app/rocksky/player/pause.ts new file mode 100644 index 00000000..6538f68b --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/pause.ts @@ -0,0 +1,34 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/play.ts b/apps/cli/src/lexicon/types/app/rocksky/player/play.ts new file mode 100644 index 00000000..6538f68b --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/play.ts @@ -0,0 +1,34 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/playDirectory.ts b/apps/cli/src/lexicon/types/app/rocksky/player/playDirectory.ts new file mode 100644 index 00000000..1ebbc34e --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/playDirectory.ts @@ -0,0 +1,38 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string + directoryId: string + shuffle?: boolean + recurse?: boolean + position?: number +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/playFile.ts b/apps/cli/src/lexicon/types/app/rocksky/player/playFile.ts new file mode 100644 index 00000000..a9f4b490 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/playFile.ts @@ -0,0 +1,35 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string + fileId: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/previous.ts b/apps/cli/src/lexicon/types/app/rocksky/player/previous.ts new file mode 100644 index 00000000..6538f68b --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/previous.ts @@ -0,0 +1,34 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/player/seek.ts b/apps/cli/src/lexicon/types/app/rocksky/player/seek.ts new file mode 100644 index 00000000..b80265c9 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/player/seek.ts @@ -0,0 +1,36 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + playerId?: string + /** The position in seconds to seek to */ + position: number +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist.ts new file mode 100644 index 00000000..7b2786a8 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../lexicons' +import { isObj, hasProp } from '../../../util' +import { CID } from 'multiformats/cid' +import * as AppRockskySong from './song' + +export interface Record { + /** The name of the playlist. */ + name: string + /** The playlist description. */ + description?: string + /** The picture of the playlist. */ + picture?: BlobRef + /** The tracks in the playlist. */ + tracks?: AppRockskySong.Record[] + /** The date the playlist was created. */ + createdAt: string + /** The Spotify link of the playlist. */ + spotifyLink?: string + /** The Tidal link of the playlist. */ + tidalLink?: string + /** The YouTube link of the playlist. */ + youtubeLink?: string + /** The Apple Music link of the playlist. */ + appleMusicLink?: string + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.playlist#main' || + v.$type === 'app.rocksky.playlist') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.playlist#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts new file mode 100644 index 00000000..2cd02341 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts @@ -0,0 +1,37 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The name of the playlist */ + name: string + /** A brief description of the playlist */ + description?: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/defs.ts new file mode 100644 index 00000000..bad166b9 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/defs.ts @@ -0,0 +1,86 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import * as AppRockskySongDefs from '../song/defs' + +/** Detailed view of a playlist, including its tracks and metadata */ +export interface PlaylistViewDetailed { + /** The unique identifier of the playlist. */ + id?: string + /** The title of the playlist. */ + title?: string + /** The URI of the playlist. */ + uri?: string + /** The DID of the curator of the playlist. */ + curatorDid?: string + /** The handle of the curator of the playlist. */ + curatorHandle?: string + /** The name of the curator of the playlist. */ + curatorName?: string + /** The URL of the avatar image of the curator. */ + curatorAvatarUrl?: string + /** A description of the playlist. */ + description?: string + /** The URL of the cover image for the playlist. */ + coverImageUrl?: string + /** The date and time when the playlist was created. */ + createdAt?: string + /** A list of tracks in the playlist. */ + tracks?: AppRockskySongDefs.SongViewBasic[] + [k: string]: unknown +} + +export function isPlaylistViewDetailed(v: unknown): v is PlaylistViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.playlist.defs#playlistViewDetailed' + ) +} + +export function validatePlaylistViewDetailed(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.playlist.defs#playlistViewDetailed', v) +} + +/** Basic view of a playlist, including its metadata */ +export interface PlaylistViewBasic { + /** The unique identifier of the playlist. */ + id?: string + /** The title of the playlist. */ + title?: string + /** The URI of the playlist. */ + uri?: string + /** The DID of the curator of the playlist. */ + curatorDid?: string + /** The handle of the curator of the playlist. */ + curatorHandle?: string + /** The name of the curator of the playlist. */ + curatorName?: string + /** The URL of the avatar image of the curator. */ + curatorAvatarUrl?: string + /** A description of the playlist. */ + description?: string + /** The URL of the cover image for the playlist. */ + coverImageUrl?: string + /** The date and time when the playlist was created. */ + createdAt?: string + /** The number of tracks in the playlist. */ + trackCount?: number + [k: string]: unknown +} + +export function isPlaylistViewBasic(v: unknown): v is PlaylistViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.playlist.defs#playlistViewBasic' + ) +} + +export function validatePlaylistViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.playlist.defs#playlistViewBasic', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts new file mode 100644 index 00000000..93225239 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyPlaylistDefs from './defs' + +export interface QueryParams { + /** The URI of the playlist to retrieve. */ + uri: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyPlaylistDefs.PlaylistViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts new file mode 100644 index 00000000..71988caa --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts @@ -0,0 +1,50 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyPlaylistDefs from './defs' + +export interface QueryParams { + /** The maximum number of playlists to return. */ + limit?: number + /** The offset for pagination, used to skip a number of playlists. */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts new file mode 100644 index 00000000..7e99d000 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts @@ -0,0 +1,39 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The URI of the playlist to start */ + uri: string + /** The directory (id) to insert into the playlist */ + directory: string + /** The position in the playlist to insert the directory at, if not specified, the directory will be appended */ + position?: number +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/insertFiles.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/insertFiles.ts new file mode 100644 index 00000000..12b9112f --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/insertFiles.ts @@ -0,0 +1,38 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The URI of the playlist to start */ + uri: string + files: string[] + /** The position in the playlist to insert the files at, if not specified, files will be appended */ + position?: number +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts new file mode 100644 index 00000000..b04267fa --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts @@ -0,0 +1,35 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The URI of the playlist to remove */ + uri: string +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/removeTrack.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/removeTrack.ts new file mode 100644 index 00000000..f7929ff3 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/removeTrack.ts @@ -0,0 +1,37 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The URI of the playlist to remove the track from */ + uri: string + /** The position of the track to remove in the playlist */ + position: number +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts b/apps/cli/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts new file mode 100644 index 00000000..8b783c8c --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts @@ -0,0 +1,39 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The URI of the playlist to start */ + uri: string + /** Whether to shuffle the playlist when starting it */ + shuffle?: boolean + /** The position in the playlist to start from, if not specified, starts from the beginning */ + position?: number +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/radio.ts b/apps/cli/src/lexicon/types/app/rocksky/radio.ts new file mode 100644 index 00000000..68b5d3b4 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/radio.ts @@ -0,0 +1,37 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../lexicons' +import { isObj, hasProp } from '../../../util' +import { CID } from 'multiformats/cid' + +export interface Record { + /** The name of the radio station. */ + name: string + /** The URL of the radio station. */ + url: string + /** A description of the radio station. */ + description?: string + /** The genre of the radio station. */ + genre?: string + /** The logo of the radio station. */ + logo?: BlobRef + /** The website of the radio station. */ + website?: string + /** The date when the radio station was created. */ + createdAt: string + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.radio#main' || v.$type === 'app.rocksky.radio') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.radio#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/radio/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/radio/defs.ts new file mode 100644 index 00000000..05ad0d89 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/radio/defs.ts @@ -0,0 +1,63 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface RadioViewBasic { + /** The unique identifier of the radio. */ + id?: string + /** The name of the radio. */ + name?: string + /** A brief description of the radio. */ + description?: string + /** The date and time when the radio was created. */ + createdAt?: string + [k: string]: unknown +} + +export function isRadioViewBasic(v: unknown): v is RadioViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.radio.defs#radioViewBasic' + ) +} + +export function validateRadioViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.radio.defs#radioViewBasic', v) +} + +export interface RadioViewDetailed { + /** The unique identifier of the radio. */ + id?: string + /** The name of the radio. */ + name?: string + /** A brief description of the radio. */ + description?: string + /** The website of the radio. */ + website?: string + /** The streaming URL of the radio. */ + url?: string + /** The genre of the radio. */ + genre?: string + /** The logo of the radio station. */ + logo?: string + /** The date and time when the radio was created. */ + createdAt?: string + [k: string]: unknown +} + +export function isRadioViewDetailed(v: unknown): v is RadioViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.radio.defs#radioViewDetailed' + ) +} + +export function validateRadioViewDetailed(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.radio.defs#radioViewDetailed', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/scrobble.ts b/apps/cli/src/lexicon/types/app/rocksky/scrobble.ts new file mode 100644 index 00000000..fa26d293 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/scrobble.ts @@ -0,0 +1,75 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../lexicons' +import { isObj, hasProp } from '../../../util' +import { CID } from 'multiformats/cid' +import * as AppRockskyArtistDefs from './artist/defs' + +export interface Record { + /** The title of the song. */ + title: string + /** The artist of the song. */ + artist: string + /** The artists of the song with MusicBrainz IDs. */ + artists?: AppRockskyArtistDefs.ArtistMbid[] + /** The album artist of the song. */ + albumArtist: string + /** The album of the song. */ + album: string + /** The duration of the song in seconds. */ + duration: number + /** The track number of the song in the album. */ + trackNumber?: number + /** The disc number of the song in the album. */ + discNumber?: number + /** The release date of the song. */ + releaseDate?: string + /** The year the song was released. */ + year?: number + /** The genre of the song. */ + genre?: string + /** The tags of the song. */ + tags?: string[] + /** The composer of the song. */ + composer?: string + /** The lyrics of the song. */ + lyrics?: string + /** The copyright message of the song. */ + copyrightMessage?: string + /** Informations about the song */ + wiki?: string + /** The album art of the song. */ + albumArt?: BlobRef + /** The URL of the album art of the song. */ + albumArtUrl?: string + /** The YouTube link of the song. */ + youtubeLink?: string + /** The Spotify link of the song. */ + spotifyLink?: string + /** The Tidal link of the song. */ + tidalLink?: string + /** The Apple Music link of the song. */ + appleMusicLink?: string + /** The date when the song was created. */ + createdAt: string + /** The MusicBrainz ID of the song. */ + mbid?: string + /** The label of the song. */ + label?: string + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.scrobble#main' || + v.$type === 'app.rocksky.scrobble') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.scrobble#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts b/apps/cli/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts new file mode 100644 index 00000000..112361e4 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts @@ -0,0 +1,91 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyScrobbleDefs from './defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The title of the track being scrobbled */ + title: string + /** The artist of the track being scrobbled */ + artist: string + /** The album of the track being scrobbled */ + album?: string + /** The duration of the track in seconds */ + duration?: number + /** The MusicBrainz ID of the track, if available */ + mbId?: string + /** The URL of the album art for the track */ + albumArt?: string + /** The track number of the track in the album */ + trackNumber?: number + /** The release date of the track, formatted as YYYY-MM-DD */ + releaseDate?: string + /** The year the track was released */ + year?: number + /** The disc number of the track in the album, if applicable */ + discNumber?: number + /** The lyrics of the track, if available */ + lyrics?: string + /** The composer of the track, if available */ + composer?: string + /** The copyright message for the track, if available */ + copyrightMessage?: string + /** The record label of the track, if available */ + label?: string + /** The URL of the artist's picture, if available */ + artistPicture?: string + /** The Spotify link for the track, if available */ + spotifyLink?: string + /** The Last.fm link for the track, if available */ + lastfmLink?: string + /** The Tidal link for the track, if available */ + tidalLink?: string + /** The Apple Music link for the track, if available */ + appleMusicLink?: string + /** The Youtube link for the track, if available */ + youtubeLink?: string + /** The Deezer link for the track, if available */ + deezerLink?: string + /** The timestamp of the scrobble in milliseconds since epoch */ + timestamp?: number + [k: string]: unknown +} + +export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewBasic + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/scrobble/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/scrobble/defs.ts new file mode 100644 index 00000000..de00fc9f --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/scrobble/defs.ts @@ -0,0 +1,93 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface ScrobbleViewBasic { + /** The unique identifier of the scrobble. */ + id?: string + /** The handle of the user who created the scrobble. */ + user?: string + /** The display name of the user who created the scrobble. */ + userDisplayName?: string + /** The avatar URL of the user who created the scrobble. */ + userAvatar?: string + /** The title of the scrobble. */ + title?: string + /** The artist of the song. */ + artist?: string + /** The URI of the artist. */ + artistUri?: string + /** The album of the song. */ + album?: string + /** The URI of the album. */ + albumUri?: string + /** The album art URL of the song. */ + cover?: string + /** The timestamp when the scrobble was created. */ + date?: string + /** The URI of the scrobble. */ + uri?: string + /** The SHA256 hash of the scrobble data. */ + sha256?: string + liked?: boolean + likesCount?: number + [k: string]: unknown +} + +export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.scrobble.defs#scrobbleViewBasic' + ) +} + +export function validateScrobbleViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.scrobble.defs#scrobbleViewBasic', v) +} + +export interface ScrobbleViewDetailed { + /** The unique identifier of the scrobble. */ + id?: string + /** The handle of the user who created the scrobble. */ + user?: string + /** The title of the scrobble. */ + title?: string + /** The artist of the song. */ + artist?: string + /** The URI of the artist. */ + artistUri?: string + /** The album of the song. */ + album?: string + /** The URI of the album. */ + albumUri?: string + /** The album art URL of the song. */ + cover?: string + /** The timestamp when the scrobble was created. */ + date?: string + /** The URI of the scrobble. */ + uri?: string + /** The SHA256 hash of the scrobble data. */ + sha256?: string + /** The number of listeners */ + listeners?: number + /** The number of scrobbles for this song */ + scrobbles?: number + [k: string]: unknown +} + +export function isScrobbleViewDetailed(v: unknown): v is ScrobbleViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.scrobble.defs#scrobbleViewDetailed' + ) +} + +export function validateScrobbleViewDetailed(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.scrobble.defs#scrobbleViewDetailed', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts b/apps/cli/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts new file mode 100644 index 00000000..7be8fa29 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyScrobbleDefs from './defs' + +export interface QueryParams { + /** The unique identifier of the scrobble */ + uri: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts b/apps/cli/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts new file mode 100644 index 00000000..4e40de41 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts @@ -0,0 +1,54 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyScrobbleDefs from './defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did?: string + /** If true, only return scrobbles from actors the viewer is following. */ + following?: boolean + /** The maximum number of scrobbles to return */ + limit?: number + /** The offset for pagination */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout.ts b/apps/cli/src/lexicon/types/app/rocksky/shout.ts new file mode 100644 index 00000000..351d5200 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout.ts @@ -0,0 +1,30 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../lexicons' +import { isObj, hasProp } from '../../../util' +import { CID } from 'multiformats/cid' +import * as ComAtprotoRepoStrongRef from '../../com/atproto/repo/strongRef' + +export interface Record { + /** The message of the shout. */ + message: string + /** The date when the shout was created. */ + createdAt: string + parent?: ComAtprotoRepoStrongRef.Main + subject: ComAtprotoRepoStrongRef.Main + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.shout#main' || v.$type === 'app.rocksky.shout') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.shout#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/createShout.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/createShout.ts new file mode 100644 index 00000000..f465e7c1 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/createShout.ts @@ -0,0 +1,49 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The content of the shout */ + message?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskyShoutDefs.ShoutView + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/defs.ts new file mode 100644 index 00000000..14d3404a --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/defs.ts @@ -0,0 +1,58 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface Author { + /** The unique identifier of the author. */ + id?: string + /** The decentralized identifier (DID) of the author. */ + did?: string + /** The handle of the author. */ + handle?: string + /** The display name of the author. */ + displayName?: string + /** The URL of the author's avatar image. */ + avatar?: string + [k: string]: unknown +} + +export function isAuthor(v: unknown): v is Author { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.shout.defs#author' + ) +} + +export function validateAuthor(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.shout.defs#author', v) +} + +export interface ShoutView { + /** The unique identifier of the shout. */ + id?: string + /** The content of the shout. */ + message?: string + /** The ID of the parent shout if this is a reply, otherwise null. */ + parent?: string + /** The date and time when the shout was created. */ + createdAt?: string + author?: Author + [k: string]: unknown +} + +export function isShoutView(v: unknown): v is ShoutView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.shout.defs#shoutView' + ) +} + +export function validateShoutView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.shout.defs#shoutView', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts new file mode 100644 index 00000000..842c20f8 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams { + /** The unique identifier of the album to retrieve shouts for */ + uri: string + /** The maximum number of shouts to return */ + limit?: number + /** The number of shouts to skip before starting to collect the result set */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + shouts?: AppRockskyShoutDefs.ShoutViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts new file mode 100644 index 00000000..67e6f27b --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams { + /** The URI of the artist to retrieve shouts for */ + uri: string + /** The maximum number of shouts to return */ + limit?: number + /** The number of shouts to skip before starting to collect the result set */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + shouts?: AppRockskyShoutDefs.ShoutViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts new file mode 100644 index 00000000..3a7b308c --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams { + /** The DID or handle of the actor */ + did: string + /** The offset for pagination */ + offset?: number + /** The maximum number of shouts to return */ + limit?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + shouts?: AppRockskyShoutDefs.ShoutViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts new file mode 100644 index 00000000..7776b3cd --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams { + /** The URI of the shout to retrieve replies for */ + uri: string + /** The maximum number of shouts to return */ + limit?: number + /** The number of shouts to skip before starting to collect the result set */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + shouts?: AppRockskyShoutDefs.ShoutViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts new file mode 100644 index 00000000..4059f75e --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts @@ -0,0 +1,48 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams { + /** The URI of the track to retrieve shouts for */ + uri: string +} + +export type InputSchema = undefined + +export interface OutputSchema { + shouts?: AppRockskyShoutDefs.ShoutViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/removeShout.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/removeShout.ts new file mode 100644 index 00000000..b09720f2 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/removeShout.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams { + /** The ID of the shout to be removed */ + id: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyShoutDefs.ShoutView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/replyShout.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/replyShout.ts new file mode 100644 index 00000000..4c703c9c --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/replyShout.ts @@ -0,0 +1,51 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The unique identifier of the shout to reply to */ + shoutId: string + /** The content of the reply */ + message: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskyShoutDefs.ShoutView + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/shout/reportShout.ts b/apps/cli/src/lexicon/types/app/rocksky/shout/reportShout.ts new file mode 100644 index 00000000..db43497b --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/shout/reportShout.ts @@ -0,0 +1,51 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyShoutDefs from './defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The unique identifier of the shout to report */ + shoutId: string + /** The reason for reporting the shout */ + reason?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskyShoutDefs.ShoutView + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/song.ts b/apps/cli/src/lexicon/types/app/rocksky/song.ts new file mode 100644 index 00000000..fd550609 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/song.ts @@ -0,0 +1,74 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../lexicons' +import { isObj, hasProp } from '../../../util' +import { CID } from 'multiformats/cid' +import * as AppRockskyArtistDefs from './artist/defs' + +export interface Record { + /** The title of the song. */ + title: string + /** The artist of the song. */ + artist: string + /** The artists of the song with MusicBrainz IDs. */ + artists?: AppRockskyArtistDefs.ArtistMbid[] + /** The album artist of the song. */ + albumArtist: string + /** The album of the song. */ + album: string + /** The duration of the song in seconds. */ + duration: number + /** The track number of the song in the album. */ + trackNumber?: number + /** The disc number of the song in the album. */ + discNumber?: number + /** The release date of the song. */ + releaseDate?: string + /** The year the song was released. */ + year?: number + /** The genre of the song. */ + genre?: string + /** The tags of the song. */ + tags?: string[] + /** The composer of the song. */ + composer?: string + /** The lyrics of the song. */ + lyrics?: string + /** The copyright message of the song. */ + copyrightMessage?: string + /** Informations about the song */ + wiki?: string + /** The album art of the song. */ + albumArt?: BlobRef + /** The URL of the album art of the song. */ + albumArtUrl?: string + /** The YouTube link of the song. */ + youtubeLink?: string + /** The Spotify link of the song. */ + spotifyLink?: string + /** The Tidal link of the song. */ + tidalLink?: string + /** The Apple Music link of the song. */ + appleMusicLink?: string + /** The date when the song was created. */ + createdAt: string + /** The MusicBrainz ID of the song. */ + mbid?: string + /** The label of the song. */ + label?: string + [k: string]: unknown +} + +export function isRecord(v: unknown): v is Record { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'app.rocksky.song#main' || v.$type === 'app.rocksky.song') + ) +} + +export function validateRecord(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.song#main', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/song/createSong.ts b/apps/cli/src/lexicon/types/app/rocksky/song/createSong.ts new file mode 100644 index 00000000..d957f159 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/song/createSong.ts @@ -0,0 +1,71 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from './defs' + +export interface QueryParams {} + +export interface InputSchema { + /** The title of the song */ + title: string + /** The artist of the song */ + artist: string + /** The album artist of the song, if different from the main artist */ + albumArtist: string + /** The album of the song, if applicable */ + album: string + /** The duration of the song in seconds */ + duration?: number + /** The MusicBrainz ID of the song, if available */ + mbId?: string + /** The URL of the album art for the song */ + albumArt?: string + /** The track number of the song in the album, if applicable */ + trackNumber?: number + /** The release date of the song, formatted as YYYY-MM-DD */ + releaseDate?: string + /** The year the song was released */ + year?: number + /** The disc number of the song in the album, if applicable */ + discNumber?: number + /** The lyrics of the song, if available */ + lyrics?: string + [k: string]: unknown +} + +export type OutputSchema = AppRockskySongDefs.SongViewDetailed + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/song/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/song/defs.ts new file mode 100644 index 00000000..a6f6577d --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/song/defs.ts @@ -0,0 +1,103 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface SongViewBasic { + /** The unique identifier of the song. */ + id?: string + /** The title of the song. */ + title?: string + /** The artist of the song. */ + artist?: string + /** The artist of the album the song belongs to. */ + albumArtist?: string + /** The URL of the album art image. */ + albumArt?: string + /** The URI of the song. */ + uri?: string + /** The album of the song. */ + album?: string + /** The duration of the song in milliseconds. */ + duration?: number + /** The track number of the song in the album. */ + trackNumber?: number + /** The disc number of the song in the album. */ + discNumber?: number + /** The number of times the song has been played. */ + playCount?: number + /** The number of unique listeners who have played the song. */ + uniqueListeners?: number + /** The URI of the album the song belongs to. */ + albumUri?: string + /** The URI of the artist of the song. */ + artistUri?: string + /** The SHA256 hash of the song. */ + sha256?: string + /** The timestamp when the song was created. */ + createdAt?: string + [k: string]: unknown +} + +export function isSongViewBasic(v: unknown): v is SongViewBasic { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.song.defs#songViewBasic' + ) +} + +export function validateSongViewBasic(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.song.defs#songViewBasic', v) +} + +export interface SongViewDetailed { + /** The unique identifier of the song. */ + id?: string + /** The title of the song. */ + title?: string + /** The artist of the song. */ + artist?: string + /** The artist of the album the song belongs to. */ + albumArtist?: string + /** The URL of the album art image. */ + albumArt?: string + /** The URI of the song. */ + uri?: string + /** The album of the song. */ + album?: string + /** The duration of the song in milliseconds. */ + duration?: number + /** The track number of the song in the album. */ + trackNumber?: number + /** The disc number of the song in the album. */ + discNumber?: number + /** The number of times the song has been played. */ + playCount?: number + /** The number of unique listeners who have played the song. */ + uniqueListeners?: number + /** The URI of the album the song belongs to. */ + albumUri?: string + /** The URI of the artist of the song. */ + artistUri?: string + /** The SHA256 hash of the song. */ + sha256?: string + /** The timestamp when the song was created. */ + createdAt?: string + [k: string]: unknown +} + +export function isSongViewDetailed(v: unknown): v is SongViewDetailed { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.song.defs#songViewDetailed' + ) +} + +export function validateSongViewDetailed(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.song.defs#songViewDetailed', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/song/getSong.ts b/apps/cli/src/lexicon/types/app/rocksky/song/getSong.ts new file mode 100644 index 00000000..9cd6a7d8 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/song/getSong.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from './defs' + +export interface QueryParams { + /** The unique identifier of the song to retrieve */ + uri: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskySongDefs.SongViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/song/getSongs.ts b/apps/cli/src/lexicon/types/app/rocksky/song/getSongs.ts new file mode 100644 index 00000000..49e95225 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/song/getSongs.ts @@ -0,0 +1,50 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskySongDefs from './defs' + +export interface QueryParams { + /** The maximum number of songs to return */ + limit?: number + /** The offset for pagination */ + offset?: number +} + +export type InputSchema = undefined + +export interface OutputSchema { + songs?: AppRockskySongDefs.SongViewBasic[] + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/spotify/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/spotify/defs.ts new file mode 100644 index 00000000..946729cd --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/spotify/defs.ts @@ -0,0 +1,35 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface SpotifyTrackView { + /** The unique identifier of the Spotify track. */ + id?: string + /** The name of the track. */ + name?: string + /** The name of the artist. */ + artist?: string + /** The name of the album. */ + album?: string + /** The duration of the track in milliseconds. */ + duration?: number + /** A URL to a preview of the track. */ + previewUrl?: string + [k: string]: unknown +} + +export function isSpotifyTrackView(v: unknown): v is SpotifyTrackView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.spotify.defs#spotifyTrackView' + ) +} + +export function validateSpotifyTrackView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.spotify.defs#spotifyTrackView', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts b/apps/cli/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts new file mode 100644 index 00000000..41b8ff7c --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyPlayerDefs from '../player/defs' + +export interface QueryParams { + /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ + actor?: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/spotify/next.ts b/apps/cli/src/lexicon/types/app/rocksky/spotify/next.ts new file mode 100644 index 00000000..7620d0ab --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/spotify/next.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams {} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/spotify/pause.ts b/apps/cli/src/lexicon/types/app/rocksky/spotify/pause.ts new file mode 100644 index 00000000..7620d0ab --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/spotify/pause.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams {} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/spotify/play.ts b/apps/cli/src/lexicon/types/app/rocksky/spotify/play.ts new file mode 100644 index 00000000..7620d0ab --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/spotify/play.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams {} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/spotify/previous.ts b/apps/cli/src/lexicon/types/app/rocksky/spotify/previous.ts new file mode 100644 index 00000000..7620d0ab --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/spotify/previous.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams {} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/spotify/seek.ts b/apps/cli/src/lexicon/types/app/rocksky/spotify/seek.ts new file mode 100644 index 00000000..dd93805e --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/spotify/seek.ts @@ -0,0 +1,35 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams { + /** The position in seconds to seek to */ + position: number +} + +export type InputSchema = undefined +export type HandlerInput = undefined + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | void +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/app/rocksky/stats/defs.ts b/apps/cli/src/lexicon/types/app/rocksky/stats/defs.ts new file mode 100644 index 00000000..61adfa97 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/stats/defs.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface StatsView { + /** The total number of scrobbles. */ + scrobbles?: number + /** The total number of unique artists scrobbled. */ + artists?: number + /** The total number of tracks marked as loved. */ + lovedTracks?: number + /** The total number of unique albums scrobbled. */ + albums?: number + /** The total number of unique tracks scrobbled. */ + tracks?: number + [k: string]: unknown +} + +export function isStatsView(v: unknown): v is StatsView { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.rocksky.stats.defs#statsView' + ) +} + +export function validateStatsView(v: unknown): ValidationResult { + return lexicons.validate('app.rocksky.stats.defs#statsView', v) +} diff --git a/apps/cli/src/lexicon/types/app/rocksky/stats/getStats.ts b/apps/cli/src/lexicon/types/app/rocksky/stats/getStats.ts new file mode 100644 index 00000000..6b863af8 --- /dev/null +++ b/apps/cli/src/lexicon/types/app/rocksky/stats/getStats.ts @@ -0,0 +1,43 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import * as AppRockskyStatsDefs from './defs' + +export interface QueryParams { + /** The DID or handle of the user to get stats for. */ + did: string +} + +export type InputSchema = undefined +export type OutputSchema = AppRockskyStatsDefs.StatsView +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response + resetRouteRateLimits: () => Promise +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/apps/cli/src/lexicon/types/com/atproto/repo/strongRef.ts b/apps/cli/src/lexicon/types/com/atproto/repo/strongRef.ts new file mode 100644 index 00000000..8b21a6dd --- /dev/null +++ b/apps/cli/src/lexicon/types/com/atproto/repo/strongRef.ts @@ -0,0 +1,26 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' + +export interface Main { + uri: string + cid: string + [k: string]: unknown +} + +export function isMain(v: unknown): v is Main { + return ( + isObj(v) && + hasProp(v, '$type') && + (v.$type === 'com.atproto.repo.strongRef#main' || + v.$type === 'com.atproto.repo.strongRef') + ) +} + +export function validateMain(v: unknown): ValidationResult { + return lexicons.validate('com.atproto.repo.strongRef#main', v) +} diff --git a/apps/cli/src/lexicon/util.ts b/apps/cli/src/lexicon/util.ts new file mode 100644 index 00000000..d7e70440 --- /dev/null +++ b/apps/cli/src/lexicon/util.ts @@ -0,0 +1,13 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export function isObj(v: unknown): v is Record { + return typeof v === 'object' && v !== null +} + +export function hasProp( + data: object, + prop: K, +): data is Record { + return prop in data +} diff --git a/apps/cli/src/schema/album-tracks.ts b/apps/cli/src/schema/album-tracks.ts new file mode 100644 index 00000000..8e0ee192 --- /dev/null +++ b/apps/cli/src/schema/album-tracks.ts @@ -0,0 +1,25 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; +import albums from "./albums"; +import tracks from "./tracks"; + +const albumTracks = sqliteTable("album_tracks", { + id: text("id").primaryKey().notNull(), + albumId: text("album_id") + .notNull() + .references(() => albums.id), + trackId: text("track_id") + .notNull() + .references(() => tracks.id), + createdAt: integer("created_at") + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at") + .notNull() + .default(sql`CURRENT_TIMESTAMP`), +}); + +export type SelectAlbumTrack = InferSelectModel; +export type InsertAlbumTrack = InferInsertModel; + +export default albumTracks; diff --git a/apps/cli/src/schema/albums.ts b/apps/cli/src/schema/albums.ts new file mode 100644 index 00000000..2e6a7d5d --- /dev/null +++ b/apps/cli/src/schema/albums.ts @@ -0,0 +1,29 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; + +const albums = sqliteTable("albums", { + id: text("id").primaryKey().notNull(), + title: text("title").notNull(), + artist: text("artist").notNull(), + releaseDate: text("release_date"), + year: integer("year"), + albumArt: text("album_art"), + uri: text("uri").unique(), + artistUri: text("artist_uri"), + appleMusicLink: text("apple_music_link").unique(), + spotifyLink: text("spotify_link").unique(), + tidalLink: text("tidal_link").unique(), + youtubeLink: text("youtube_link").unique(), + sha256: text("sha256").unique().notNull(), + createdAt: integer("created_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), +}); + +export type SelectAlbum = InferSelectModel; +export type InsertAlbum = InferInsertModel; + +export default albums; diff --git a/apps/cli/src/schema/artist-albums.ts b/apps/cli/src/schema/artist-albums.ts new file mode 100644 index 00000000..31b97008 --- /dev/null +++ b/apps/cli/src/schema/artist-albums.ts @@ -0,0 +1,25 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; +import albums from "./albums"; +import artists from "./artists"; + +const artistAlbums = sqliteTable("artist_albums", { + id: text("id").primaryKey().notNull(), + artistId: text("artist_id") + .notNull() + .references(() => artists.id), + albumId: text("album_id") + .notNull() + .references(() => albums.id), + createdAt: integer("created_at") + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at") + .notNull() + .default(sql`CURRENT_TIMESTAMP`), +}); + +export type SelectArtistAlbum = InferSelectModel; +export type InsertArtistAlbum = InferInsertModel; + +export default artistAlbums; diff --git a/apps/cli/src/schema/artist-tracks.ts b/apps/cli/src/schema/artist-tracks.ts new file mode 100644 index 00000000..1614d5f7 --- /dev/null +++ b/apps/cli/src/schema/artist-tracks.ts @@ -0,0 +1,25 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; +import artists from "./artists"; +import tracks from "./tracks"; + +const artistTracks = sqliteTable("artist_tracks", { + id: text("id").primaryKey().notNull(), + artistId: text("artist_id") + .notNull() + .references(() => artists.id), + trackId: text("track_id") + .notNull() + .references(() => tracks.id), + createdAt: integer("created_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), +}); + +export type SelectArtistTrack = InferSelectModel; +export type InsertArtistTrack = InferInsertModel; + +export default artistTracks; diff --git a/apps/cli/src/schema/artists.ts b/apps/cli/src/schema/artists.ts new file mode 100644 index 00000000..0c1b7123 --- /dev/null +++ b/apps/cli/src/schema/artists.ts @@ -0,0 +1,30 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; + +const artists = sqliteTable("artists", { + id: text("id").primaryKey().notNull(), + name: text("name").notNull(), + biography: text("biography"), + born: integer("born", { mode: "timestamp" }), + bornIn: text("born_in"), + died: integer("died", { mode: "timestamp" }), + picture: text("picture"), + sha256: text("sha256").unique().notNull(), + uri: text("uri").unique(), + appleMusicLink: text("apple_music_link"), + spotifyLink: text("spotify_link"), + tidalLink: text("tidal_link"), + youtubeLink: text("youtube_link"), + genres: text("genres"), + createdAt: integer("created_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), +}); + +export type SelectArtist = InferSelectModel; +export type InsertArtist = InferInsertModel; + +export default artists; diff --git a/apps/cli/src/schema/index.ts b/apps/cli/src/schema/index.ts new file mode 100644 index 00000000..8a6c80be --- /dev/null +++ b/apps/cli/src/schema/index.ts @@ -0,0 +1,13 @@ +import albumTracks from "./album-tracks"; +import albums from "./albums"; +import artists from "./artists"; +import tracks from "./tracks"; +import users from "./users"; + +export default { + users, + tracks, + artists, + albums, + albumTracks, +}; diff --git a/apps/cli/src/schema/loved-tracks.ts b/apps/cli/src/schema/loved-tracks.ts new file mode 100644 index 00000000..ea3b5851 --- /dev/null +++ b/apps/cli/src/schema/loved-tracks.ts @@ -0,0 +1,23 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { sqliteTable, integer, text } from "drizzle-orm/sqlite-core"; +import tracks from "./tracks"; +import users from "./users"; + +const lovedTracks = sqliteTable("loved_tracks", { + id: text("id").primaryKey().notNull(), + userId: text("user_id") + .notNull() + .references(() => users.id), + trackId: text("track_id") + .notNull() + .references(() => tracks.id), + uri: text("uri").unique(), + createdAt: integer("created_at") + .notNull() + .default(sql`CURRENT_TIMESTAMP`), +}); + +export type SelectLovedTrack = InferSelectModel; +export type InsertLovedTrack = InferInsertModel; + +export default lovedTracks; diff --git a/apps/cli/src/schema/tracks.ts b/apps/cli/src/schema/tracks.ts new file mode 100644 index 00000000..3e779343 --- /dev/null +++ b/apps/cli/src/schema/tracks.ts @@ -0,0 +1,39 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; + +const tracks = sqliteTable("tracks", { + id: text("id").primaryKey().notNull(), + title: text("title").notNull(), + artist: text("artist").notNull(), + albumArtist: text("album_artist").notNull(), + albumArt: text("album_art"), + album: text("album").notNull(), + trackNumber: integer("track_number"), + duration: integer("duration").notNull(), + mbId: text("mb_id").unique(), + youtubeLink: text("youtube_link").unique(), + spotifyLink: text("spotify_link").unique(), + appleMusicLink: text("apple_music_link").unique(), + tidalLink: text("tidal_link").unique(), + sha256: text("sha256").unique().notNull(), + discNumber: integer("disc_number"), + lyrics: text("lyrics"), + composer: text("composer"), + genre: text("genre"), + label: text("label"), + copyrightMessage: text("copyright_message"), + uri: text("uri").unique(), + albumUri: text("album_uri"), + artistUri: text("artist_uri"), + createdAt: integer("created_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), +}); + +export type SelectTrack = InferSelectModel; +export type InsertTrack = InferInsertModel; + +export default tracks; diff --git a/apps/cli/src/schema/user-albums.ts b/apps/cli/src/schema/user-albums.ts new file mode 100644 index 00000000..86b28e99 --- /dev/null +++ b/apps/cli/src/schema/user-albums.ts @@ -0,0 +1,27 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; +import albums from "./albums"; +import users from "./users"; + +const userAlbums = sqliteTable("user_albums", { + id: text("id").primaryKey().notNull(), + userId: text("user_id") + .notNull() + .references(() => users.id), + albumId: text("album_id") + .notNull() + .references(() => albums.id), + createdAt: integer("created_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + scrobbles: integer("scrobbles"), + uri: text("uri").unique().notNull(), +}); + +export type SelectUserAlbum = InferSelectModel; +export type InsertUserAlbum = InferInsertModel; + +export default userAlbums; diff --git a/apps/cli/src/schema/user-artists.ts b/apps/cli/src/schema/user-artists.ts new file mode 100644 index 00000000..0452d759 --- /dev/null +++ b/apps/cli/src/schema/user-artists.ts @@ -0,0 +1,27 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; +import artists from "./artists"; +import users from "./users"; + +const userArtists = sqliteTable("user_albums", { + id: text("id").primaryKey().notNull(), + userId: text("user_id") + .notNull() + .references(() => users.id), + albumId: text("artist_id") + .notNull() + .references(() => artists.id), + createdAt: integer("created_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + scrobbles: integer("scrobbles"), + uri: text("uri").unique().notNull(), +}); + +export type SelectUserArtist = InferSelectModel; +export type InsertUserArtist = InferInsertModel; + +export default userArtists; diff --git a/apps/cli/src/schema/user-tracks.ts b/apps/cli/src/schema/user-tracks.ts new file mode 100644 index 00000000..d79b85af --- /dev/null +++ b/apps/cli/src/schema/user-tracks.ts @@ -0,0 +1,27 @@ +import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; +import tracks from "./tracks"; +import users from "./users"; + +const userTracks = sqliteTable("user_tracks", { + id: text("id").primaryKey().notNull(), + userId: text("user_id") + .notNull() + .references(() => users.id), + albumId: text("track_id") + .notNull() + .references(() => tracks.id), + createdAt: integer("created_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + scrobbles: integer("scrobbles"), + uri: text("uri").unique().notNull(), +}); + +export type SelectUser = InferSelectModel; +export type InsertUserTrack = InferInsertModel; + +export default userTracks; diff --git a/apps/cli/src/schema/users.ts b/apps/cli/src/schema/users.ts new file mode 100644 index 00000000..43a64569 --- /dev/null +++ b/apps/cli/src/schema/users.ts @@ -0,0 +1,21 @@ +import { type InferSelectModel, sql } from "drizzle-orm"; +import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; + +const users = sqliteTable("users", { + id: text("id").primaryKey().notNull(), + did: text("did").unique().notNull(), + displayName: text("display_name"), + handle: text("handle").unique().notNull(), + avatar: text("avatar").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), + updatedAt: integer("updated_at", { mode: "timestamp" }) + .notNull() + .default(sql`CURRENT_TIMESTAMP`), +}); + +export type SelectUser = InferSelectModel; +export type InsertUser = InferSelectModel; + +export default users; diff --git a/apps/cli/src/sync.ts b/apps/cli/src/sync.ts new file mode 100644 index 00000000..e69de29b diff --git a/bun.lock b/bun.lock index 96ce5866..3534ac4b 100644 --- a/bun.lock +++ b/bun.lock @@ -107,12 +107,28 @@ "rocksky": "./dist/index.js", }, "dependencies": { + "@atcute/jetstream": "^1.1.2", + "@atproto/api": "^0.13.31", + "@atproto/common": "^0.4.6", + "@atproto/identity": "^0.4.5", + "@atproto/jwk-jose": "0.1.5", + "@atproto/lex-cli": "^0.5.6", + "@atproto/lexicon": "^0.4.5", + "@atproto/sync": "^0.1.11", + "@atproto/syntax": "^0.3.1", "@modelcontextprotocol/sdk": "^1.10.2", + "@paralleldrive/cuid2": "^3.0.6", + "@types/better-sqlite3": "^7.6.13", "axios": "^1.8.4", + "better-sqlite3": "^12.4.1", "chalk": "^5.4.1", "commander": "^13.1.0", "cors": "^2.8.5", "dayjs": "^1.11.13", + "drizzle-kit": "^0.31.1", + "drizzle-orm": "^0.45.1", + "effect": "^3.19.14", + "env-paths": "^3.0.0", "express": "^5.1.0", "md5": "^2.3.0", "open": "^10.1.0", @@ -342,6 +358,14 @@ "@asteasolutions/zod-to-openapi": ["@asteasolutions/zod-to-openapi@7.3.4", "", { "dependencies": { "openapi3-ts": "^4.1.2" }, "peerDependencies": { "zod": "^3.20.2" } }, "sha512-/2rThQ5zPi9OzVwes6U7lK1+Yvug0iXu25olp7S0XsYmOqnyMfxH7gdSQjn/+DSOHRg7wnotwGJSyL+fBKdnEA=="], + "@atcute/jetstream": ["@atcute/jetstream@1.1.2", "", { "dependencies": { "@atcute/lexicons": "^1.2.2", "@badrap/valita": "^0.4.6", "@mary-ext/event-iterator": "^1.0.0", "@mary-ext/simple-event-emitter": "^1.0.0", "partysocket": "^1.1.5", "type-fest": "^4.41.0", "yocto-queue": "^1.2.1" } }, "sha512-u6p/h2xppp7LE6W/9xErAJ6frfN60s8adZuCKtfAaaBBiiYbb1CfpzN8Uc+2qtJZNorqGvuuDb5572Jmh7yHBQ=="], + + "@atcute/lexicons": ["@atcute/lexicons@1.2.6", "", { "dependencies": { "@atcute/uint8array": "^1.0.6", "@atcute/util-text": "^0.0.1", "@standard-schema/spec": "^1.1.0", "esm-env": "^1.2.2" } }, "sha512-s76UQd8D+XmHIzrjD9CJ9SOOeeLPHc+sMmcj7UFakAW/dDFXc579fcRdRfuUKvXBL5v1Gs2VgDdlh/IvvQZAwA=="], + + "@atcute/uint8array": ["@atcute/uint8array@1.0.6", "", {}, "sha512-ucfRBQc7BFT8n9eCyGOzDHEMKF/nZwhS2pPao4Xtab1ML3HdFYcX2DM1tadCzas85QTGxHe5urnUAAcNKGRi9A=="], + + "@atcute/util-text": ["@atcute/util-text@0.0.1", "", { "dependencies": { "unicode-segmenter": "^0.14.4" } }, "sha512-t1KZqvn0AYy+h2KcJyHnKF9aEqfRfMUmyY8j1ELtAEIgqN9CxINAjxnoRCJIFUlvWzb+oY3uElQL/Vyk3yss0g=="], + "@atproto-labs/did-resolver": ["@atproto-labs/did-resolver@0.1.11", "", { "dependencies": { "@atproto-labs/fetch": "0.2.2", "@atproto-labs/pipe": "0.1.0", "@atproto-labs/simple-store": "0.1.2", "@atproto-labs/simple-store-memory": "0.1.2", "@atproto/did": "0.1.5", "zod": "^3.23.8" } }, "sha512-qXNzIX2GPQnxT1gl35nv/8ErDdc4Fj/+RlJE7oyE7JGkFAPUyuY03TvKJ79SmWFsWE8wyTXEpLuphr9Da1Vhkw=="], "@atproto-labs/fetch": ["@atproto-labs/fetch@0.2.2", "", { "dependencies": { "@atproto-labs/pipe": "0.1.0" } }, "sha512-QyafkedbFeVaN20DYUpnY2hcArYxjdThPXbYMqOSoZhcvkrUqaw4xDND4wZB5TBD9cq2yqe9V6mcw9P4XQKQuQ=="], @@ -456,6 +480,8 @@ "@babel/types": ["@babel/types@7.28.4", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q=="], + "@badrap/valita": ["@badrap/valita@0.4.6", "", {}, "sha512-4kdqcjyxo/8RQ8ayjms47HCWZIF5981oE5nIenbfThKDxWXtEHKipAOWlflpPJzZx9y/JWYQkp18Awr7VuepFg=="], + "@biomejs/biome": ["@biomejs/biome@2.2.5", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.2.5", "@biomejs/cli-darwin-x64": "2.2.5", "@biomejs/cli-linux-arm64": "2.2.5", "@biomejs/cli-linux-arm64-musl": "2.2.5", "@biomejs/cli-linux-x64": "2.2.5", "@biomejs/cli-linux-x64-musl": "2.2.5", "@biomejs/cli-win32-arm64": "2.2.5", "@biomejs/cli-win32-x64": "2.2.5" }, "bin": { "biome": "bin/biome" } }, "sha512-zcIi+163Rc3HtyHbEO7CjeHq8DjQRs40HsGbW6vx2WI0tg8mYQOPouhvHSyEnCBAorfYNnKdR64/IxO7xQ5faw=="], "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.2.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-MYT+nZ38wEIWVcL5xLyOhYQQ7nlWD0b/4mgATW2c8dvq7R4OQjt/XGXFkXrmtWmQofaIM14L7V8qIz/M+bx5QQ=="], @@ -726,6 +752,10 @@ "@mapbox/whoots-js": ["@mapbox/whoots-js@3.1.0", "", {}, "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q=="], + "@mary-ext/event-iterator": ["@mary-ext/event-iterator@1.0.0", "", { "dependencies": { "yocto-queue": "^1.2.1" } }, "sha512-l6gCPsWJ8aRCe/s7/oCmero70kDHgIK5m4uJvYgwEYTqVxoBOIXbKr5tnkLqUHEg6mNduB4IWvms3h70Hp9ADQ=="], + + "@mary-ext/simple-event-emitter": ["@mary-ext/simple-event-emitter@1.0.0", "", {}, "sha512-meA/zJZKIN1RVBNEYIbjufkUrW7/tRjHH60FjolpG1ixJKo76TB208qefQLNdOVDA7uIG0CGEDuhmMirtHKLAg=="], + "@math.gl/web-mercator": ["@math.gl/web-mercator@3.6.3", "", { "dependencies": { "@babel/runtime": "^7.12.0", "gl-matrix": "^3.4.0" } }, "sha512-UVrkSOs02YLehKaehrxhAejYMurehIHPfFQvPFZmdJHglHOU4V2cCUApTVEwOksvCp161ypEqVp+9H6mGhTTcw=="], "@mdx-js/react": ["@mdx-js/react@3.1.1", "", { "dependencies": { "@types/mdx": "^2.0.0" }, "peerDependencies": { "@types/react": ">=16", "react": ">=16" } }, "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw=="], @@ -734,7 +764,7 @@ "@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], - "@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + "@noble/hashes": ["@noble/hashes@2.0.1", "", {}, "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw=="], "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="], @@ -896,6 +926,8 @@ "@opentelemetry/sql-common": ["@opentelemetry/sql-common@0.41.2", "", { "dependencies": { "@opentelemetry/core": "^2.0.0" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0" } }, "sha512-4mhWm3Z8z+i508zQJ7r6Xi7y4mmoJpdvH0fZPFRkWrdp5fq7hhZ2HhYokEOLkfqSMgPR4Z9EyB3DBkbKGOqZiQ=="], + "@paralleldrive/cuid2": ["@paralleldrive/cuid2@3.0.6", "", { "dependencies": { "@noble/hashes": "^2.0.1", "bignumber.js": "^9.3.1", "error-causes": "^3.0.2" }, "bin": { "cuid2": "bin/cuid2.js" } }, "sha512-ujtxTTvr4fwPrzuQT7o6VLKs5BzdWetR9+/zRQ0SyK9hVIwZQllEccxgcHYXN6I3Z429y1yg3F6+uiVxMDPrLQ=="], + "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], "@pkl-community/pkl": ["@pkl-community/pkl@0.28.2", "", { "optionalDependencies": { "@pkl-community/pkl-darwin-arm64": "0.28.2", "@pkl-community/pkl-darwin-x64": "0.28.2", "@pkl-community/pkl-linux-arm64": "0.28.2", "@pkl-community/pkl-linux-x64": "0.28.2" }, "bin": { "pkl": "lib/main.js" } }, "sha512-seSZrwGvDEd1BeT9+dRRnqvyNit8vpFL2I+YBEJ+t3pBYpnpHaVHwQNPlMLvDQ0KZUCQkiWGZnbCMF9WtaxHNA=="], @@ -1246,6 +1278,8 @@ "@types/babel__traverse": ["@types/babel__traverse@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="], + "@types/better-sqlite3": ["@types/better-sqlite3@7.6.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA=="], + "@types/body-parser": ["@types/body-parser@1.19.6", "", { "dependencies": { "@types/connect": "*", "@types/node": "*" } }, "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g=="], "@types/bunyan": ["@types/bunyan@1.8.11", "", { "dependencies": { "@types/node": "*" } }, "sha512-758fRH7umIMk5qt5ELmRMff4mLDlN+xyYzC+dkPTdKwbSkJFvz6xwyScrytPU0QIBbRRwbiE8/BIg8bpajerNQ=="], @@ -1742,8 +1776,12 @@ "enhanced-resolve": ["enhanced-resolve@5.18.3", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" } }, "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww=="], + "env-paths": ["env-paths@3.0.0", "", {}, "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A=="], + "envalid": ["envalid@8.1.0", "", { "dependencies": { "tslib": "2.8.1" } }, "sha512-OT6+qVhKVyCidaGoXflb2iK1tC8pd0OV2Q+v9n33wNhUJ+lus+rJobUj4vJaQBPxPZ0vYrPGuxdrenyCAIJcow=="], + "error-causes": ["error-causes@3.0.2", "", {}, "sha512-i0B8zq1dHL6mM85FGoxaJnVtx6LD5nL2v0hlpGdntg5FOSyzQ46c9lmz5qx0xRS2+PWHGOHcYxGIBC5Le2dRMw=="], + "error-ex": ["error-ex@1.3.4", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ=="], "error-stack-parser-es": ["error-stack-parser-es@1.0.5", "", {}, "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA=="], @@ -1780,6 +1818,8 @@ "eslint-visitor-keys": ["eslint-visitor-keys@4.2.1", "", {}, "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ=="], + "esm-env": ["esm-env@1.2.2", "", {}, "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA=="], + "espree": ["espree@10.4.0", "", { "dependencies": { "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^4.2.1" } }, "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ=="], "esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], @@ -1796,6 +1836,8 @@ "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], + "event-target-polyfill": ["event-target-polyfill@0.0.4", "", {}, "sha512-Gs6RLjzlLRdT8X9ZipJdIZI/Y6/HhRLyq9RdDlCsnpxr/+Nn6bU2EFGuC94GjxqhM+Nmij2Vcq98yoHrU8uNFQ=="], + "event-target-shim": ["event-target-shim@5.0.1", "", {}, "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="], "eventemitter3": ["eventemitter3@4.0.7", "", {}, "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="], @@ -2314,6 +2356,8 @@ "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], + "partysocket": ["partysocket@1.1.10", "", { "dependencies": { "event-target-polyfill": "^0.0.4" } }, "sha512-ACfn0P6lQuj8/AqB4L5ZDFcIEbpnIteNNObrlxqV1Ge80GTGhjuJ2sNKwNQlFzhGi4kI7fP/C1Eqh8TR78HjDQ=="], + "path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="], "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], @@ -2768,7 +2812,7 @@ "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="], - "type-fest": ["type-fest@2.19.0", "", {}, "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA=="], + "type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="], "type-is": ["type-is@2.0.1", "", { "dependencies": { "content-type": "^1.0.5", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw=="], @@ -2790,6 +2834,8 @@ "unenv": ["unenv@2.0.0-rc.14", "", { "dependencies": { "defu": "^6.1.4", "exsolve": "^1.0.1", "ohash": "^2.0.10", "pathe": "^2.0.3", "ufo": "^1.5.4" } }, "sha512-od496pShMen7nOy5VmVJCnq8rptd45vh6Nx/r2iPbrba6pa6p+tS2ywuIHRZ/OBvSbQZB0kWvpO9XBNVFXHD3Q=="], + "unicode-segmenter": ["unicode-segmenter@0.14.5", "", {}, "sha512-jHGmj2LUuqDcX3hqY12Ql+uhUTn8huuxNZGq7GvtF6bSybzH3aFgedYu/KTzQStEgt1Ra2F3HxadNXsNjb3m3g=="], + "universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="], "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], @@ -2884,7 +2930,7 @@ "yesno": ["yesno@0.4.0", "", {}, "sha512-tdBxmHvbXPBKYIg81bMCB7bVeDmHkRzk5rVJyYYXurwKkHq/MCd8rz4HSJUP7hW0H2NlXiq8IFiWvYKEHhlotA=="], - "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + "yocto-queue": ["yocto-queue@1.2.2", "", {}, "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ=="], "youch": ["youch@3.2.3", "", { "dependencies": { "cookie": "^0.5.0", "mustache": "^4.2.0", "stacktracey": "^2.1.8" } }, "sha512-ZBcWz/uzZaQVdCvfV4uk616Bbpf2ee+F/AvuKDR5EwX/Y4v06xWdtMluqTD7+KlZdM93lLm9gMZYo0sKBS0pgw=="], @@ -2896,12 +2942,16 @@ "zx": ["zx@8.8.4", "", { "bin": { "zx": "build/cli.js" } }, "sha512-44GcD+ZlM/v1OQtbwnSxLPcoE1ZEUICmR+RSbJZLAqfIixNLuMjLyh0DcS75OyfJ/sWYAwCWDmDvJ4hdnANAPQ=="], + "@atcute/lexicons/@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], + "@atproto-labs/fetch-node/ipaddr.js": ["ipaddr.js@2.2.0", "", {}, "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA=="], "@atproto-labs/fetch-node/undici": ["undici@6.22.0", "", {}, "sha512-hU/10obOIu62MGYjdskASR3CUAiYaFTtC9Pa6vHyf//mAipSvSQg6od2CnJswq7fvzNS3zJhxoRkgNVaHurWKw=="], "@atproto-labs/identity-resolver/@atproto/syntax": ["@atproto/syntax@0.4.0", "", {}, "sha512-b9y5ceHS8YKOfP3mdKmwAx5yVj9294UN7FG2XzP6V5aKUdFazEYRnR9m5n5ZQFKa3GNvz7de9guZCJ/sUTcOAA=="], + "@atproto/crypto/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + "@atproto/jwk-jose/jose": ["jose@5.10.0", "", {}, "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg=="], "@atproto/lex-cli/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], @@ -2962,6 +3012,8 @@ "@jridgewell/remapping/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], + "@noble/curves/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + "@opentelemetry/exporter-logs-otlp-grpc/@opentelemetry/core": ["@opentelemetry/core@2.0.0", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-SLX36allrcnVaPYG3R78F/UZZsBsvbc7lMCLx37LyH5MJ1KAAZ2E3mW9OAD3zGz0G8q/BtoS5VUrjzDydhD6LQ=="], "@opentelemetry/exporter-logs-otlp-http/@opentelemetry/core": ["@opentelemetry/core@2.0.0", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-SLX36allrcnVaPYG3R78F/UZZsBsvbc7lMCLx37LyH5MJ1KAAZ2E3mW9OAD3zGz0G8q/BtoS5VUrjzDydhD6LQ=="], @@ -3046,6 +3098,10 @@ "@poppinss/dumper/supports-color": ["supports-color@10.2.2", "", {}, "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g=="], + "@rocksky/cli/drizzle-orm": ["drizzle-orm@0.45.1", "", { "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=4", "@electric-sql/pglite": ">=0.2.0", "@libsql/client": ">=0.10.0", "@libsql/client-wasm": ">=0.10.0", "@neondatabase/serverless": ">=0.10.0", "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1.13", "@prisma/client": "*", "@tidbcloud/serverless": "*", "@types/better-sqlite3": "*", "@types/pg": "*", "@types/sql.js": "*", "@upstash/redis": ">=1.34.7", "@vercel/postgres": ">=0.8.0", "@xata.io/client": "*", "better-sqlite3": ">=7", "bun-types": "*", "expo-sqlite": ">=14.0.0", "gel": ">=2", "knex": "*", "kysely": "*", "mysql2": ">=2", "pg": ">=8", "postgres": ">=3", "sql.js": ">=1", "sqlite3": ">=5" }, "optionalPeers": ["@aws-sdk/client-rds-data", "@cloudflare/workers-types", "@electric-sql/pglite", "@libsql/client", "@libsql/client-wasm", "@neondatabase/serverless", "@op-engineering/op-sqlite", "@opentelemetry/api", "@planetscale/database", "@prisma/client", "@tidbcloud/serverless", "@types/better-sqlite3", "@types/pg", "@types/sql.js", "@upstash/redis", "@vercel/postgres", "@xata.io/client", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "knex", "kysely", "mysql2", "pg", "postgres", "sql.js", "sqlite3"] }, "sha512-Te0FOdKIistGNPMq2jscdqngBRfBpC8uMFVwqjf6gtTVJHIQ/dosgV/CLBU2N4ZJBsXL5savCba9b0YJskKdcA=="], + + "@rocksky/cli/effect": ["effect@3.19.14", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "fast-check": "^3.23.1" } }, "sha512-3vwdq0zlvQOxXzXNKRIPKTqZNMyGCdaFUBfMPqpsyzZDre67kgC1EEHDV4EoQTovJ4w5fmJW756f86kkuz7WFA=="], + "@rocksky/doc/vitest": ["vitest@2.1.9", "", { "dependencies": { "@vitest/expect": "2.1.9", "@vitest/mocker": "2.1.9", "@vitest/pretty-format": "^2.1.9", "@vitest/runner": "2.1.9", "@vitest/snapshot": "2.1.9", "@vitest/spy": "2.1.9", "@vitest/utils": "2.1.9", "chai": "^5.1.2", "debug": "^4.3.7", "expect-type": "^1.1.0", "magic-string": "^0.30.12", "pathe": "^1.1.2", "std-env": "^3.8.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.1", "tinypool": "^1.0.1", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", "vite-node": "2.1.9", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", "@vitest/browser": "2.1.9", "@vitest/ui": "2.1.9", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@types/node", "@vitest/browser", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q=="], "@rocksky/spotify-proxy/@cloudflare/vitest-pool-workers": ["@cloudflare/vitest-pool-workers@0.8.71", "", { "dependencies": { "birpc": "0.2.14", "cjs-module-lexer": "^1.2.3", "devalue": "^5.3.2", "miniflare": "4.20250906.0", "semver": "^7.7.1", "wrangler": "4.35.0", "zod": "^3.22.3" }, "peerDependencies": { "@vitest/runner": "2.0.x - 3.2.x", "@vitest/snapshot": "2.0.x - 3.2.x", "vitest": "2.0.x - 3.2.x" } }, "sha512-keu2HCLQfRNwbmLBCDXJgCFpANTaYnQpE01fBOo4CNwiWHUT7SZGN7w64RKiSWRHyYppStXBuE5Ng7F42+flpg=="], @@ -3068,6 +3124,8 @@ "@storybook/addon-actions/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], + "@storybook/csf/type-fest": ["type-fest@2.19.0", "", {}, "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA=="], + "@storybook/csf-plugin/unplugin": ["unplugin@1.16.1", "", { "dependencies": { "acorn": "^8.14.0", "webpack-virtual-modules": "^0.6.2" } }, "sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w=="], "@storybook/instrumenter/@vitest/utils": ["@vitest/utils@2.1.9", "", { "dependencies": { "@vitest/pretty-format": "2.1.9", "loupe": "^3.1.2", "tinyrainbow": "^1.2.0" } }, "sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ=="], @@ -3194,6 +3252,8 @@ "mlly/pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + "p-limit/yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + "pkg-types/pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], "posthog-js/fflate": ["fflate@0.4.8", "", {}, "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="],