@atproto/bsky 0.0.133 → 0.0.134

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/api/app/bsky/unspecced/getSuggestedStarterPacks.d.ts +4 -0
  3. package/dist/api/app/bsky/unspecced/getSuggestedStarterPacks.d.ts.map +1 -0
  4. package/dist/api/app/bsky/unspecced/getSuggestedStarterPacks.js +101 -0
  5. package/dist/api/app/bsky/unspecced/getSuggestedStarterPacks.js.map +1 -0
  6. package/dist/api/app/bsky/unspecced/getTrends.d.ts +4 -0
  7. package/dist/api/app/bsky/unspecced/getTrends.d.ts.map +1 -0
  8. package/dist/api/app/bsky/unspecced/getTrends.js +96 -0
  9. package/dist/api/app/bsky/unspecced/getTrends.js.map +1 -0
  10. package/dist/api/index.d.ts.map +1 -1
  11. package/dist/api/index.js +4 -0
  12. package/dist/api/index.js.map +1 -1
  13. package/dist/lexicon/index.d.ts +10 -0
  14. package/dist/lexicon/index.d.ts.map +1 -1
  15. package/dist/lexicon/index.js +20 -0
  16. package/dist/lexicon/index.js.map +1 -1
  17. package/dist/lexicon/lexicons.d.ts +516 -0
  18. package/dist/lexicon/lexicons.d.ts.map +1 -1
  19. package/dist/lexicon/lexicons.js +277 -0
  20. package/dist/lexicon/lexicons.js.map +1 -1
  21. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +27 -0
  22. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts.map +1 -1
  23. package/dist/lexicon/types/app/bsky/unspecced/defs.js +18 -0
  24. package/dist/lexicon/types/app/bsky/unspecced/defs.js.map +1 -1
  25. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacks.d.ts +36 -0
  26. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacks.d.ts.map +1 -0
  27. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacks.js +7 -0
  28. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacks.js.map +1 -0
  29. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.d.ts +37 -0
  30. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.d.ts.map +1 -0
  31. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js +7 -0
  32. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js.map +1 -0
  33. package/dist/lexicon/types/app/bsky/unspecced/getTrends.d.ts +36 -0
  34. package/dist/lexicon/types/app/bsky/unspecced/getTrends.d.ts.map +1 -0
  35. package/dist/lexicon/types/app/bsky/unspecced/getTrends.js +7 -0
  36. package/dist/lexicon/types/app/bsky/unspecced/getTrends.js.map +1 -0
  37. package/dist/lexicon/types/app/bsky/unspecced/getTrendsSkeleton.d.ts +38 -0
  38. package/dist/lexicon/types/app/bsky/unspecced/getTrendsSkeleton.d.ts.map +1 -0
  39. package/dist/lexicon/types/app/bsky/unspecced/getTrendsSkeleton.js +7 -0
  40. package/dist/lexicon/types/app/bsky/unspecced/getTrendsSkeleton.js.map +1 -0
  41. package/dist/lexicon/types/com/atproto/admin/updateAccountSigningKey.d.ts +31 -0
  42. package/dist/lexicon/types/com/atproto/admin/updateAccountSigningKey.d.ts.map +1 -0
  43. package/dist/lexicon/types/com/atproto/admin/updateAccountSigningKey.js +7 -0
  44. package/dist/lexicon/types/com/atproto/admin/updateAccountSigningKey.js.map +1 -0
  45. package/package.json +9 -9
  46. package/src/api/app/bsky/unspecced/getSuggestedStarterPacks.ts +150 -0
  47. package/src/api/app/bsky/unspecced/getTrends.ts +144 -0
  48. package/src/api/index.ts +4 -0
  49. package/src/lexicon/index.ts +62 -0
  50. package/src/lexicon/lexicons.ts +285 -0
  51. package/src/lexicon/types/app/bsky/unspecced/defs.ts +45 -0
  52. package/src/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacks.ts +54 -0
  53. package/src/lexicon/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts +55 -0
  54. package/src/lexicon/types/app/bsky/unspecced/getTrends.ts +54 -0
  55. package/src/lexicon/types/app/bsky/unspecced/getTrendsSkeleton.ts +56 -0
  56. package/src/lexicon/types/com/atproto/admin/updateAccountSigningKey.ts +48 -0
  57. package/tests/seed/get-suggested-starter-packs.ts +63 -0
  58. package/tests/seed/get-trends.ts +70 -0
  59. package/tests/views/get-suggested-starter-packs.test.ts +128 -0
  60. package/tests/views/get-trends.test.ts +133 -0
  61. package/tsconfig.build.tsbuildinfo +1 -1
  62. package/tsconfig.tests.tsbuildinfo +1 -1
