A decentralized music tracking and discovery platform built on AT Protocol 🎵

Add getKnownFollowers lexicon and types

Add app.rocksky.graph.getKnownFollowers lexicon (JSON/PKL), generated
TypeScript types, and register the method in the lexicon index and
schema dictionary. Also tidy QueryParams formatting in several generated
type files. Add getKnownFollowers lexicon and types

Add lexicon JSON and PKL defs for app.rocksky.graph.getKnownFollowers,
register it in the lexicons index, and add generated TypeScript types
and client method.

+233
+58
apps/api/lexicons/graph/getKnownFollowers.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.rocksky.graph.getKnownFollowers", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Enumerates accounts which follow a specified account (actor) and are followed by the viewer.", 8 + "parameters": { 9 + "type": "params", 10 + "required": [ 11 + "actor" 12 + ], 13 + "properties": { 14 + "actor": { 15 + "type": "string", 16 + "format": "at-identifier" 17 + }, 18 + "limit": { 19 + "type": "integer", 20 + "maximum": 100, 21 + "minimum": 1, 22 + "default": 50 23 + }, 24 + "cursor": { 25 + "type": "string" 26 + } 27 + } 28 + }, 29 + "output": { 30 + "encoding": "application/json", 31 + "schema": { 32 + "type": "object", 33 + "required": [ 34 + "subject", 35 + "followers" 36 + ], 37 + "properties": { 38 + "subject": { 39 + "type": "ref", 40 + "ref": "app.rocksky.actor.defs#profileViewBasic" 41 + }, 42 + "followers": { 43 + "type": "array", 44 + "items": { 45 + "type": "ref", 46 + "ref": "app.rocksky.actor.defs#profileViewBasic" 47 + } 48 + }, 49 + "cursor": { 50 + "type": "string", 51 + "description": "A cursor value to pass to subsequent calls to get the next page of results." 52 + } 53 + } 54 + } 55 + } 56 + } 57 + } 58 + }
+55
apps/api/pkl/defs/graph/getKnownFollowers.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "app.rocksky.graph.getKnownFollowers" 5 + defs = new Mapping<String, Query> { 6 + ["main"] { 7 + type = "query" 8 + description = 9 + "Enumerates accounts which follow a specified account (actor) and are followed by the viewer." 10 + parameters = new Params { 11 + required = List("actor") 12 + properties { 13 + ["actor"] = new StringType { 14 + type = "string" 15 + format = "at-identifier" 16 + } 17 + ["limit"] = new IntegerType { 18 + type = "integer" 19 + maximum = 100 20 + minimum = 1 21 + default = 50 22 + } 23 + ["cursor"] = new StringType { 24 + type = "string" 25 + } 26 + } 27 + } 28 + 29 + output { 30 + encoding = "application/json" 31 + schema = new ObjectType { 32 + type = "object" 33 + required = List("subject", "followers") 34 + properties { 35 + ["subject"] = new Ref { 36 + type = "ref" 37 + ref = "app.rocksky.actor.defs#profileViewBasic" 38 + } 39 + ["followers"] = new Array { 40 + type = "array" 41 + items = new Ref { 42 + type = "ref" 43 + ref = "app.rocksky.actor.defs#profileViewBasic" 44 + } 45 + } 46 + ["cursor"] = new StringType { 47 + type = "string" 48 + description = 49 + "A cursor value to pass to subsequent calls to get the next page of results." 50 + } 51 + } 52 + } 53 + } 54 + } 55 + }
+12
apps/api/src/lexicon/index.ts
··· 50 50 import type * as AppRockskyGoogledriveGetFiles from "./types/app/rocksky/googledrive/getFiles"; 51 51 import type * as AppRockskyGraphGetFollowers from "./types/app/rocksky/graph/getFollowers"; 52 52 import type * as AppRockskyGraphGetFollows from "./types/app/rocksky/graph/getFollows"; 53 + import type * as AppRockskyGraphGetKnownFollowers from "./types/app/rocksky/graph/getKnownFollowers"; 53 54 import type * as AppRockskyLikeDislikeShout from "./types/app/rocksky/like/dislikeShout"; 54 55 import type * as AppRockskyLikeDislikeSong from "./types/app/rocksky/like/dislikeSong"; 55 56 import type * as AppRockskyLikeLikeShout from "./types/app/rocksky/like/likeShout"; ··· 735 736 >, 736 737 ) { 737 738 const nsid = "app.rocksky.graph.getFollows"; // @ts-ignore 739 + return this._server.xrpc.method(nsid, cfg); 740 + } 741 + 742 + getKnownFollowers<AV extends AuthVerifier>( 743 + cfg: ConfigOf< 744 + AV, 745 + AppRockskyGraphGetKnownFollowers.Handler<ExtractAuth<AV>>, 746 + AppRockskyGraphGetKnownFollowers.HandlerReqCtx<ExtractAuth<AV>> 747 + >, 748 + ) { 749 + const nsid = "app.rocksky.graph.getKnownFollowers"; // @ts-ignore 738 750 return this._server.xrpc.method(nsid, cfg); 739 751 } 740 752 }
+56
apps/api/src/lexicon/lexicons.ts
··· 2913 2913 }, 2914 2914 }, 2915 2915 }, 2916 + AppRockskyGraphGetKnownFollowers: { 2917 + lexicon: 1, 2918 + id: "app.rocksky.graph.getKnownFollowers", 2919 + defs: { 2920 + main: { 2921 + type: "query", 2922 + description: 2923 + "Enumerates accounts which follow a specified account (actor) and are followed by the viewer.", 2924 + parameters: { 2925 + type: "params", 2926 + required: ["actor"], 2927 + properties: { 2928 + actor: { 2929 + type: "string", 2930 + format: "at-identifier", 2931 + }, 2932 + limit: { 2933 + type: "integer", 2934 + maximum: 100, 2935 + minimum: 1, 2936 + default: 50, 2937 + }, 2938 + cursor: { 2939 + type: "string", 2940 + }, 2941 + }, 2942 + }, 2943 + output: { 2944 + encoding: "application/json", 2945 + schema: { 2946 + type: "object", 2947 + required: ["subject", "followers"], 2948 + properties: { 2949 + subject: { 2950 + type: "ref", 2951 + ref: "lex:app.rocksky.actor.defs#profileViewBasic", 2952 + }, 2953 + followers: { 2954 + type: "array", 2955 + items: { 2956 + type: "ref", 2957 + ref: "lex:app.rocksky.actor.defs#profileViewBasic", 2958 + }, 2959 + }, 2960 + cursor: { 2961 + type: "string", 2962 + description: 2963 + "A cursor value to pass to subsequent calls to get the next page of results.", 2964 + }, 2965 + }, 2966 + }, 2967 + }, 2968 + }, 2969 + }, 2970 + }, 2916 2971 AppRockskyLikeDislikeShout: { 2917 2972 lexicon: 1, 2918 2973 id: "app.rocksky.like.dislikeShout", ··· 5577 5632 AppRockskyGraphFollow: "app.rocksky.graph.follow", 5578 5633 AppRockskyGraphGetFollowers: "app.rocksky.graph.getFollowers", 5579 5634 AppRockskyGraphGetFollows: "app.rocksky.graph.getFollows", 5635 + AppRockskyGraphGetKnownFollowers: "app.rocksky.graph.getKnownFollowers", 5580 5636 AppRockskyLikeDislikeShout: "app.rocksky.like.dislikeShout", 5581 5637 AppRockskyLikeDislikeSong: "app.rocksky.like.dislikeSong", 5582 5638 AppRockskyLike: "app.rocksky.like",
+52
apps/api/src/lexicon/types/app/rocksky/graph/getKnownFollowers.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as AppRockskyActorDefs from "../actor/defs"; 11 + 12 + export interface QueryParams { 13 + actor: string; 14 + limit: number; 15 + cursor?: string; 16 + } 17 + 18 + export type InputSchema = undefined; 19 + 20 + export interface OutputSchema { 21 + subject: AppRockskyActorDefs.ProfileViewBasic; 22 + followers: AppRockskyActorDefs.ProfileViewBasic[]; 23 + /** A cursor value to pass to subsequent calls to get the next page of results. */ 24 + cursor?: string; 25 + [k: string]: unknown; 26 + } 27 + 28 + export type HandlerInput = undefined; 29 + 30 + export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 + } 35 + 36 + export interface HandlerError { 37 + status: number; 38 + message?: string; 39 + } 40 + 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 + export type Handler<HA extends HandlerAuth = never> = ( 51 + ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;