@atproto/bsky 0.0.93 → 0.0.95

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 (120) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
  3. package/dist/api/app/bsky/feed/getFeed.js +5 -1
  4. package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
  5. package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
  6. package/dist/api/app/bsky/feed/getPostThread.js +9 -2
  7. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  8. package/dist/api/app/bsky/feed/getQuotes.d.ts.map +1 -1
  9. package/dist/api/app/bsky/feed/getQuotes.js +5 -4
  10. package/dist/api/app/bsky/feed/getQuotes.js.map +1 -1
  11. package/dist/api/app/bsky/graph/searchStarterPacks.d.ts +4 -0
  12. package/dist/api/app/bsky/graph/searchStarterPacks.d.ts.map +1 -0
  13. package/dist/api/app/bsky/graph/searchStarterPacks.js +76 -0
  14. package/dist/api/app/bsky/graph/searchStarterPacks.js.map +1 -0
  15. package/dist/api/app/bsky/notification/listNotifications.js +12 -4
  16. package/dist/api/app/bsky/notification/listNotifications.js.map +1 -1
  17. package/dist/api/index.d.ts.map +1 -1
  18. package/dist/api/index.js +2 -0
  19. package/dist/api/index.js.map +1 -1
  20. package/dist/config.d.ts +6 -0
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +19 -0
  23. package/dist/config.js.map +1 -1
  24. package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.d.ts +4 -0
  25. package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.d.ts.map +1 -0
  26. package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.js +21 -0
  27. package/dist/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.js.map +1 -0
  28. package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
  29. package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
  30. package/dist/data-plane/server/db/migrations/index.js +2 -1
  31. package/dist/data-plane/server/db/migrations/index.js.map +1 -1
  32. package/dist/data-plane/server/db/tables/starter-pack.d.ts +1 -0
  33. package/dist/data-plane/server/db/tables/starter-pack.d.ts.map +1 -1
  34. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -1
  35. package/dist/data-plane/server/indexing/plugins/starter-pack.js +1 -0
  36. package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -1
  37. package/dist/data-plane/server/routes/search.d.ts.map +1 -1
  38. package/dist/data-plane/server/routes/search.js +21 -0
  39. package/dist/data-plane/server/routes/search.js.map +1 -1
  40. package/dist/hydration/actor.d.ts.map +1 -1
  41. package/dist/hydration/actor.js +6 -2
  42. package/dist/hydration/actor.js.map +1 -1
  43. package/dist/hydration/label.d.ts +1 -0
  44. package/dist/hydration/label.d.ts.map +1 -1
  45. package/dist/hydration/label.js +7 -0
  46. package/dist/hydration/label.js.map +1 -1
  47. package/dist/lexicon/index.d.ts +6 -0
  48. package/dist/lexicon/index.d.ts.map +1 -1
  49. package/dist/lexicon/index.js +12 -0
  50. package/dist/lexicon/index.js.map +1 -1
  51. package/dist/lexicon/lexicons.d.ts +17818 -7726
  52. package/dist/lexicon/lexicons.d.ts.map +1 -1
  53. package/dist/lexicon/lexicons.js +156 -0
  54. package/dist/lexicon/lexicons.js.map +1 -1
  55. package/dist/lexicon/types/app/bsky/graph/searchStarterPacks.d.ts +40 -0
  56. package/dist/lexicon/types/app/bsky/graph/searchStarterPacks.d.ts.map +1 -0
  57. package/dist/lexicon/types/app/bsky/graph/searchStarterPacks.js +3 -0
  58. package/dist/lexicon/types/app/bsky/graph/searchStarterPacks.js.map +1 -0
  59. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +6 -0
  60. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts.map +1 -1
  61. package/dist/lexicon/types/app/bsky/unspecced/defs.js +10 -0
  62. package/dist/lexicon/types/app/bsky/unspecced/defs.js.map +1 -1
  63. package/dist/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.d.ts +46 -0
  64. package/dist/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.d.ts.map +1 -0
  65. package/dist/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.js +3 -0
  66. package/dist/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.js.map +1 -0
  67. package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +1 -0
  68. package/dist/lexicon/types/chat/bsky/convo/defs.d.ts.map +1 -1
  69. package/dist/lexicon/types/chat/bsky/convo/defs.js.map +1 -1
  70. package/dist/lexicon/types/com/atproto/temp/addReservedHandle.d.ts +39 -0
  71. package/dist/lexicon/types/com/atproto/temp/addReservedHandle.d.ts.map +1 -0
  72. package/dist/lexicon/types/com/atproto/temp/addReservedHandle.js +3 -0
  73. package/dist/lexicon/types/com/atproto/temp/addReservedHandle.js.map +1 -0
  74. package/dist/proto/bsky_connect.d.ts +10 -1
  75. package/dist/proto/bsky_connect.d.ts.map +1 -1
  76. package/dist/proto/bsky_connect.js +9 -0
  77. package/dist/proto/bsky_connect.js.map +1 -1
  78. package/dist/proto/bsky_pb.d.ts +49 -0
  79. package/dist/proto/bsky_pb.d.ts.map +1 -1
  80. package/dist/proto/bsky_pb.js +144 -3
  81. package/dist/proto/bsky_pb.js.map +1 -1
  82. package/dist/views/index.d.ts +1 -0
  83. package/dist/views/index.d.ts.map +1 -1
  84. package/dist/views/index.js +9 -0
  85. package/dist/views/index.js.map +1 -1
  86. package/package.json +11 -11
  87. package/proto/bsky.proto +14 -0
  88. package/src/api/app/bsky/feed/getFeed.ts +8 -1
  89. package/src/api/app/bsky/feed/getPostThread.ts +13 -7
  90. package/src/api/app/bsky/feed/getQuotes.ts +12 -5
  91. package/src/api/app/bsky/graph/searchStarterPacks.ts +118 -0
  92. package/src/api/app/bsky/notification/listNotifications.ts +14 -4
  93. package/src/api/index.ts +2 -0
  94. package/src/config.ts +26 -0
  95. package/src/data-plane/server/db/migrations/20241114T153108102Z-add-starter-packs-name.ts +19 -0
  96. package/src/data-plane/server/db/migrations/index.ts +1 -0
  97. package/src/data-plane/server/db/tables/starter-pack.ts +1 -0
  98. package/src/data-plane/server/indexing/plugins/starter-pack.ts +1 -0
  99. package/src/data-plane/server/routes/search.ts +30 -0
  100. package/src/hydration/actor.ts +11 -5
  101. package/src/hydration/label.ts +10 -0
  102. package/src/lexicon/index.ts +36 -0
  103. package/src/lexicon/lexicons.ts +166 -2
  104. package/src/lexicon/types/app/bsky/graph/searchStarterPacks.ts +50 -0
  105. package/src/lexicon/types/app/bsky/unspecced/defs.ts +24 -0
  106. package/src/lexicon/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts +56 -0
  107. package/src/lexicon/types/chat/bsky/convo/defs.ts +1 -0
  108. package/src/lexicon/types/com/atproto/temp/addReservedHandle.ts +48 -0
  109. package/src/proto/bsky_connect.ts +11 -0
  110. package/src/proto/bsky_pb.ts +137 -0
  111. package/src/views/index.ts +12 -0
  112. package/tests/__snapshots__/feed-generation.test.ts.snap +49 -7
  113. package/tests/feed-generation.test.ts +82 -28
  114. package/tests/query-labels.test.ts +1 -1
  115. package/tests/views/known-followers.test.ts +1 -1
  116. package/tests/views/labels-needs-review.test.ts +168 -0
  117. package/tests/views/starter-packs.test.ts +62 -0
  118. package/tsconfig.build.tsbuildinfo +1 -1
  119. package/tsconfig.tests.tsbuildinfo +1 -1
  120. /package/tests/views/{takedown-labels.test.ts → labels-takedown.test.ts} +0 -0