@@ -0,0 +1,144 @@
1
+ import AtpAgent from '@atproto/api'
2
+ import { dedupeStrs, mapDefined, noUndefinedVals } from '@atproto/common'
3
+ import { InternalServerError } from '@atproto/xrpc-server'
4
+ import { AppContext } from '../../../../context'
5
+ import {
6
+ HydrateCtx,
7
+ Hydrator,
8
+ mergeManyStates,
9
+ } from '../../../../hydration/hydrator'
10
+ import { Server } from '../../../../lexicon'
11
+ import { SkeletonTrend } from '../../../../lexicon/types/app/bsky/unspecced/defs'
12
+ import { QueryParams } from '../../../../lexicon/types/app/bsky/unspecced/getTrendingTopics'
13
+ import {
14
+ HydrationFnInput,
15
+ PresentationFnInput,
16
+ RulesFnInput,
17
+ SkeletonFnInput,
18
+ createPipeline,
19
+ } from '../../../../pipeline'
20
+ import { Views } from '../../../../views'
21
+
22
+ export default function (server: Server, ctx: AppContext) {
23
+ const getTrends = createPipeline(skeleton, hydration, noBlocks, presentation)
24
+ server.app.bsky.unspecced.getTrends({
25
+ auth: ctx.authVerifier.standardOptional,
26
+ handler: async ({ auth, params, req }) => {
27
+ const viewer = auth.credentials.iss
28
+ const labelers = ctx.reqLabelers(req)
29
+ const hydrateCtx = await ctx.hydrator.createContext({ labelers, viewer })
30
+ const headers = noUndefinedVals({
31
+ 'accept-language': req.headers['accept-language'],
32
+ 'x-bsky-topics': Array.isArray(req.headers['x-bsky-topics'])
33
+ ? req.headers['x-bsky-topics'].join(',')
34
+ : req.headers['x-bsky-topics'],
35
+ })
36
+ const { ...result } = await getTrends(
37
+ {
38
+ ...params,
39
+ viewer: viewer ?? undefined,
40
+ hydrateCtx: hydrateCtx.copy({ viewer }),
41
+ headers,
42
+ },
43
+ ctx,
44
+ )
45
+ return {
46
+ encoding: 'application/json',
47
+ body: result,
48
+ }
49
+ },
50
+ })
51
+ }
52
+
53
+ const skeleton = async (input: SkeletonFnInput<Context, Params>) => {
54
+ const { params, ctx } = input
55
+ if (ctx.topicsAgent) {
56
+ const res = await ctx.topicsAgent.app.bsky.unspecced.getTrendsSkeleton(
57
+ {
58
+ limit: params.limit,
59
+ viewer: params.viewer,
60
+ },
61
+ {
62
+ headers: params.headers,
63
+ },
64
+ )
65
+ return res.data
66
+ } else {
67
+ throw new InternalServerError('Topics agent not available')
68
+ }
69
+ }
70
+
71
+ const hydration = async (
72
+ input: HydrationFnInput<Context, Params, SkeletonState>,
73
+ ) => {
74
+ const { ctx, params, skeleton } = input
75
+ let dids: string[] = []
76
+ for (const trend of skeleton.trends) {
77
+ dids.push(...trend.dids)
78
+ }
79
+ dids = dedupeStrs(dids)
80
+ const pairs: Map<string, string[]> = new Map()
81
+ if (params.viewer) {
82
+ pairs.set(params.viewer, dids)
83
+ }
84
+ const [profileState, bidirectionalBlocks] = await Promise.all([
85
+ ctx.hydrator.hydrateProfilesBasic(dids, params.hydrateCtx),
86
+ ctx.hydrator.hydrateBidirectionalBlocks(pairs),
87
+ ])
88
+
89
+ return mergeManyStates(profileState, { bidirectionalBlocks })
90
+ }
91
+
92
+ const noBlocks = (input: RulesFnInput<Context, Params, SkeletonState>) => {
93
+ const { skeleton, params, hydration } = input
94
+
95
+ if (!params.viewer) {
96
+ return skeleton
97
+ }
98
+
99
+ const blocks = hydration.bidirectionalBlocks?.get(params.viewer)
100
+ const filteredSkeleton: SkeletonState = {
101
+ trends: skeleton.trends.map((t) => ({
102
+ ...t,
103
+ dids: t.dids.filter((did) => !blocks?.get(did)),
104
+ })),
105
+ }
106
+
107
+ return filteredSkeleton
108
+ }
109
+
110
+ const presentation = (
111
+ input: PresentationFnInput<Context, Params, SkeletonState>,
112
+ ) => {
113
+ const { ctx, skeleton, hydration } = input
114
+
115
+ return {
116
+ trends: skeleton.trends.map((t) => ({
117
+ topic: t.topic,
118
+ displayName: t.displayName,
119
+ link: t.link,
120
+ startedAt: t.startedAt,
121
+ postCount: t.postCount,
122
+ status: t.status,
123
+ category: t.category,
124
+ actors: mapDefined(t.dids, (did) =>
125
+ ctx.views.profileBasic(did, hydration),
126
+ ),
127
+ })),
128
+ }
129
+ }
130
+
131
+ type Context = {
132
+ hydrator: Hydrator
133
+ views: Views
134
+ topicsAgent: AtpAgent | undefined
135
+ }
136
+
137
+ type Params = QueryParams & {
138
+ hydrateCtx: HydrateCtx & { viewer: string | null }
139
+ headers: Record<string, string>
140
+ }
141
+
142
+ type SkeletonState = {
143
+ trends: SkeletonTrend[]
144
+ }
package/src/api/index.ts CHANGED
@@ -49,8 +49,10 @@ 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 getSuggestedStarterPacks from './app/bsky/unspecced/getSuggestedStarterPacks'
52
53
  import getTaggedSuggestions from './app/bsky/unspecced/getTaggedSuggestions'
