unspecced getSuggestedFeeds (#3680)
* Reapply "add codegen" This reverts commit 620b10954af90f53e1692c3fd7451c675f1e9956. * add pipethrough * pipethrough header * fix descriptions * rm * codgen/build * suggested starterpacks pipethrough * Reapply "add codegen" This reverts commit 620b10954af90f53e1692c3fd7451c675f1e9956. * add pipethrough * pipethrough header * fix descriptions * rm * codgen/build * add hot * Codegen * Hotter * Category as optional open string * Format * Run codegen for reaction lexicon changes (#3674) * codegen main * changeset * Version packages (#3675) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * add hot * Codegen * Hotter * Category as optional open string * Format * codegen * tidy * required array * getSuggestedFeeds codegen * add pipethrough * add route * update comment * use right viewer * update comment * Feedback * Changset * Format --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Samuel Newman <mozzius@protonmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
4db923ca1c
commit
efb302db1a
.changeset
lexicons/app/bsky/unspecced
packages
api/src/client
bsky/src
api
lexicon
ozone/src/lexicon
pds/src/lexicon
6
.changeset/honest-mice-grow.md
Normal file
6
.changeset/honest-mice-grow.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@atproto/bsky": patch
|
||||
"@atproto/api": patch
|
||||
---
|
||||
|
||||
Add unspecced `getSuggestedFeeds` and associated types
|
37
lexicons/app/bsky/unspecced/getSuggestedFeeds.json
Normal file
37
lexicons/app/bsky/unspecced/getSuggestedFeeds.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.unspecced.getSuggestedFeeds",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Get a list of suggested feeds",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 25,
|
||||
"default": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["feeds"],
|
||||
"properties": {
|
||||
"feeds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "ref",
|
||||
"ref": "app.bsky.feed.defs#generatorView"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
lexicons/app/bsky/unspecced/getSuggestedFeedsSkeleton.json
Normal file
42
lexicons/app/bsky/unspecced/getSuggestedFeedsSkeleton.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"lexicon": 1,
|
||||
"id": "app.bsky.unspecced.getSuggestedFeedsSkeleton",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "query",
|
||||
"description": "Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds",
|
||||
"parameters": {
|
||||
"type": "params",
|
||||
"properties": {
|
||||
"viewer": {
|
||||
"type": "string",
|
||||
"format": "did",
|
||||
"description": "DID of the account making the request (not included for public/unauthenticated queries)."
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 25,
|
||||
"default": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"encoding": "application/json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["feeds"],
|
||||
"properties": {
|
||||
"feeds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "at-uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -177,6 +177,8 @@ import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js'
|
||||
import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs.js'
|
||||
import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
||||
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js'
|
||||
import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js'
|
||||
@ -423,6 +425,8 @@ export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js'
|
||||
export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs.js'
|
||||
export * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
||||
export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
||||
export * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js'
|
||||
export * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js'
|
||||
export * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js'
|
||||
export * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js'
|
||||
export * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js'
|
||||
@ -3248,6 +3252,30 @@ export class AppBskyUnspeccedNS {
|
||||
)
|
||||
}
|
||||
|
||||
getSuggestedFeeds(
|
||||
params?: AppBskyUnspeccedGetSuggestedFeeds.QueryParams,
|
||||
opts?: AppBskyUnspeccedGetSuggestedFeeds.CallOptions,
|
||||
): Promise<AppBskyUnspeccedGetSuggestedFeeds.Response> {
|
||||
return this._client.call(
|
||||
'app.bsky.unspecced.getSuggestedFeeds',
|
||||
params,
|
||||
undefined,
|
||||
opts,
|
||||
)
|
||||
}
|
||||
|
||||
getSuggestedFeedsSkeleton(
|
||||
params?: AppBskyUnspeccedGetSuggestedFeedsSkeleton.QueryParams,
|
||||
opts?: AppBskyUnspeccedGetSuggestedFeedsSkeleton.CallOptions,
|
||||
): Promise<AppBskyUnspeccedGetSuggestedFeedsSkeleton.Response> {
|
||||
return this._client.call(
|
||||
'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
params,
|
||||
undefined,
|
||||
opts,
|
||||
)
|
||||
}
|
||||
|
||||
getSuggestedStarterPacks(
|
||||
params?: AppBskyUnspeccedGetSuggestedStarterPacks.QueryParams,
|
||||
opts?: AppBskyUnspeccedGetSuggestedStarterPacks.CallOptions,
|
||||
|
@ -9884,6 +9884,87 @@ export const schemaDict = {
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedFeeds: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedFeeds',
|
||||
defs: {
|
||||
main: {
|
||||
type: 'query',
|
||||
description: 'Get a list of suggested feeds',
|
||||
parameters: {
|
||||
type: 'params',
|
||||
properties: {
|
||||
limit: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
maximum: 25,
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
encoding: 'application/json',
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['feeds'],
|
||||
properties: {
|
||||
feeds: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'ref',
|
||||
ref: 'lex:app.bsky.feed.defs#generatorView',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
defs: {
|
||||
main: {
|
||||
type: 'query',
|
||||
description:
|
||||
'Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds',
|
||||
parameters: {
|
||||
type: 'params',
|
||||
properties: {
|
||||
viewer: {
|
||||
type: 'string',
|
||||
format: 'did',
|
||||
description:
|
||||
'DID of the account making the request (not included for public/unauthenticated queries).',
|
||||
},
|
||||
limit: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
maximum: 25,
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
encoding: 'application/json',
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['feeds'],
|
||||
properties: {
|
||||
feeds: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
format: 'at-uri',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedStarterPacks: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedStarterPacks',
|
||||
@ -15247,6 +15328,9 @@ export const ids = {
|
||||
AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
|
||||
AppBskyUnspeccedGetPopularFeedGenerators:
|
||||
'app.bsky.unspecced.getPopularFeedGenerators',
|
||||
AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton:
|
||||
'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
AppBskyUnspeccedGetSuggestedStarterPacks:
|
||||
'app.bsky.unspecced.getSuggestedStarterPacks',
|
||||
AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:
|
||||
|
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
import { HeadersMap, XRPCError } from '@atproto/xrpc'
|
||||
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import { validate as _validate } from '../../../../lexicons'
|
||||
import {
|
||||
type $Typed,
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import type * as AppBskyFeedDefs from '../feed/defs.js'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
const id = 'app.bsky.unspecced.getSuggestedFeeds'
|
||||
|
||||
export interface QueryParams {
|
||||
limit?: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: AppBskyFeedDefs.GeneratorView[]
|
||||
}
|
||||
|
||||
export interface CallOptions {
|
||||
signal?: AbortSignal
|
||||
headers?: HeadersMap
|
||||
}
|
||||
|
||||
export interface Response {
|
||||
success: boolean
|
||||
headers: HeadersMap
|
||||
data: OutputSchema
|
||||
}
|
||||
|
||||
export function toKnownErr(e: any) {
|
||||
return e
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
import { HeadersMap, XRPCError } from '@atproto/xrpc'
|
||||
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import { validate as _validate } from '../../../../lexicons'
|
||||
import {
|
||||
type $Typed,
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
const id = 'app.bsky.unspecced.getSuggestedFeedsSkeleton'
|
||||
|
||||
export interface QueryParams {
|
||||
/** DID of the account making the request (not included for public/unauthenticated queries). */
|
||||
viewer?: string
|
||||
limit?: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: string[]
|
||||
}
|
||||
|
||||
export interface CallOptions {
|
||||
signal?: AbortSignal
|
||||
headers?: HeadersMap
|
||||
}
|
||||
|
||||
export interface Response {
|
||||
success: boolean
|
||||
headers: HeadersMap
|
||||
data: OutputSchema
|
||||
}
|
||||
|
||||
export function toKnownErr(e: any) {
|
||||
return e
|
||||
}
|
100
packages/bsky/src/api/app/bsky/unspecced/getSuggestedFeeds.ts
Normal file
100
packages/bsky/src/api/app/bsky/unspecced/getSuggestedFeeds.ts
Normal file
@ -0,0 +1,100 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { mapDefined, noUndefinedVals } from '@atproto/common'
|
||||
import { InternalServerError } from '@atproto/xrpc-server'
|
||||
import { AppContext } from '../../../../context'
|
||||
import { HydrateCtx, Hydrator } from '../../../../hydration/hydrator'
|
||||
import { Server } from '../../../../lexicon'
|
||||
import { QueryParams } from '../../../../lexicon/types/app/bsky/unspecced/getTrendingTopics'
|
||||
import {
|
||||
HydrationFnInput,
|
||||
PresentationFnInput,
|
||||
SkeletonFnInput,
|
||||
createPipeline,
|
||||
noRules,
|
||||
} from '../../../../pipeline'
|
||||
import { Views } from '../../../../views'
|
||||
|
||||
export default function (server: Server, ctx: AppContext) {
|
||||
const getFeeds = createPipeline(skeleton, hydration, noRules, presentation)
|
||||
server.app.bsky.unspecced.getSuggestedFeeds({
|
||||
auth: ctx.authVerifier.standardOptional,
|
||||
handler: async ({ auth, params, req }) => {
|
||||
const viewer = auth.credentials.iss
|
||||
const labelers = ctx.reqLabelers(req)
|
||||
const hydrateCtx = await ctx.hydrator.createContext({ labelers, viewer })
|
||||
const headers = noUndefinedVals({
|
||||
'accept-language': req.headers['accept-language'],
|
||||
'x-bsky-topics': Array.isArray(req.headers['x-bsky-topics'])
|
||||
? req.headers['x-bsky-topics'].join(',')
|
||||
: req.headers['x-bsky-topics'],
|
||||
})
|
||||
const { ...result } = await getFeeds(
|
||||
{
|
||||
...params,
|
||||
viewer: viewer ?? undefined,
|
||||
hydrateCtx: hydrateCtx.copy({ viewer }),
|
||||
headers,
|
||||
},
|
||||
ctx,
|
||||
)
|
||||
return {
|
||||
encoding: 'application/json',
|
||||
body: result,
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const skeleton = async (input: SkeletonFnInput<Context, Params>) => {
|
||||
const { params, ctx } = input
|
||||
if (ctx.topicsAgent) {
|
||||
const res =
|
||||
await ctx.topicsAgent.app.bsky.unspecced.getSuggestedFeedsSkeleton(
|
||||
{
|
||||
limit: params.limit,
|
||||
viewer: params.viewer,
|
||||
},
|
||||
{
|
||||
headers: params.headers,
|
||||
},
|
||||
)
|
||||
|
||||
return res.data
|
||||
} else {
|
||||
throw new InternalServerError('Topics agent not available')
|
||||
}
|
||||
}
|
||||
|
||||
const hydration = async (
|
||||
input: HydrationFnInput<Context, Params, SkeletonState>,
|
||||
) => {
|
||||
const { ctx, params, skeleton } = input
|
||||
return await ctx.hydrator.hydrateFeedGens(skeleton.feeds, params.hydrateCtx)
|
||||
}
|
||||
|
||||
const presentation = (
|
||||
input: PresentationFnInput<Context, Params, SkeletonState>,
|
||||
) => {
|
||||
const { ctx, skeleton, hydration } = input
|
||||
|
||||
return {
|
||||
feeds: mapDefined(skeleton.feeds, (uri) =>
|
||||
ctx.views.feedGenerator(uri, hydration),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
type Context = {
|
||||
hydrator: Hydrator
|
||||
views: Views
|
||||
topicsAgent: AtpAgent | undefined
|
||||
}
|
||||
|
||||
type Params = QueryParams & {
|
||||
hydrateCtx: HydrateCtx & { viewer: string | null }
|
||||
headers: Record<string, string>
|
||||
}
|
||||
|
||||
type SkeletonState = {
|
||||
feeds: string[]
|
||||
}
|
@ -49,6 +49,7 @@ import registerPush from './app/bsky/notification/registerPush'
|
||||
import updateSeen from './app/bsky/notification/updateSeen'
|
||||
import getConfig from './app/bsky/unspecced/getConfig'
|
||||
import getPopularFeedGenerators from './app/bsky/unspecced/getPopularFeedGenerators'
|
||||
import getUnspeccedSuggestedFeeds from './app/bsky/unspecced/getSuggestedFeeds'
|
||||
import getSuggestedStarterPacks from './app/bsky/unspecced/getSuggestedStarterPacks'
|
||||
import getTaggedSuggestions from './app/bsky/unspecced/getTaggedSuggestions'
|
||||
import getTrendingTopics from './app/bsky/unspecced/getTrendingTopics'
|
||||
@ -110,6 +111,9 @@ export default function (server: Server, ctx: AppContext) {
|
||||
getTrendingTopics(server, ctx)
|
||||
getTrends(server, ctx)
|
||||
getSuggestedStarterPacks(server, ctx)
|
||||
getUnspeccedSuggestedFeeds(server, ctx)
|
||||
getTrends(server, ctx)
|
||||
getSuggestedStarterPacks(server, ctx)
|
||||
getLabelerServices(server, ctx)
|
||||
searchActors(server, ctx)
|
||||
searchActorsTypeahead(server, ctx)
|
||||
|
@ -143,6 +143,8 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
|
||||
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
||||
import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
||||
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js'
|
||||
import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js'
|
||||
@ -1913,6 +1915,28 @@ export class AppBskyUnspeccedNS {
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedFeeds<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
AppBskyUnspeccedGetSuggestedFeeds.Handler<ExtractAuth<AV>>,
|
||||
AppBskyUnspeccedGetSuggestedFeeds.HandlerReqCtx<ExtractAuth<AV>>
|
||||
>,
|
||||
) {
|
||||
const nsid = 'app.bsky.unspecced.getSuggestedFeeds' // @ts-ignore
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedFeedsSkeleton<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton.Handler<ExtractAuth<AV>>,
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton.HandlerReqCtx<ExtractAuth<AV>>
|
||||
>,
|
||||
) {
|
||||
const nsid = 'app.bsky.unspecced.getSuggestedFeedsSkeleton' // @ts-ignore
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedStarterPacks<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
|
@ -9884,6 +9884,87 @@ export const schemaDict = {
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedFeeds: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedFeeds',
|
||||
defs: {
|
||||
main: {
|
||||
type: 'query',
|
||||
description: 'Get a list of suggested feeds',
|
||||
parameters: {
|
||||
type: 'params',
|
||||
properties: {
|
||||
limit: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
maximum: 25,
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
encoding: 'application/json',
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['feeds'],
|
||||
properties: {
|
||||
feeds: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'ref',
|
||||
ref: 'lex:app.bsky.feed.defs#generatorView',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
defs: {
|
||||
main: {
|
||||
type: 'query',
|
||||
description:
|
||||
'Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds',
|
||||
parameters: {
|
||||
type: 'params',
|
||||
properties: {
|
||||
viewer: {
|
||||
type: 'string',
|
||||
format: 'did',
|
||||
description:
|
||||
'DID of the account making the request (not included for public/unauthenticated queries).',
|
||||
},
|
||||
limit: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
maximum: 25,
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
encoding: 'application/json',
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['feeds'],
|
||||
properties: {
|
||||
feeds: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
format: 'at-uri',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedStarterPacks: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedStarterPacks',
|
||||
@ -12127,6 +12208,9 @@ export const ids = {
|
||||
AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
|
||||
AppBskyUnspeccedGetPopularFeedGenerators:
|
||||
'app.bsky.unspecced.getPopularFeedGenerators',
|
||||
AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton:
|
||||
'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
AppBskyUnspeccedGetSuggestedStarterPacks:
|
||||
'app.bsky.unspecced.getSuggestedStarterPacks',
|
||||
AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:
|
||||
|
@ -0,0 +1,54 @@
|
||||
/**
|
||||
* GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
import express from 'express'
|
||||
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import { validate as _validate } from '../../../../lexicons'
|
||||
import {
|
||||
type $Typed,
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||
import type * as AppBskyFeedDefs from '../feed/defs.js'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
const id = 'app.bsky.unspecced.getSuggestedFeeds'
|
||||
|
||||
export interface QueryParams {
|
||||
limit: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: AppBskyFeedDefs.GeneratorView[]
|
||||
}
|
||||
|
||||
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<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
resetRouteRateLimits: () => Promise<void>
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -0,0 +1,55 @@
|
||||
/**
|
||||
* GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
import express from 'express'
|
||||
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import { validate as _validate } from '../../../../lexicons'
|
||||
import {
|
||||
type $Typed,
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
const id = 'app.bsky.unspecced.getSuggestedFeedsSkeleton'
|
||||
|
||||
export interface QueryParams {
|
||||
/** DID of the account making the request (not included for public/unauthenticated queries). */
|
||||
viewer?: string
|
||||
limit: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: string[]
|
||||
}
|
||||
|
||||
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<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
resetRouteRateLimits: () => Promise<void>
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -143,6 +143,8 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
|
||||
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
||||
import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
||||
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js'
|
||||
import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js'
|
||||
@ -1958,6 +1960,28 @@ export class AppBskyUnspeccedNS {
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedFeeds<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
AppBskyUnspeccedGetSuggestedFeeds.Handler<ExtractAuth<AV>>,
|
||||
AppBskyUnspeccedGetSuggestedFeeds.HandlerReqCtx<ExtractAuth<AV>>
|
||||
>,
|
||||
) {
|
||||
const nsid = 'app.bsky.unspecced.getSuggestedFeeds' // @ts-ignore
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedFeedsSkeleton<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton.Handler<ExtractAuth<AV>>,
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton.HandlerReqCtx<ExtractAuth<AV>>
|
||||
>,
|
||||
) {
|
||||
const nsid = 'app.bsky.unspecced.getSuggestedFeedsSkeleton' // @ts-ignore
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedStarterPacks<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
|
@ -9884,6 +9884,87 @@ export const schemaDict = {
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedFeeds: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedFeeds',
|
||||
defs: {
|
||||
main: {
|
||||
type: 'query',
|
||||
description: 'Get a list of suggested feeds',
|
||||
parameters: {
|
||||
type: 'params',
|
||||
properties: {
|
||||
limit: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
maximum: 25,
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
encoding: 'application/json',
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['feeds'],
|
||||
properties: {
|
||||
feeds: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'ref',
|
||||
ref: 'lex:app.bsky.feed.defs#generatorView',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
defs: {
|
||||
main: {
|
||||
type: 'query',
|
||||
description:
|
||||
'Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds',
|
||||
parameters: {
|
||||
type: 'params',
|
||||
properties: {
|
||||
viewer: {
|
||||
type: 'string',
|
||||
format: 'did',
|
||||
description:
|
||||
'DID of the account making the request (not included for public/unauthenticated queries).',
|
||||
},
|
||||
limit: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
maximum: 25,
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
encoding: 'application/json',
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['feeds'],
|
||||
properties: {
|
||||
feeds: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
format: 'at-uri',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedStarterPacks: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedStarterPacks',
|
||||
@ -15247,6 +15328,9 @@ export const ids = {
|
||||
AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
|
||||
AppBskyUnspeccedGetPopularFeedGenerators:
|
||||
'app.bsky.unspecced.getPopularFeedGenerators',
|
||||
AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton:
|
||||
'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
AppBskyUnspeccedGetSuggestedStarterPacks:
|
||||
'app.bsky.unspecced.getSuggestedStarterPacks',
|
||||
AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:
|
||||
|
@ -0,0 +1,54 @@
|
||||
/**
|
||||
* GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
import express from 'express'
|
||||
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import { validate as _validate } from '../../../../lexicons'
|
||||
import {
|
||||
type $Typed,
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||
import type * as AppBskyFeedDefs from '../feed/defs.js'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
const id = 'app.bsky.unspecced.getSuggestedFeeds'
|
||||
|
||||
export interface QueryParams {
|
||||
limit: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: AppBskyFeedDefs.GeneratorView[]
|
||||
}
|
||||
|
||||
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<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
resetRouteRateLimits: () => Promise<void>
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -0,0 +1,55 @@
|
||||
/**
|
||||
* GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
import express from 'express'
|
||||
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import { validate as _validate } from '../../../../lexicons'
|
||||
import {
|
||||
type $Typed,
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
const id = 'app.bsky.unspecced.getSuggestedFeedsSkeleton'
|
||||
|
||||
export interface QueryParams {
|
||||
/** DID of the account making the request (not included for public/unauthenticated queries). */
|
||||
viewer?: string
|
||||
limit: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: string[]
|
||||
}
|
||||
|
||||
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<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
resetRouteRateLimits: () => Promise<void>
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -143,6 +143,8 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
|
||||
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
||||
import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
||||
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js'
|
||||
import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js'
|
||||
import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js'
|
||||
@ -1958,6 +1960,28 @@ export class AppBskyUnspeccedNS {
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedFeeds<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
AppBskyUnspeccedGetSuggestedFeeds.Handler<ExtractAuth<AV>>,
|
||||
AppBskyUnspeccedGetSuggestedFeeds.HandlerReqCtx<ExtractAuth<AV>>
|
||||
>,
|
||||
) {
|
||||
const nsid = 'app.bsky.unspecced.getSuggestedFeeds' // @ts-ignore
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedFeedsSkeleton<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton.Handler<ExtractAuth<AV>>,
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton.HandlerReqCtx<ExtractAuth<AV>>
|
||||
>,
|
||||
) {
|
||||
const nsid = 'app.bsky.unspecced.getSuggestedFeedsSkeleton' // @ts-ignore
|
||||
return this._server.xrpc.method(nsid, cfg)
|
||||
}
|
||||
|
||||
getSuggestedStarterPacks<AV extends AuthVerifier>(
|
||||
cfg: ConfigOf<
|
||||
AV,
|
||||
|
@ -9884,6 +9884,87 @@ export const schemaDict = {
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedFeeds: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedFeeds',
|
||||
defs: {
|
||||
main: {
|
||||
type: 'query',
|
||||
description: 'Get a list of suggested feeds',
|
||||
parameters: {
|
||||
type: 'params',
|
||||
properties: {
|
||||
limit: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
maximum: 25,
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
encoding: 'application/json',
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['feeds'],
|
||||
properties: {
|
||||
feeds: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'ref',
|
||||
ref: 'lex:app.bsky.feed.defs#generatorView',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
defs: {
|
||||
main: {
|
||||
type: 'query',
|
||||
description:
|
||||
'Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds',
|
||||
parameters: {
|
||||
type: 'params',
|
||||
properties: {
|
||||
viewer: {
|
||||
type: 'string',
|
||||
format: 'did',
|
||||
description:
|
||||
'DID of the account making the request (not included for public/unauthenticated queries).',
|
||||
},
|
||||
limit: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
maximum: 25,
|
||||
default: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
encoding: 'application/json',
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['feeds'],
|
||||
properties: {
|
||||
feeds: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
format: 'at-uri',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
AppBskyUnspeccedGetSuggestedStarterPacks: {
|
||||
lexicon: 1,
|
||||
id: 'app.bsky.unspecced.getSuggestedStarterPacks',
|
||||
@ -15247,6 +15328,9 @@ export const ids = {
|
||||
AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
|
||||
AppBskyUnspeccedGetPopularFeedGenerators:
|
||||
'app.bsky.unspecced.getPopularFeedGenerators',
|
||||
AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
|
||||
AppBskyUnspeccedGetSuggestedFeedsSkeleton:
|
||||
'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
||||
AppBskyUnspeccedGetSuggestedStarterPacks:
|
||||
'app.bsky.unspecced.getSuggestedStarterPacks',
|
||||
AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:
|
||||
|
@ -0,0 +1,54 @@
|
||||
/**
|
||||
* GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
import express from 'express'
|
||||
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import { validate as _validate } from '../../../../lexicons'
|
||||
import {
|
||||
type $Typed,
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||
import type * as AppBskyFeedDefs from '../feed/defs.js'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
const id = 'app.bsky.unspecced.getSuggestedFeeds'
|
||||
|
||||
export interface QueryParams {
|
||||
limit: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: AppBskyFeedDefs.GeneratorView[]
|
||||
}
|
||||
|
||||
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<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
resetRouteRateLimits: () => Promise<void>
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -0,0 +1,55 @@
|
||||
/**
|
||||
* GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
import express from 'express'
|
||||
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import { validate as _validate } from '../../../../lexicons'
|
||||
import {
|
||||
type $Typed,
|
||||
is$typed as _is$typed,
|
||||
type OmitKey,
|
||||
} from '../../../../util'
|
||||
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||
|
||||
const is$typed = _is$typed,
|
||||
validate = _validate
|
||||
const id = 'app.bsky.unspecced.getSuggestedFeedsSkeleton'
|
||||
|
||||
export interface QueryParams {
|
||||
/** DID of the account making the request (not included for public/unauthenticated queries). */
|
||||
viewer?: string
|
||||
limit: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: string[]
|
||||
}
|
||||
|
||||
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<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
resetRouteRateLimits: () => Promise<void>
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
Loading…
x
Reference in New Issue
Block a user