package/src/config.ts CHANGED
@@ -41,6 +41,10 @@ export interface ServerConfigValues {
41
41
  blobCacheLocation?: string
42
42
  statsigKey?: string
43
43
  statsigEnv?: string
44
+ // threads
45
+ bigThreadUris: Set<string>
46
+ bigThreadDepth?: number
47
+ maxThreadDepth?: number
44
48
  // client config
45
49
  clientCheckEmailConfirmed?: boolean
46
50
  }
@@ -133,6 +137,13 @@ export class ServerConfig {
133
137
  !indexedAtEpoch || !isNaN(indexedAtEpoch.getTime()),
134
138
  'invalid BSKY_INDEXED_AT_EPOCH',
135
139
  )
140
+ const bigThreadUris = new Set(envList(process.env.BSKY_BIG_THREAD_URIS))
141
+ const bigThreadDepth = process.env.BSKY_BIG_THREAD_DEPTH
142
+ ? parseInt(process.env.BSKY_BIG_THREAD_DEPTH || '', 10)
143
+ : undefined
144
+ const maxThreadDepth = process.env.BSKY_MAX_THREAD_DEPTH
145
+ ? parseInt(process.env.BSKY_MAX_THREAD_DEPTH || '', 10)
146
+ : undefined
136
147
  return new ServerConfig({
137
148
  version,
138
149
  debugMode,
@@ -170,6 +181,9 @@ export class ServerConfig {
170
181
  statsigEnv,
171
182
  clientCheckEmailConfirmed,
172
183
  indexedAtEpoch,
184
+ bigThreadUris,
185
+ bigThreadDepth,
186
+ maxThreadDepth,
173
187
  ...stripUndefineds(overrides ?? {}),
174
188
  })
175
189
  }