53
54
  import getTrendingTopics from './app/bsky/unspecced/getTrendingTopics'
55
+ import getTrends from './app/bsky/unspecced/getTrends'
54
56
  import getAccountInfos from './com/atproto/admin/getAccountInfos'
55
57
  import getSubjectStatus from './com/atproto/admin/getSubjectStatus'
56
58
  import updateSubjectStatus from './com/atproto/admin/updateSubjectStatus'
@@ -106,6 +108,8 @@ export default function (server: Server, ctx: AppContext) {
106
108
  unmuteThread(server, ctx)
107
109
  getSuggestedFollowsByActor(server, ctx)
108
110
  getTrendingTopics(server, ctx)
111
+ getTrends(server, ctx)
112
+ getSuggestedStarterPacks(server, ctx)
109
113
  getLabelerServices(server, ctx)
110
114
  searchActors(server, ctx)
111
115
  searchActorsTypeahead(server, ctx)
@@ -22,6 +22,7 @@ import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail.j
22
22
  import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail.js'
23
23
  import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle.js'
24
24
  import * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword.js'
25
+ import * as ComAtprotoAdminUpdateAccountSigningKey from './types/com/atproto/admin/updateAccountSigningKey.js'
25
26
  import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus.js'
26
27
  import * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials.js'
27
28
  import * as ComAtprotoIdentityRefreshIdentity from './types/com/atproto/identity/refreshIdentity.js'
@@ -142,9 +143,13 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
142
143
  import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
143
144
  import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
144
145
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
146
+ import * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js'
147
+ import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js'
145
148
  import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js'
146
149
  import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions.js'
147
150
  import * as AppBskyUnspeccedGetTrendingTopics from './types/app/bsky/unspecced/getTrendingTopics.js'
151
+ import * as AppBskyUnspeccedGetTrends from './types/app/bsky/unspecced/getTrends.js'
152
+ import * as AppBskyUnspeccedGetTrendsSkeleton from './types/app/bsky/unspecced/getTrendsSkeleton.js'
148
153
  import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton.js'
149
154
  import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton.js'
150
155
  import * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton.js'
@@ -409,6 +414,17 @@ export class ComAtprotoAdminNS {
409
414
  return this._server.xrpc.method(nsid, cfg)
410
415
  }
411
416
 
417
+ updateAccountSigningKey<AV extends AuthVerifier>(
418
+ cfg: ConfigOf<
419
+ AV,
420
+ ComAtprotoAdminUpdateAccountSigningKey.Handler<ExtractAuth<AV>>,
421
+ ComAtprotoAdminUpdateAccountSigningKey.HandlerReqCtx<ExtractAuth<AV>>
422
+ >,
423
+ ) {
424
+ const nsid = 'com.atproto.admin.updateAccountSigningKey' // @ts-ignore
425
+ return this._server.xrpc.method(nsid, cfg)
426
+ }
427
+
412
428
  updateSubjectStatus<AV extends AuthVerifier>(
413
429
  cfg: ConfigOf<
414
430
  AV,
@@ -1897,6 +1913,30 @@ export class AppBskyUnspeccedNS {
1897
1913
  return this._server.xrpc.method(nsid, cfg)
1898
1914
  }
1899
1915
 
1916
+ getSuggestedStarterPacks<AV extends AuthVerifier>(
1917
+ cfg: ConfigOf<
1918
+ AV,
1919
+ AppBskyUnspeccedGetSuggestedStarterPacks.Handler<ExtractAuth<AV>>,
1920
+ AppBskyUnspeccedGetSuggestedStarterPacks.HandlerReqCtx<ExtractAuth<AV>>
1921
+ >,
1922
+ ) {
1923
+ const nsid = 'app.bsky.unspecced.getSuggestedStarterPacks' // @ts-ignore
1924
+ return this._server.xrpc.method(nsid, cfg)
1925
+ }
1926
+
1927
+ getSuggestedStarterPacksSkeleton<AV extends AuthVerifier>(
1928
+ cfg: ConfigOf<
1929
+ AV,
1930
+ AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.Handler<ExtractAuth<AV>>,
1931
+ AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.HandlerReqCtx<
1932
+ ExtractAuth<AV>
1933
+ >
1934
+ >,
1935
+ ) {
1936
+ const nsid = 'app.bsky.unspecced.getSuggestedStarterPacksSkeleton' // @ts-ignore
1937
+ return this._server.xrpc.method(nsid, cfg)
1938
+ }
1939
+
1900
1940
  getSuggestionsSkeleton<AV extends AuthVerifier>(
1901
1941
  cfg: ConfigOf<
1902
1942
  AV,
@@ -1930,6 +1970,28 @@ export class AppBskyUnspeccedNS {
1930
1970
  return this._server.xrpc.method(nsid, cfg)
1931
1971
  }
1932
1972
 
1973
+ getTrends<AV extends AuthVerifier>(
1974
+ cfg: ConfigOf<
1975
+ AV,
1976
+ AppBskyUnspeccedGetTrends.Handler<ExtractAuth<AV>>,
1977
+ AppBskyUnspeccedGetTrends.HandlerReqCtx<ExtractAuth<AV>>
1978
+ >,
1979
+ ) {
1980
+ const nsid = 'app.bsky.unspecced.getTrends' // @ts-ignore
1981
+ return this._server.xrpc.method(nsid, cfg)
1982
+ }
1983
+
1984
+ getTrendsSkeleton<AV extends AuthVerifier>(
1985
+ cfg: ConfigOf<
1986
+ AV,
1987
+ AppBskyUnspeccedGetTrendsSkeleton.Handler<ExtractAuth<AV>>,
1988
+ AppBskyUnspeccedGetTrendsSkeleton.HandlerReqCtx<ExtractAuth<AV>>
1989
+ >,
1990
+ ) {
1991
+ const nsid = 'app.bsky.unspecced.getTrendsSkeleton' // @ts-ignore
1992
+ return this._server.xrpc.method(nsid, cfg)
1993
+ }
1994
+
1933
1995
  searchActorsSkeleton<AV extends AuthVerifier>(
1934
1996
  cfg: ConfigOf<
1935
1997
  AV,
@@ -580,6 +580,35 @@ export const schemaDict = {
580
580
  },
581
581
  },
582
582
  },
583
+ ComAtprotoAdminUpdateAccountSigningKey: {
584
+ lexicon: 1,
585
+ id: 'com.atproto.admin.updateAccountSigningKey',
586
+ defs: {
587
+ main: {
588
+ type: 'procedure',
589
+ description:
590
+ "Administrative action to update an account's signing key in their Did document.",
591
+ input: {
592
+ encoding: 'application/json',
593
+ schema: {
594
+ type: 'object',
595
+ required: ['did', 'signingKey'],
596
+ properties: {
597
+ did: {
598
+ type: 'string',
599
+ format: 'did',
600
+ },
601
+ signingKey: {
602
+ type: 'string',
603
+ format: 'did',
604
+ description: 'Did-key formatted public key',
605
+ },
606
+ },
607
+ },
608
+ },
609
+ },
610
+ },
611
+ },
583
612
  ComAtprotoAdminUpdateSubjectStatus: {
584
613
  lexicon: 1,
585
614
  id: 'com.atproto.admin.updateSubjectStatus',
@@ -9699,6 +9728,92 @@ export const schemaDict = {
9699
9728
  },
9700
9729
  },
9701
9730
  },
9731
+ skeletonTrend: {
9732
+ type: 'object',
9733
+ required: [
9734
+ 'topic',
9735
+ 'displayName',
9736
+ 'link',
9737
+ 'startedAt',
9738
+ 'postCount',
9739
+ 'dids',
9740
+ ],
9741
+ properties: {
9742
+ topic: {
9743
+ type: 'string',
9744
+ },
9745
+ displayName: {
9746
+ type: 'string',
9747
+ },
9748
+ link: {
9749
+ type: 'string',
9750
+ },
9751
+ startedAt: {
9752
+ type: 'string',
9753
+ format: 'datetime',
9754
+ },
9755
+ postCount: {
9756
+ type: 'integer',
9757
+ },
9758
+ status: {
9759
+ type: 'string',
9760
+ knownValues: ['hot'],
9761
+ },
9762
+ category: {
9763
+ type: 'string',
9764
+ },
9765
+ dids: {
9766
+ type: 'array',
9767
+ items: {
9768
+ type: 'string',
9769
+ format: 'did',
9770
+ },
9771
+ },
9772
+ },
9773
+ },
9774
+ trendView: {
9775
+ type: 'object',
9776
+ required: [
9777
+ 'topic',
9778
+ 'displayName',
9779
+ 'link',
9780
+ 'startedAt',
9781
+ 'postCount',
9782
+ 'actors',
9783
+ ],
9784
+ properties: {
9785
+ topic: {
9786
+ type: 'string',
9787
+ },
9788
+ displayName: {
9789
+ type: 'string',
9790
+ },
9791
+ link: {
9792
+ type: 'string',
9793
+ },
9794
+ startedAt: {
9795
+ type: 'string',
9796
+ format: 'datetime',
9797
+ },
9798
+ postCount: {
9799
+ type: 'integer',
9800
+ },
9801
+ status: {
9802
+ type: 'string',
9803
+ knownValues: ['hot'],
9804
+ },
9805
+ category: {
9806
+ type: 'string',
9807
+ },
9808
+ actors: {
9809
+ type: 'array',
9810
+ items: {
9811
+ type: 'ref',
9812
+ ref: 'lex:app.bsky.actor.defs#profileViewBasic',
9813
+ },
9814
+ },
9815
+ },
9816
+ },
9702
9817
  },
