@atproto/bsky 0.0.135 → 0.0.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/api/app/bsky/unspecced/getSuggestedFeeds.d.ts +4 -0
- package/dist/api/app/bsky/unspecced/getSuggestedFeeds.d.ts.map +1 -0
- package/dist/api/app/bsky/unspecced/getSuggestedFeeds.js +59 -0
- package/dist/api/app/bsky/unspecced/getSuggestedFeeds.js.map +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +4 -0
- package/dist/api/index.js.map +1 -1
- package/dist/lexicon/index.d.ts +4 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +8 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +158 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +81 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.js +7 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.d.ts +37 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js +7 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js.map +1 -0
- package/package.json +13 -13
- package/src/api/app/bsky/unspecced/getSuggestedFeeds.ts +100 -0
- package/src/api/index.ts +4 -0
- package/src/lexicon/index.ts +24 -0
- package/src/lexicon/lexicons.ts +84 -0
- package/src/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.ts +54 -0
- package/src/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts +55 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express';
|
|
5
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
|
|
6
|
+
import type * as AppBskyFeedDefs from '../feed/defs.js';
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
limit: number;
|
|
9
|
+
}
|
|
10
|
+
export type InputSchema = undefined;
|
|
11
|
+
export interface OutputSchema {
|
|
12
|
+
feeds: AppBskyFeedDefs.GeneratorView[];
|
|
13
|
+
}
|
|
14
|
+
export type HandlerInput = undefined;
|
|
15
|
+
export interface HandlerSuccess {
|
|
16
|
+
encoding: 'application/json';
|
|
17
|
+
body: OutputSchema;
|
|
18
|
+
headers?: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface HandlerError {
|
|
23
|
+
status: number;
|
|
24
|
+
message?: string;
|
|
25
|
+
}
|
|
26
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
|
27
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
28
|
+
auth: HA;
|
|
29
|
+
params: QueryParams;
|
|
30
|
+
input: HandlerInput;
|
|
31
|
+
req: express.Request;
|
|
32
|
+
res: express.Response;
|
|
33
|
+
resetRouteRateLimits: () => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
36
|
+
//# sourceMappingURL=getSuggestedFeeds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSuggestedFeeds.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAS7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,KAAK,eAAe,MAAM,iBAAiB,CAAA;AAMvD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,eAAe,CAAC,aAAa,EAAE,CAAA;CACvC;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'app.bsky.unspecced.getSuggestedFeeds';
|
|
7
|
+
//# sourceMappingURL=getSuggestedFeeds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSuggestedFeeds.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.ts"],"names":[],"mappings":";;AAMA,mDAA4D;AAC5D,2CAIyB;AAIzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,sCAAsC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express';
|
|
5
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
|
|
6
|
+
export interface QueryParams {
|
|
7
|
+
/** DID of the account making the request (not included for public/unauthenticated queries). */
|
|
8
|
+
viewer?: string;
|
|
9
|
+
limit: number;
|
|
10
|
+
}
|
|
11
|
+
export type InputSchema = undefined;
|
|
12
|
+
export interface OutputSchema {
|
|
13
|
+
feeds: string[];
|
|
14
|
+
}
|
|
15
|
+
export type HandlerInput = undefined;
|
|
16
|
+
export interface HandlerSuccess {
|
|
17
|
+
encoding: 'application/json';
|
|
18
|
+
body: OutputSchema;
|
|
19
|
+
headers?: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface HandlerError {
|
|
24
|
+
status: number;
|
|
25
|
+
message?: string;
|
|
26
|
+
}
|
|
27
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
|
28
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
29
|
+
auth: HA;
|
|
30
|
+
params: QueryParams;
|
|
31
|
+
input: HandlerInput;
|
|
32
|
+
req: express.Request;
|
|
33
|
+
res: express.Response;
|
|
34
|
+
resetRouteRateLimits: () => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
37
|
+
//# sourceMappingURL=getSuggestedFeedsSkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSuggestedFeedsSkeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAS7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,WAAW;IAC1B,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'app.bsky.unspecced.getSuggestedFeedsSkeleton';
|
|
7
|
+
//# sourceMappingURL=getSuggestedFeedsSkeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSuggestedFeedsSkeleton.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts"],"names":[],"mappings":";;AAMA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8CAA8C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/bsky",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.136",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Reference implementation of app.bsky App View (Bluesky API)",
|
|
6
6
|
"keywords": [
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
"uint8arrays": "3.0.0",
|
|
50
50
|
"undici": "^6.19.8",
|
|
51
51
|
"@atproto-labs/fetch-node": "0.1.8",
|
|
52
|
-
"@atproto-labs/xrpc-utils": "0.0.
|
|
53
|
-
"@atproto/api": "^0.14.
|
|
54
|
-
"@atproto/common": "^0.4.
|
|
52
|
+
"@atproto-labs/xrpc-utils": "0.0.11",
|
|
53
|
+
"@atproto/api": "^0.14.19",
|
|
54
|
+
"@atproto/common": "^0.4.10",
|
|
55
55
|
"@atproto/crypto": "^0.4.4",
|
|
56
56
|
"@atproto/did": "^0.1.5",
|
|
57
|
-
"@atproto/identity": "^0.4.
|
|
58
|
-
"@atproto/lexicon": "^0.4.
|
|
59
|
-
"@atproto/repo": "^0.
|
|
60
|
-
"@atproto/sync": "^0.1.
|
|
57
|
+
"@atproto/identity": "^0.4.7",
|
|
58
|
+
"@atproto/lexicon": "^0.4.10",
|
|
59
|
+
"@atproto/repo": "^0.8.0",
|
|
60
|
+
"@atproto/sync": "^0.1.20",
|
|
61
61
|
"@atproto/syntax": "^0.4.0",
|
|
62
|
-
"@atproto/xrpc-server": "^0.7.
|
|
62
|
+
"@atproto/xrpc-server": "^0.7.15"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@bufbuild/buf": "^1.28.1",
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"jest": "^28.1.2",
|
|
75
75
|
"ts-node": "^10.8.2",
|
|
76
76
|
"typescript": "^5.6.3",
|
|
77
|
-
"@atproto/api": "^0.14.
|
|
78
|
-
"@atproto/lex-cli": "^0.7.
|
|
79
|
-
"@atproto/pds": "^0.4.
|
|
80
|
-
"@atproto/xrpc": "^0.6.
|
|
77
|
+
"@atproto/api": "^0.14.19",
|
|
78
|
+
"@atproto/lex-cli": "^0.7.2",
|
|
79
|
+
"@atproto/pds": "^0.4.120",
|
|
80
|
+
"@atproto/xrpc": "^0.6.12"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"codegen": "lex gen-server --yes ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/*",
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import AtpAgent from '@atproto/api'
|
|
2
|
+
import { mapDefined, noUndefinedVals } from '@atproto/common'
|
|
3
|
+
import { InternalServerError } from '@atproto/xrpc-server'
|
|
4
|
+
import { AppContext } from '../../../../context'
|
|
5
|
+
import { HydrateCtx, Hydrator } from '../../../../hydration/hydrator'
|
|
6
|
+
import { Server } from '../../../../lexicon'
|
|
7
|
+
import { QueryParams } from '../../../../lexicon/types/app/bsky/unspecced/getTrendingTopics'
|
|
8
|
+
import {
|
|
9
|
+
HydrationFnInput,
|
|
10
|
+
PresentationFnInput,
|
|
11
|
+
SkeletonFnInput,
|
|
12
|
+
createPipeline,
|
|
13
|
+
noRules,
|
|
14
|
+
} from '../../../../pipeline'
|
|
15
|
+
import { Views } from '../../../../views'
|
|
16
|
+
|
|
17
|
+
export default function (server: Server, ctx: AppContext) {
|
|
18
|
+
const getFeeds = createPipeline(skeleton, hydration, noRules, presentation)
|
|
19
|
+
server.app.bsky.unspecced.getSuggestedFeeds({
|
|
20
|
+
auth: ctx.authVerifier.standardOptional,
|
|
21
|
+
handler: async ({ auth, params, req }) => {
|
|
22
|
+
const viewer = auth.credentials.iss
|
|
23
|
+
const labelers = ctx.reqLabelers(req)
|
|
24
|
+
const hydrateCtx = await ctx.hydrator.createContext({ labelers, viewer })
|
|
25
|
+
const headers = noUndefinedVals({
|
|
26
|
+
'accept-language': req.headers['accept-language'],
|
|
27
|
+
'x-bsky-topics': Array.isArray(req.headers['x-bsky-topics'])
|
|
28
|
+
? req.headers['x-bsky-topics'].join(',')
|
|
29
|
+
: req.headers['x-bsky-topics'],
|
|
30
|
+
})
|
|
31
|
+
const { ...result } = await getFeeds(
|
|
32
|
+
{
|
|
33
|
+
...params,
|
|
34
|
+
viewer: viewer ?? undefined,
|
|
35
|
+
hydrateCtx: hydrateCtx.copy({ viewer }),
|
|
36
|
+
headers,
|
|
37
|
+
},
|
|
38
|
+
ctx,
|
|
39
|
+
)
|
|
40
|
+
return {
|
|
41
|
+
encoding: 'application/json',
|
|
42
|
+
body: result,
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const skeleton = async (input: SkeletonFnInput<Context, Params>) => {
|
|
49
|
+
const { params, ctx } = input
|
|
50
|
+
if (ctx.topicsAgent) {
|
|
51
|
+
const res =
|
|
52
|
+
await ctx.topicsAgent.app.bsky.unspecced.getSuggestedFeedsSkeleton(
|
|
53
|
+
{
|
|
54
|
+
limit: params.limit,
|
|
55
|
+
viewer: params.viewer,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
headers: params.headers,
|
|
59
|
+
},
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
return res.data
|
|
63
|
+
} else {
|
|
64
|
+
throw new InternalServerError('Topics agent not available')
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const hydration = async (
|
|
69
|
+
input: HydrationFnInput<Context, Params, SkeletonState>,
|
|
70
|
+
) => {
|
|
71
|
+
const { ctx, params, skeleton } = input
|
|
72
|
+
return await ctx.hydrator.hydrateFeedGens(skeleton.feeds, params.hydrateCtx)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const presentation = (
|
|
76
|
+
input: PresentationFnInput<Context, Params, SkeletonState>,
|
|
77
|
+
) => {
|
|
78
|
+
const { ctx, skeleton, hydration } = input
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
feeds: mapDefined(skeleton.feeds, (uri) =>
|
|
82
|
+
ctx.views.feedGenerator(uri, hydration),
|
|
83
|
+
),
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type Context = {
|
|
88
|
+
hydrator: Hydrator
|
|
89
|
+
views: Views
|
|
90
|
+
topicsAgent: AtpAgent | undefined
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type Params = QueryParams & {
|
|
94
|
+
hydrateCtx: HydrateCtx & { viewer: string | null }
|
|
95
|
+
headers: Record<string, string>
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
type SkeletonState = {
|
|
99
|
+
feeds: string[]
|
|
100
|
+
}
|
package/src/api/index.ts
CHANGED
|
@@ -49,6 +49,7 @@ import registerPush from './app/bsky/notification/registerPush'
|
|
|
49
49
|
import updateSeen from './app/bsky/notification/updateSeen'
|
|
50
50
|
import getConfig from './app/bsky/unspecced/getConfig'
|
|
51
51
|
import getPopularFeedGenerators from './app/bsky/unspecced/getPopularFeedGenerators'
|
|
52
|
+
import getUnspeccedSuggestedFeeds from './app/bsky/unspecced/getSuggestedFeeds'
|
|
52
53
|
import getSuggestedStarterPacks from './app/bsky/unspecced/getSuggestedStarterPacks'
|
|
53
54
|
import getTaggedSuggestions from './app/bsky/unspecced/getTaggedSuggestions'
|
|
54
55
|
import getTrendingTopics from './app/bsky/unspecced/getTrendingTopics'
|
|
@@ -110,6 +111,9 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
110
111
|
getTrendingTopics(server, ctx)
|
|
111
112
|
getTrends(server, ctx)
|
|
112
113
|
getSuggestedStarterPacks(server, ctx)
|
|
114
|
+
getUnspeccedSuggestedFeeds(server, ctx)
|
|
115
|
+
getTrends(server, ctx)
|
|
116
|
+
getSuggestedStarterPacks(server, ctx)
|
|
113
117
|
getLabelerServices(server, ctx)
|
|
114
118
|
searchActors(server, ctx)
|
|
115
119
|
searchActorsTypeahead(server, ctx)
|
package/src/lexicon/index.ts
CHANGED
|
@@ -143,6 +143,8 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
|
|
|
143
143
|
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
|
144
144
|
import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
|
145
145
|
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
|
146
|
+
import * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js'
|
|
147
|
+
import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js'
|
|
146
148
|
import * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js'
|
|
147
149
|
import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js'
|
|
148
150
|
import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js'
|
|
@@ -1913,6 +1915,28 @@ export class AppBskyUnspeccedNS {
|
|
|
1913
1915
|
return this._server.xrpc.method(nsid, cfg)
|
|
1914
1916
|
}
|
|
1915
1917
|
|
|
1918
|
+
getSuggestedFeeds<AV extends AuthVerifier>(
|
|
1919
|
+
cfg: ConfigOf<
|
|
1920
|
+
AV,
|
|
1921
|
+
AppBskyUnspeccedGetSuggestedFeeds.Handler<ExtractAuth<AV>>,
|
|
1922
|
+
AppBskyUnspeccedGetSuggestedFeeds.HandlerReqCtx<ExtractAuth<AV>>
|
|
1923
|
+
>,
|
|
1924
|
+
) {
|
|
1925
|
+
const nsid = 'app.bsky.unspecced.getSuggestedFeeds' // @ts-ignore
|
|
1926
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
getSuggestedFeedsSkeleton<AV extends AuthVerifier>(
|
|
1930
|
+
cfg: ConfigOf<
|
|
1931
|
+
AV,
|
|
1932
|
+
AppBskyUnspeccedGetSuggestedFeedsSkeleton.Handler<ExtractAuth<AV>>,
|
|
1933
|
+
AppBskyUnspeccedGetSuggestedFeedsSkeleton.HandlerReqCtx<ExtractAuth<AV>>
|
|
1934
|
+
>,
|
|
1935
|
+
) {
|
|
1936
|
+
const nsid = 'app.bsky.unspecced.getSuggestedFeedsSkeleton' // @ts-ignore
|
|
1937
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1916
1940
|
getSuggestedStarterPacks<AV extends AuthVerifier>(
|
|
1917
1941
|
cfg: ConfigOf<
|
|
1918
1942
|
AV,
|
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -9884,6 +9884,87 @@ export const schemaDict = {
|
|
|
9884
9884
|
},
|
|
9885
9885
|
},
|
|
9886
9886
|
},
|
|
9887
|
+
AppBskyUnspeccedGetSuggestedFeeds: {
|
|
9888
|
+
lexicon: 1,
|
|
9889
|
+
id: 'app.bsky.unspecced.getSuggestedFeeds',
|
|
9890
|
+
defs: {
|
|
9891
|
+
main: {
|
|
9892
|
+
type: 'query',
|
|
9893
|
+
description: 'Get a list of suggested feeds',
|
|
9894
|
+
parameters: {
|
|
9895
|
+
type: 'params',
|
|
9896
|
+
properties: {
|
|
9897
|
+
limit: {
|
|
9898
|
+
type: 'integer',
|
|
9899
|
+
minimum: 1,
|
|
9900
|
+
maximum: 25,
|
|
9901
|
+
default: 10,
|
|
9902
|
+
},
|
|
9903
|
+
},
|
|
9904
|
+
},
|
|
9905
|
+
output: {
|
|
9906
|
+
encoding: 'application/json',
|
|
9907
|
+
schema: {
|
|
9908
|
+
type: 'object',
|
|
9909
|
+
required: ['feeds'],
|
|
9910
|
+
properties: {
|
|
9911
|
+
feeds: {
|
|
9912
|
+
type: 'array',
|
|
9913
|
+
items: {
|
|
9914
|
+
type: 'ref',
|
|
9915
|
+
ref: 'lex:app.bsky.feed.defs#generatorView',
|
|
9916
|
+
},
|
|
9917
|
+
},
|
|
9918
|
+
},
|
|
9919
|
+
},
|
|
9920
|
+
},
|
|
9921
|
+
},
|
|
9922
|
+
},
|
|
9923
|
+
},
|
|
9924
|
+
AppBskyUnspeccedGetSuggestedFeedsSkeleton: {
|
|
9925
|
+
lexicon: 1,
|
|
9926
|
+
id: 'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
|
9927
|
+
defs: {
|
|
9928
|
+
main: {
|
|
9929
|
+
type: 'query',
|
|
9930
|
+
description:
|
|
9931
|
+
'Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds',
|
|
9932
|
+
parameters: {
|
|
9933
|
+
type: 'params',
|
|
9934
|
+
properties: {
|
|
9935
|
+
viewer: {
|
|
9936
|
+
type: 'string',
|
|
9937
|
+
format: 'did',
|
|
9938
|
+
description:
|
|
9939
|
+
'DID of the account making the request (not included for public/unauthenticated queries).',
|
|
9940
|
+
},
|
|
9941
|
+
limit: {
|
|
9942
|
+
type: 'integer',
|
|
9943
|
+
minimum: 1,
|
|
9944
|
+
maximum: 25,
|
|
9945
|
+
default: 10,
|
|
9946
|
+
},
|
|
9947
|
+
},
|
|
9948
|
+
},
|
|
9949
|
+
output: {
|
|
9950
|
+
encoding: 'application/json',
|
|
9951
|
+
schema: {
|
|
9952
|
+
type: 'object',
|
|
9953
|
+
required: ['feeds'],
|
|
9954
|
+
properties: {
|
|
9955
|
+
feeds: {
|
|
9956
|
+
type: 'array',
|
|
9957
|
+
items: {
|
|
9958
|
+
type: 'string',
|
|
9959
|
+
format: 'at-uri',
|
|
9960
|
+
},
|
|
9961
|
+
},
|
|
9962
|
+
},
|
|
9963
|
+
},
|
|
9964
|
+
},
|
|
9965
|
+
},
|
|
9966
|
+
},
|
|
9967
|
+
},
|
|
9887
9968
|
AppBskyUnspeccedGetSuggestedStarterPacks: {
|
|
9888
9969
|
lexicon: 1,
|
|
9889
9970
|
id: 'app.bsky.unspecced.getSuggestedStarterPacks',
|
|
@@ -12127,6 +12208,9 @@ export const ids = {
|
|
|
12127
12208
|
AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
|
|
12128
12209
|
AppBskyUnspeccedGetPopularFeedGenerators:
|
|
12129
12210
|
'app.bsky.unspecced.getPopularFeedGenerators',
|
|
12211
|
+
AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
|
|
12212
|
+
AppBskyUnspeccedGetSuggestedFeedsSkeleton:
|
|
12213
|
+
'app.bsky.unspecced.getSuggestedFeedsSkeleton',
|
|
12130
12214
|
AppBskyUnspeccedGetSuggestedStarterPacks:
|
|
12131
12215
|
'app.bsky.unspecced.getSuggestedStarterPacks',
|
|
12132
12216
|
AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { CID } from 'multiformats/cid'
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
8
|
+
import {
|
|
9
|
+
type $Typed,
|
|
10
|
+
is$typed as _is$typed,
|
|
11
|
+
type OmitKey,
|
|
12
|
+
} from '../../../../util'
|
|
13
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
14
|
+
import type * as AppBskyFeedDefs from '../feed/defs.js'
|
|
15
|
+
|
|
16
|
+
const is$typed = _is$typed,
|
|
17
|
+
validate = _validate
|
|
18
|
+
const id = 'app.bsky.unspecced.getSuggestedFeeds'
|
|
19
|
+
|
|
20
|
+
export interface QueryParams {
|
|
21
|
+
limit: number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type InputSchema = undefined
|
|
25
|
+
|
|
26
|
+
export interface OutputSchema {
|
|
27
|
+
feeds: AppBskyFeedDefs.GeneratorView[]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type HandlerInput = undefined
|
|
31
|
+
|
|
32
|
+
export interface HandlerSuccess {
|
|
33
|
+
encoding: 'application/json'
|
|
34
|
+
body: OutputSchema
|
|
35
|
+
headers?: { [key: string]: string }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface HandlerError {
|
|
39
|
+
status: number
|
|
40
|
+
message?: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
44
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
45
|
+
auth: HA
|
|
46
|
+
params: QueryParams
|
|
47
|
+
input: HandlerInput
|
|
48
|
+
req: express.Request
|
|
49
|
+
res: express.Response
|
|
50
|
+
resetRouteRateLimits: () => Promise<void>
|
|
51
|
+
}
|
|
52
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
53
|
+
ctx: HandlerReqCtx<HA>,
|
|
54
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { CID } from 'multiformats/cid'
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
8
|
+
import {
|
|
9
|
+
type $Typed,
|
|
10
|
+
is$typed as _is$typed,
|
|
11
|
+
type OmitKey,
|
|
12
|
+
} from '../../../../util'
|
|
13
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
14
|
+
|
|
15
|
+
const is$typed = _is$typed,
|
|
16
|
+
validate = _validate
|
|
17
|
+
const id = 'app.bsky.unspecced.getSuggestedFeedsSkeleton'
|
|
18
|
+
|
|
19
|
+
export interface QueryParams {
|
|
20
|
+
/** DID of the account making the request (not included for public/unauthenticated queries). */
|
|
21
|
+
viewer?: string
|
|
22
|
+
limit: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type InputSchema = undefined
|
|
26
|
+
|
|
27
|
+
export interface OutputSchema {
|
|
28
|
+
feeds: string[]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type HandlerInput = undefined
|
|
32
|
+
|
|
33
|
+
export interface HandlerSuccess {
|
|
34
|
+
encoding: 'application/json'
|
|
35
|
+
body: OutputSchema
|
|
36
|
+
headers?: { [key: string]: string }
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface HandlerError {
|
|
40
|
+
status: number
|
|
41
|
+
message?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
45
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
46
|
+
auth: HA
|
|
47
|
+
params: QueryParams
|
|
48
|
+
input: HandlerInput
|
|
49
|
+
req: express.Request
|
|
50
|
+
res: express.Response
|
|
51
|
+
resetRouteRateLimits: () => Promise<void>
|
|
52
|
+
}
|
|
53
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
54
|
+
ctx: HandlerReqCtx<HA>,
|
|
55
|
+
) => Promise<HandlerOutput> | HandlerOutput
|