@@ -330,6 +344,18 @@ export class ServerConfig {
330
344
  get indexedAtEpoch() {
331
345
  return this.cfg.indexedAtEpoch
332
346
  }
347
+
348
+ get bigThreadUris() {
349
+ return this.cfg.bigThreadUris
350
+ }
351
+
352
+ get bigThreadDepth() {
353
+ return this.cfg.bigThreadDepth
354
+ }
355
+
356
+ get maxThreadDepth() {
357
+ return this.cfg.maxThreadDepth
358
+ }
333
359
  }
334
360
 
335
361
  function stripUndefineds(
@@ -0,0 +1,19 @@
1
+ import { Kysely, sql } from 'kysely'
2
+
3
+ export async function up(db: Kysely<unknown>): Promise<void> {
4
+ await db.schema
5
+ .alterTable('starter_pack')
6
+ .addColumn('name', 'varchar')
7
+ .execute()
8
+
9
+ await db.schema // Supports starter pack search
10
+ .createIndex(`starter_pack_name_tgrm_idx`)
11
+ .on('starter_pack')
12
+ .using('gist')
13
+ .expression(sql`"name" gist_trgm_ops`)
14
+ .execute()
15
+ }
16
+
17
+ export async function down(db: Kysely<unknown>): Promise<void> {
18
+ await db.schema.alterTable('starter_pack').dropColumn('name').execute()
19
+ }
@@ -44,3 +44,4 @@ export * as _20240801T193939827Z from './20240801T193939827Z-post-gate'
44
44
  export * as _20240808T224251220Z from './20240808T224251220Z-post-gate-flags'
45
45
  export * as _20240829T211238293Z from './20240829T211238293Z-simplify-actor-sync'
46
46
  export * as _20240831T134810923Z from './20240831T134810923Z-pinned-posts'
47
+ export * as _20241114T153108102Z from './20241114T153108102Z-add-starter-packs-name'
@@ -6,6 +6,7 @@ export interface StarterPack {
6
6
  uri: string
7
7
  cid: string
8
8
  creator: string
9
+ name: string
9
10
  createdAt: string
10
11
  indexedAt: string
11
12
  sortAt: GeneratedAlways<string>
@@ -24,6 +24,7 @@ const insertFn = async (
24
24
  uri: uri.toString(),
25
25
  cid: cid.toString(),
26
26
  creator: uri.host,
27
+ name: obj.name,
27
28
  createdAt: normalizeDatetimeAlways(obj.createdAt),
28
29
  indexedAt: timestamp,
29
30
  })
@@ -55,6 +55,36 @@ export default (db: Database): Partial<ServiceImpl<typeof Service>> => ({
55
55
  cursor: keyset.packFromResult(res),
56
56
  }
57
57
  },
58
+
59
+ async searchStarterPacks(req) {
60
+ const { term, limit, cursor } = req
61
+ const { ref } = db.db.dynamic
62
+ let builder = db.db
63
+ .selectFrom('starter_pack')
64
+ .where('starter_pack.name', 'ilike', `%${term}%`)
65
+ .selectAll()
66
+
67
+ const keyset = new TimeCidKeyset(
68
+ ref('starter_pack.sortAt'),
69
+ ref('starter_pack.cid'),
70
+ )
71
+
72
+ builder = paginate(builder, {
73
+ limit,
74
+ cursor,
75
+ keyset,
76
+ tryIndex: true,
77
+ })
78
+
79
+ const res = await builder.execute()
80
+
81
+ const cur = keyset.packFromResult(res)
82
+
83
+ return {
84
+ uris: res.map((row) => row.uri),
85
+ cursor: cur,
86
+ }
87
+ },
58
88
  })