9703
9818
  },
9704
9819
  AppBskyUnspeccedGetConfig: {
@@ -9769,6 +9884,87 @@ export const schemaDict = {
9769
9884
  },
9770
9885
  },
9771
9886
  },
9887
+ AppBskyUnspeccedGetSuggestedStarterPacks: {
9888
+ lexicon: 1,
9889
+ id: 'app.bsky.unspecced.getSuggestedStarterPacks',
9890
+ defs: {
9891
+ main: {
9892
+ type: 'query',
9893
+ description: 'Get a list of suggested starterpacks',
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: ['starterPacks'],
9910
+ properties: {
9911
+ starterPacks: {
9912
+ type: 'array',
9913
+ items: {
9914
+ type: 'ref',
9915
+ ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
9916
+ },
9917
+ },
9918
+ },
9919
+ },
9920
+ },
9921
+ },
9922
+ },
9923
+ },
9924
+ AppBskyUnspeccedGetSuggestedStarterPacksSkeleton: {
9925
+ lexicon: 1,
9926
+ id: 'app.bsky.unspecced.getSuggestedStarterPacksSkeleton',
9927
+ defs: {
9928
+ main: {
9929
+ type: 'query',
9930
+ description:
9931
+ 'Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks',
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: ['starterPacks'],
9954
+ properties: {
9955
+ starterPacks: {
9956
+ type: 'array',
9957
+ items: {
9958
+ type: 'string',
9959
+ format: 'at-uri',
9960
+ },
9961
+ },
9962
+ },
9963
+ },
9964
+ },
9965
+ },
9966
+ },
9967
+ },
9772
9968
  AppBskyUnspeccedGetSuggestionsSkeleton: {
9773
9969
  lexicon: 1,
9774
9970
  id: 'app.bsky.unspecced.getSuggestionsSkeleton',
@@ -9934,6 +10130,87 @@ export const schemaDict = {
9934
10130
  },
9935
10131
  },