59
89
 
60
90
  // Remove leading @ in case a handle is input that way
@@ -189,11 +189,17 @@ export class ActorHydrator {
189
189
  viewer: string | null,
190
190
  ): Promise<KnownFollowers> {
191
191
  if (!viewer) return new HydrationMap<ProfileViewerState['knownFollowers']>()
192
- const { results: knownFollowersResults } =
193
- await this.dataplane.getFollowsFollowing({
194
- actorDid: viewer,
195
- targetDids: dids,
196
- })
192
+ const { results: knownFollowersResults } = await this.dataplane
193
+ .getFollowsFollowing(
194
+ {
195
+ actorDid: viewer,
196
+ targetDids: dids,
197
+ },
198
+ {
199
+ signal: AbortSignal.timeout(100),
200
+ },
201
+ )
202
+ .catch(() => ({ results: [] }))
197
203
  return dids.reduce((acc, did, i) => {
198
204
  const result = knownFollowersResults[i]?.dids
199
205
  return acc.set(
@@ -17,6 +17,7 @@ export type { Label } from '../lexicon/types/com/atproto/label/defs'
17
17
 
18
18
  export type SubjectLabels = {
19
19
  isTakendown: boolean
20
+ needsReview: boolean
20
21
  labels: HydrationMap<Label> // src + val -> label
21
22
  }
22
23
 
@@ -84,6 +85,7 @@ export class LabelHydrator {
84
85
  if (!entry) {
85
86
  entry = {
86
87
  isTakendown: false,
88
+ needsReview: false,
87
89
  labels: new HydrationMap(),
88
90
  }
89
91
  acc.set(label.uri, entry)
@@ -96,6 +98,13 @@ export class LabelHydrator {
96
98
  ) {
97
99
  entry.isTakendown = true
98
100
  }
101
+ if (
102
+ label.val === NEEDS_REVIEW_LABEL &&
103
+ !label.neg &&
104
+ labelers.redact.has(label.src)
105
+ ) {
106
+ entry.needsReview = true
107
+ }
99
108
  return acc
100
109
  }, new Labels())
101
110
  }
@@ -147,3 +156,4 @@ const labelerDidToUri = (did: string): string => {
147
156
  }
148
157
 
149
158
  const TAKEDOWN_LABELS = ['!takedown', '!suspend']
159
+ const NEEDS_REVIEW_LABEL = 'needs-review'
@@ -80,6 +80,7 @@ import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'
80
80
  import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
81
81
  import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
82
82
  import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
83
+ import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle'
83
84
  import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue'
84
85
  import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels'
85
86
  import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification'
@@ -125,6 +126,7 @@ import * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/
125
126
  import * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'
126
127
  import * as AppBskyGraphMuteActorList from './types/app/bsky/graph/muteActorList'
127
128
  import * as AppBskyGraphMuteThread from './types/app/bsky/graph/muteThread'
129
+ import * as AppBskyGraphSearchStarterPacks from './types/app/bsky/graph/searchStarterPacks'
128
130
  import * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor'
129
131
  import * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList'
130
132
  import * as AppBskyGraphUnmuteThread from './types/app/bsky/graph/unmuteThread'
@@ -140,6 +142,7 @@ import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspec
140
142
  import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions'
141
143
  import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
142
144
  import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
145
+ import * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton'
143
146
  import * as AppBskyVideoGetJobStatus from './types/app/bsky/video/getJobStatus'
144
147
  import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLimits'
145
148
  import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo'
@@ -1090,6 +1093,17 @@ export class ComAtprotoTempNS {
1090
1093
  this._server = server
1091
1094
  }
1092
1095
 
1096
+ addReservedHandle<AV extends AuthVerifier>(
1097
+ cfg: ConfigOf<
1098
+ AV,
1099
+ ComAtprotoTempAddReservedHandle.Handler<ExtractAuth<AV>>,
1100
+ ComAtprotoTempAddReservedHandle.HandlerReqCtx<ExtractAuth<AV>>
1101
+ >,
1102
+ ) {
1103
+ const nsid = 'com.atproto.temp.addReservedHandle' // @ts-ignore
1104
+ return this._server.xrpc.method(nsid, cfg)
1105
+ }
1106
+
1093
1107
  checkSignupQueue<AV extends AuthVerifier>(
1094
1108
  cfg: ConfigOf<
1095
1109
  AV,
@@ -1653,6 +1667,17 @@ export class AppBskyGraphNS {
1653
1667
  return this._server.xrpc.method(nsid, cfg)
1654
1668
  }
1655
1669
 
1670
+ searchStarterPacks<AV extends AuthVerifier>(
1671
+ cfg: ConfigOf<
1672
+ AV,
1673
+ AppBskyGraphSearchStarterPacks.Handler<ExtractAuth<AV>>,
1674
+ AppBskyGraphSearchStarterPacks.HandlerReqCtx<ExtractAuth<AV>>
1675
+ >,
1676
+ ) {
1677
+ const nsid = 'app.bsky.graph.searchStarterPacks' // @ts-ignore
1678
+ return this._server.xrpc.method(nsid, cfg)
1679
+ }
1680
+
1656
1681
  unmuteActor<AV extends AuthVerifier>(
1657
1682
  cfg: ConfigOf<
1658
1683
  AV,
@@ -1849,6 +1874,17 @@ export class AppBskyUnspeccedNS {
1849
1874
  const nsid = 'app.bsky.unspecced.searchPostsSkeleton' // @ts-ignore
1850
1875
  return this._server.xrpc.method(nsid, cfg)
1851
1876
  }
1877
+
1878
+ searchStarterPacksSkeleton<AV extends AuthVerifier>(
1879
+ cfg: ConfigOf<
1880
+ AV,
1881
+ AppBskyUnspeccedSearchStarterPacksSkeleton.Handler<ExtractAuth<AV>>,
1882
+ AppBskyUnspeccedSearchStarterPacksSkeleton.HandlerReqCtx<ExtractAuth<AV>>
1883
+ >,
1884
+ ) {
1885
+ const nsid = 'app.bsky.unspecced.searchStarterPacksSkeleton' // @ts-ignore
1886
+ return this._server.xrpc.method(nsid, cfg)
1887
+ }
1852
1888
  }
1853
1889
 
1854
1890
  export class AppBskyVideoNS {
@@ -3959,6 +3959,35 @@ export const schemaDict = {
3959
3959
  },
3960
3960
  },
3961
3961
  },
3962
+ ComAtprotoTempAddReservedHandle: {
3963
+ lexicon: 1,
3964
+ id: 'com.atproto.temp.addReservedHandle',
3965
+ defs: {
3966
+ main: {
3967
+ type: 'procedure',
3968
+ description: 'Add a handle to the set of reserved handles.',
3969
+ input: {
3970
+ encoding: 'application/json',
3971
+ schema: {
3972
+ type: 'object',
3973
+ required: ['handle'],
3974
+ properties: {
3975
+ handle: {
3976
+ type: 'string',
3977
+ },
3978
+ },
3979
+ },
3980
+ },
3981
+ output: {
3982
+ encoding: 'application/json',
3983
+ schema: {
3984
+ type: 'object',
3985
+ properties: {},
3986
+ },
3987
+ },
3988
+ },
3989
+ },
3990
+ },
3962
3991
  ComAtprotoTempCheckSignupQueue: {
3963
3992
  lexicon: 1,
3964
3993
  id: 'com.atproto.temp.checkSignupQueue',
@@ -8488,6 +8517,56 @@ export const schemaDict = {
8488
8517
  },
8489
8518
  },
8490
8519
  },
8520
+ AppBskyGraphSearchStarterPacks: {
8521
+ lexicon: 1,
8522
+ id: 'app.bsky.graph.searchStarterPacks',
8523
+ defs: {
8524
+ main: {
8525
+ type: 'query',
8526
+ description:
8527
+ 'Find starter packs matching search criteria. Does not require auth.',
8528
+ parameters: {
8529
+ type: 'params',
8530
+ required: ['q'],
8531
+ properties: {
8532
+ q: {
8533
+ type: 'string',
8534
+ description:
8535
+ 'Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
8536
+ },
8537
+ limit: {
8538
+ type: 'integer',
8539
+ minimum: 1,
8540
+ maximum: 100,
8541
+ default: 25,
8542
+ },
8543
+ cursor: {
8544
+ type: 'string',
8545
+ },
8546
+ },
8547
+ },
8548
+ output: {
8549
+ encoding: 'application/json',
8550
+ schema: {
8551
+ type: 'object',
8552
+ required: ['starterPacks'],
8553
+ properties: {
8554
+ cursor: {
8555
+ type: 'string',
8556
+ },
8557
+ starterPacks: {
8558
+ type: 'array',
8559
+ items: {
8560
+ type: 'ref',
8561
+ ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
8562
+ },
8563
+ },
8564
+ },
8565
+ },
8566
+ },
8567
+ },
8568
+ },
8569
+ },
8491
8570
  AppBskyGraphStarterpack: {
8492
8571
  lexicon: 1,
8493
8572
  id: 'app.bsky.graph.starterpack',
@@ -9153,6 +9232,16 @@ export const schemaDict = {
9153
9232
  },
9154
9233
  },
9155
9234
  },
9235
+ skeletonSearchStarterPack: {
9236
+ type: 'object',
9237
+ required: ['uri'],
9238
+ properties: {
9239
+ uri: {
9240
+ type: 'string',
9241
+ format: 'at-uri',
9242
+ },
9243
+ },
9244
+ },
9156
9245
  },
9157
9246
  },
9158
9247
  AppBskyUnspeccedGetConfig: {
@@ -9526,6 +9615,73 @@ export const schemaDict = {
9526
9615
  },
9527
9616
  },
9528
9617
  },
9618
+ AppBskyUnspeccedSearchStarterPacksSkeleton: {
9619
+ lexicon: 1,
9620
+ id: 'app.bsky.unspecced.searchStarterPacksSkeleton',
9621
+ defs: {
9622
+ main: {
9623
+ type: 'query',
9624
+ description: 'Backend Starter Pack search, returns only skeleton.',
9625
+ parameters: {
9626
+ type: 'params',
9627
+ required: ['q'],
9628
+ properties: {
9629
+ q: {
9630
+ type: 'string',
9631
+ description:
9632
+ 'Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
9633
+ },
9634
+ viewer: {
9635
+ type: 'string',
9636
+ format: 'did',
9637
+ description:
9638
+ 'DID of the account making the request (not included for public/unauthenticated queries).',
9639
+ },
9640
+ limit: {
9641
+ type: 'integer',
9642
+ minimum: 1,
9643
+ maximum: 100,
9644
+ default: 25,
9645
+ },
9646
+ cursor: {
9647
+ type: 'string',
9648
+ description:
9649
+ 'Optional pagination mechanism; may not necessarily allow scrolling through entire result set.',
9650
+ },
9651
+ },
9652
+ },
9653
+ output: {
9654
+ encoding: 'application/json',
9655
+ schema: {
9656
+ type: 'object',
9657
+ required: ['starterPacks'],
9658
+ properties: {
9659
+ cursor: {
9660
+ type: 'string',
9661
+ },
9662
+ hitsTotal: {
9663
+ type: 'integer',
9664
+ description:
9665
+ 'Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.',
9666
+ },
9667
+ starterPacks: {
9668
+ type: 'array',
9669
+ items: {
9670
+ type: 'ref',
9671
+ ref: 'lex:app.bsky.unspecced.defs#skeletonSearchStarterPack',
9672
+ },
9673
+ },
9674
+ },
9675
+ },
9676
+ },
9677
+ errors: [
9678
+ {
9679
+ name: 'BadQueryString',
9680
+ },
9681
+ ],
9682
+ },
9683
+ },
9684
+ },
9529
9685
  AppBskyVideoDefs: {
9530
9686
  lexicon: 1,
9531
9687
  id: 'app.bsky.video.defs',
@@ -9893,6 +10049,9 @@ export const schemaDict = {
9893
10049
  muted: {
9894
10050
  type: 'boolean',
9895
10051
  },
10052
+ opened: {
10053
+ type: 'boolean',
10054
+ },
9896
10055
  unreadCount: {
9897
10056
  type: 'integer',
9898
10057
  },
@@ -10563,8 +10722,9 @@ export const schemaDict = {
10563
10722
  },
10564
10723
  },
10565
10724
  },