9936
10132
  },
10133
+ AppBskyUnspeccedGetTrends: {
10134
+ lexicon: 1,
10135
+ id: 'app.bsky.unspecced.getTrends',
10136
+ defs: {
10137
+ main: {
10138
+ type: 'query',
10139
+ description: 'Get the current trends on the network',
10140
+ parameters: {
10141
+ type: 'params',
10142
+ properties: {
10143
+ limit: {
10144
+ type: 'integer',
10145
+ minimum: 1,
10146
+ maximum: 25,
10147
+ default: 10,
10148
+ },
10149
+ },
10150
+ },
10151
+ output: {
10152
+ encoding: 'application/json',
10153
+ schema: {
10154
+ type: 'object',
10155
+ required: ['trends'],
10156
+ properties: {
10157
+ trends: {
10158
+ type: 'array',
10159
+ items: {
10160
+ type: 'ref',
10161
+ ref: 'lex:app.bsky.unspecced.defs#trendView',
10162
+ },
10163
+ },
10164
+ },
10165
+ },
10166
+ },
10167
+ },
10168
+ },
10169
+ },
10170
+ AppBskyUnspeccedGetTrendsSkeleton: {
10171
+ lexicon: 1,
10172
+ id: 'app.bsky.unspecced.getTrendsSkeleton',
10173
+ defs: {
10174
+ main: {
10175
+ type: 'query',
10176
+ description:
10177
+ 'Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends',
10178
+ parameters: {
10179
+ type: 'params',
10180
+ properties: {
10181
+ viewer: {
10182
+ type: 'string',
10183
+ format: 'did',
10184
+ description:
10185
+ 'DID of the account making the request (not included for public/unauthenticated queries).',
10186
+ },
10187
+ limit: {
10188
+ type: 'integer',
10189
+ minimum: 1,
10190
+ maximum: 25,
10191
+ default: 10,
10192
+ },
10193
+ },
10194
+ },
10195
+ output: {
10196
+ encoding: 'application/json',
10197
+ schema: {
10198
+ type: 'object',
10199
+ required: ['trends'],
10200
+ properties: {
10201
+ trends: {
10202
+ type: 'array',
10203
+ items: {
10204
+ type: 'ref',
10205
+ ref: 'lex:app.bsky.unspecced.defs#skeletonTrend',
10206
+ },
10207
+ },
10208
+ },
10209
+ },
10210
+ },
10211
+ },
10212
+ },
10213
+ },
9937
10214
  AppBskyUnspeccedSearchActorsSkeleton: {
9938
10215
  lexicon: 1,
9939
10216
  id: 'app.bsky.unspecced.searchActorsSkeleton',
@@ -11684,6 +11961,8 @@ export const ids = {
11684
11961
  ComAtprotoAdminUpdateAccountHandle: 'com.atproto.admin.updateAccountHandle',
11685
11962
  ComAtprotoAdminUpdateAccountPassword:
11686
11963
  'com.atproto.admin.updateAccountPassword',
11964
+ ComAtprotoAdminUpdateAccountSigningKey:
11965
+ 'com.atproto.admin.updateAccountSigningKey',
11687
11966
  ComAtprotoAdminUpdateSubjectStatus: 'com.atproto.admin.updateSubjectStatus',
11688
11967
  ComAtprotoIdentityDefs: 'com.atproto.identity.defs',
11689
11968
  ComAtprotoIdentityGetRecommendedDidCredentials:
@@ -11848,11 +12127,17 @@ export const ids = {
11848
12127
  AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
11849
12128
  AppBskyUnspeccedGetPopularFeedGenerators:
11850
12129
  'app.bsky.unspecced.getPopularFeedGenerators',
12130
+ AppBskyUnspeccedGetSuggestedStarterPacks:
12131
+ 'app.bsky.unspecced.getSuggestedStarterPacks',
12132
+ AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:
12133
+ 'app.bsky.unspecced.getSuggestedStarterPacksSkeleton',
11851
12134
  AppBskyUnspeccedGetSuggestionsSkeleton:
11852
12135
  'app.bsky.unspecced.getSuggestionsSkeleton',
11853
12136
  AppBskyUnspeccedGetTaggedSuggestions:
11854
12137
  'app.bsky.unspecced.getTaggedSuggestions',
11855
12138
  AppBskyUnspeccedGetTrendingTopics: 'app.bsky.unspecced.getTrendingTopics',
12139
+ AppBskyUnspeccedGetTrends: 'app.bsky.unspecced.getTrends',
12140
+ AppBskyUnspeccedGetTrendsSkeleton: 'app.bsky.unspecced.getTrendsSkeleton',
11856
12141
  AppBskyUnspeccedSearchActorsSkeleton:
11857
12142
  'app.bsky.unspecced.searchActorsSkeleton',
11858
12143
  AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
@@ -9,6 +9,7 @@ import {
9
9
  is$typed as _is$typed,
10
10
  type OmitKey,
11
11
  } from '../../../../util'
12
+ import type * as AppBskyActorDefs from '../actor/defs.js'
12
13
 
13
14
  const is$typed = _is$typed,
14
15
  validate = _validate
@@ -80,3 +81,47 @@ export function isTrendingTopic<V>(v: V) {
80
81
  export function validateTrendingTopic<V>(v: V) {
81
82
  return validate<TrendingTopic & V>(v, id, hashTrendingTopic)
82
83
  }
84
+
85
+ export interface SkeletonTrend {
86
+ $type?: 'app.bsky.unspecced.defs#skeletonTrend'
87
+ topic: string
88
+ displayName: string
89
+ link: string
90
+ startedAt: string
91
+ postCount: number
92
+ status?: 'hot' | (string & {})
93
+ category?: string
94
+ dids: string[]
95
+ }
96
+
97
+ const hashSkeletonTrend = 'skeletonTrend'
98
+
99
+ export function isSkeletonTrend<V>(v: V) {
100
+ return is$typed(v, id, hashSkeletonTrend)
101
+ }
102
+
103
+ export function validateSkeletonTrend<V>(v: V) {
104
+ return validate<SkeletonTrend & V>(v, id, hashSkeletonTrend)
105
+ }
106
+
107
+ export interface TrendView {
108
+ $type?: 'app.bsky.unspecced.defs#trendView'
109
+ topic: string
110
+ displayName: string
111
+ link: string
112
+ startedAt: string
113
+ postCount: number
114
+ status?: 'hot' | (string & {})
115
+ category?: string
116
+ actors: AppBskyActorDefs.ProfileViewBasic[]
117
+ }
118
+
119
+ const hashTrendView = 'trendView'
120
+
121
+ export function isTrendView<V>(v: V) {
122
+ return is$typed(v, id, hashTrendView)
123
+ }
124
+
125
+ export function validateTrendView<V>(v: V) {
126
+ return validate<TrendView & V>(v, id, hashTrendView)
127
+ }
@@ -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 AppBskyGraphDefs from '../graph/defs.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'app.bsky.unspecced.getSuggestedStarterPacks'
19
+
20
+ export interface QueryParams {
21
+ limit: number
22
+ }
23
+
24
+ export type InputSchema = undefined
25
+
26
+ export interface OutputSchema {
27
+ starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
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