10566
- }
10567
- export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
10725
+ } as const satisfies Record<string, LexiconDoc>
10726
+
10727
+ export const schemas = Object.values(schemaDict)
10568
10728
  export const lexicons: Lexicons = new Lexicons(schemas)
10569
10729
  export const ids = {
10570
10730
  ComAtprotoAdminDefs: 'com.atproto.admin.defs',
@@ -10653,6 +10813,7 @@ export const ids = {
10653
10813
  ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
10654
10814
  ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
10655
10815
  ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos',
10816
+ ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle',
10656
10817
  ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue',
10657
10818
  ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels',
10658
10819
  ComAtprotoTempRequestPhoneVerification:
@@ -10721,6 +10882,7 @@ export const ids = {
10721
10882
  AppBskyGraphMuteActor: 'app.bsky.graph.muteActor',
10722
10883
  AppBskyGraphMuteActorList: 'app.bsky.graph.muteActorList',
10723
10884
  AppBskyGraphMuteThread: 'app.bsky.graph.muteThread',
10885
+ AppBskyGraphSearchStarterPacks: 'app.bsky.graph.searchStarterPacks',
10724
10886
  AppBskyGraphStarterpack: 'app.bsky.graph.starterpack',
10725
10887
  AppBskyGraphUnmuteActor: 'app.bsky.graph.unmuteActor',
10726
10888
  AppBskyGraphUnmuteActorList: 'app.bsky.graph.unmuteActorList',
@@ -10746,6 +10908,8 @@ export const ids = {
10746
10908
  AppBskyUnspeccedSearchActorsSkeleton:
10747
10909
  'app.bsky.unspecced.searchActorsSkeleton',
10748
10910
  AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
10911
+ AppBskyUnspeccedSearchStarterPacksSkeleton:
10912
+ 'app.bsky.unspecced.searchStarterPacksSkeleton',
10749
10913
  AppBskyVideoDefs: 'app.bsky.video.defs',
10750
10914
  AppBskyVideoGetJobStatus: 'app.bsky.video.getJobStatus',
10751
10915
  AppBskyVideoGetUploadLimits: 'app.bsky.video.getUploadLimits',
@@ -0,0 +1,50 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+ import * as AppBskyGraphDefs from './defs'
11
+
12
+ export interface QueryParams {
13
+ /** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
14
+ q: string
15
+ limit: number
16
+ cursor?: string
17
+ }
18
+
19
+ export type InputSchema = undefined
20
+
21
+ export interface OutputSchema {
22
+ cursor?: string
23
+ starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
24
+ [k: string]: unknown
25
+ }
26
+
27
+ export type HandlerInput = undefined
28
+
29
+ export interface HandlerSuccess {
30
+ encoding: 'application/json'
31
+ body: OutputSchema
32
+ headers?: { [key: string]: string }
33
+ }
34
+
35
+ export interface HandlerError {
36
+ status: number
37
+ message?: string
38
+ }
39
+
40
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
41
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
42
+ auth: HA
43
+ params: QueryParams
44
+ input: HandlerInput
45
+ req: express.Request
46
+ res: express.Response
47
+ }
48
+ export type Handler<HA extends HandlerAuth = never> = (
49
+ ctx: HandlerReqCtx<HA>,
50
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -39,3 +39,27 @@ export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor {
39
39
  export function validateSkeletonSearchActor(v: unknown): ValidationResult {
40
40
  return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchActor', v)
41
41
  }
42
+
43
+ export interface SkeletonSearchStarterPack {
44
+ uri: string
45
+ [k: string]: unknown
46
+ }
47
+
48
+ export function isSkeletonSearchStarterPack(
49
+ v: unknown,
50
+ ): v is SkeletonSearchStarterPack {
51
+ return (
52
+ isObj(v) &&
53
+ hasProp(v, '$type') &&
54
+ v.$type === 'app.bsky.unspecced.defs#skeletonSearchStarterPack'
55
+ )
56
+ }
57
+
58
+ export function validateSkeletonSearchStarterPack(
59
+ v: unknown,
60
+ ): ValidationResult {
61
+ return lexicons.validate(
62
+ 'app.bsky.unspecced.defs#skeletonSearchStarterPack',
63
+ v,
64
+ )
65
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+ import * as AppBskyUnspeccedDefs from './defs'
11
+
12
+ export interface QueryParams {
13
+ /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
14
+ q: string
15
+ /** DID of the account making the request (not included for public/unauthenticated queries). */
16
+ viewer?: string
17
+ limit: number
18
+ /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */
19
+ cursor?: string
20
+ }
21
+
22
+ export type InputSchema = undefined
23
+
24
+ export interface OutputSchema {
25
+ cursor?: string
26
+ /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */
27
+ hitsTotal?: number
28
+ starterPacks: AppBskyUnspeccedDefs.SkeletonSearchStarterPack[]
29
+ [k: string]: unknown
30
+ }
31
+
32
+ export type HandlerInput = undefined
33
+
34
+ export interface HandlerSuccess {
35
+ encoding: 'application/json'
36
+ body: OutputSchema
37
+ headers?: { [key: string]: string }
38
+ }
39
+
40
+ export interface HandlerError {
41
+ status: number
42
+ message?: string
43
+ error?: 'BadQueryString'
44
+ }
45
+
46
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
47
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
48
+ auth: HA
49
+ params: QueryParams
50
+ input: HandlerInput
51
+ req: express.Request
52
+ res: express.Response
53
+ }
54
+ export type Handler<HA extends HandlerAuth = never> = (
55
+ ctx: HandlerReqCtx<HA>,
56
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -118,6 +118,7 @@ export interface ConvoView {
118
118
  | DeletedMessageView
119
119
  | { $type: string; [k: string]: unknown }
120
120
  muted: boolean
121
+ opened?: boolean
121
122
  unreadCount: number
122
123
  [k: string]: unknown
123
124
  }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+
11
+ export interface QueryParams {}
12
+
13
+ export interface InputSchema {
14
+ handle: string
15
+ [k: string]: unknown
16
+ }
17
+
18
+ export interface OutputSchema {
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export interface HandlerInput {
23
+ encoding: 'application/json'
24
+ body: InputSchema
25
+ }
26
+
27
+ export interface HandlerSuccess {
28
+ encoding: 'application/json'
29
+ body: OutputSchema
30
+ headers?: { [key: string]: string }
31
+ }
32
+
33
+ export interface HandlerError {
34
+ status: number
35
+ message?: string
36
+ }
37
+
38
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
39
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
40
+ auth: HA
41
+ params: QueryParams
42
+ input: HandlerInput
43
+ req: express.Request
44
+ res: express.Response
45
+ }
46
+ export type Handler<HA extends HandlerAuth = never> = (
47
+ ctx: HandlerReqCtx<HA>,
48
+ ) => Promise<HandlerOutput> | HandlerOutput