@atproto/bsky 0.0.64 → 0.0.65

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 (194) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/api/app/bsky/actor/searchActors.js +1 -1
  3. package/dist/api/app/bsky/actor/searchActors.js.map +1 -1
  4. package/dist/api/app/bsky/feed/getPostThread.js +1 -10
  5. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  6. package/dist/api/app/bsky/feed/searchPosts.js +1 -1
  7. package/dist/api/app/bsky/feed/searchPosts.js.map +1 -1
  8. package/dist/api/app/bsky/graph/getActorStarterPacks.d.ts +4 -0
  9. package/dist/api/app/bsky/graph/getActorStarterPacks.d.ts.map +1 -0
  10. package/dist/api/app/bsky/graph/getActorStarterPacks.js +58 -0
  11. package/dist/api/app/bsky/graph/getActorStarterPacks.js.map +1 -0
  12. package/dist/api/app/bsky/graph/getStarterPack.d.ts +4 -0
  13. package/dist/api/app/bsky/graph/getStarterPack.d.ts.map +1 -0
  14. package/dist/api/app/bsky/graph/getStarterPack.js +45 -0
  15. package/dist/api/app/bsky/graph/getStarterPack.js.map +1 -0
  16. package/dist/api/app/bsky/graph/getStarterPacks.d.ts +4 -0
  17. package/dist/api/app/bsky/graph/getStarterPacks.d.ts.map +1 -0
  18. package/dist/api/app/bsky/graph/getStarterPacks.js +40 -0
  19. package/dist/api/app/bsky/graph/getStarterPacks.js.map +1 -0
  20. package/dist/api/index.d.ts.map +1 -1
  21. package/dist/api/index.js +6 -0
  22. package/dist/api/index.js.map +1 -1
  23. package/dist/data-plane/server/db/database-schema.d.ts +2 -1
  24. package/dist/data-plane/server/db/database-schema.d.ts.map +1 -1
  25. package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.d.ts +4 -0
  26. package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.d.ts.map +1 -0
  27. package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.js +47 -0
  28. package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.js.map +1 -0
  29. package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
  30. package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
  31. package/dist/data-plane/server/db/migrations/index.js +2 -1
  32. package/dist/data-plane/server/db/migrations/index.js.map +1 -1
  33. package/dist/data-plane/server/db/tables/profile.d.ts +2 -0
  34. package/dist/data-plane/server/db/tables/profile.d.ts.map +1 -1
  35. package/dist/data-plane/server/db/tables/starter-pack.d.ts +14 -0
  36. package/dist/data-plane/server/db/tables/starter-pack.d.ts.map +1 -0
  37. package/dist/data-plane/server/db/tables/starter-pack.js +5 -0
  38. package/dist/data-plane/server/db/tables/starter-pack.js.map +1 -0
  39. package/dist/data-plane/server/indexing/index.d.ts +2 -0
  40. package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
  41. package/dist/data-plane/server/indexing/index.js +2 -0
  42. package/dist/data-plane/server/indexing/index.js.map +1 -1
  43. package/dist/data-plane/server/indexing/plugins/profile.d.ts.map +1 -1
  44. package/dist/data-plane/server/indexing/plugins/profile.js +18 -2
  45. package/dist/data-plane/server/indexing/plugins/profile.js.map +1 -1
  46. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts +11 -0
  47. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -0
  48. package/dist/data-plane/server/indexing/plugins/starter-pack.js +78 -0
  49. package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -0
  50. package/dist/data-plane/server/routes/index.d.ts.map +1 -1
  51. package/dist/data-plane/server/routes/index.js +2 -0
  52. package/dist/data-plane/server/routes/index.js.map +1 -1
  53. package/dist/data-plane/server/routes/interactions.d.ts.map +1 -1
  54. package/dist/data-plane/server/routes/interactions.js +57 -1
  55. package/dist/data-plane/server/routes/interactions.js.map +1 -1
  56. package/dist/data-plane/server/routes/profile.d.ts.map +1 -1
  57. package/dist/data-plane/server/routes/profile.js +1 -0
  58. package/dist/data-plane/server/routes/profile.js.map +1 -1
  59. package/dist/data-plane/server/routes/records.d.ts.map +1 -1
  60. package/dist/data-plane/server/routes/records.js +1 -0
  61. package/dist/data-plane/server/routes/records.js.map +1 -1
  62. package/dist/data-plane/server/routes/starter-packs.d.ts +6 -0
  63. package/dist/data-plane/server/routes/starter-packs.d.ts.map +1 -0
  64. package/dist/data-plane/server/routes/starter-packs.js +25 -0
  65. package/dist/data-plane/server/routes/starter-packs.js.map +1 -0
  66. package/dist/data-plane/server/util.d.ts +6 -6
  67. package/dist/hydration/actor.d.ts +2 -0
  68. package/dist/hydration/actor.d.ts.map +1 -1
  69. package/dist/hydration/actor.js +2 -0
  70. package/dist/hydration/actor.js.map +1 -1
  71. package/dist/hydration/feed.d.ts +1 -5
  72. package/dist/hydration/feed.d.ts.map +1 -1
  73. package/dist/hydration/feed.js +0 -1
  74. package/dist/hydration/feed.js.map +1 -1
  75. package/dist/hydration/graph.d.ts +17 -1
  76. package/dist/hydration/graph.d.ts.map +1 -1
  77. package/dist/hydration/graph.js +30 -1
  78. package/dist/hydration/graph.js.map +1 -1
  79. package/dist/hydration/hydrator.d.ts +9 -3
  80. package/dist/hydration/hydrator.d.ts.map +1 -1
  81. package/dist/hydration/hydrator.js +114 -5
  82. package/dist/hydration/hydrator.js.map +1 -1
  83. package/dist/hydration/util.d.ts +4 -0
  84. package/dist/hydration/util.d.ts.map +1 -1
  85. package/dist/hydration/util.js.map +1 -1
  86. package/dist/lexicon/index.d.ts +7 -0
  87. package/dist/lexicon/index.d.ts.map +1 -1
  88. package/dist/lexicon/index.js +13 -0
  89. package/dist/lexicon/index.js.map +1 -1
  90. package/dist/lexicon/lexicons.d.ts +332 -0
  91. package/dist/lexicon/lexicons.d.ts.map +1 -1
  92. package/dist/lexicon/lexicons.js +335 -1
  93. package/dist/lexicon/lexicons.js.map +1 -1
  94. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +5 -0
  95. package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
  96. package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
  97. package/dist/lexicon/types/app/bsky/actor/profile.d.ts +3 -0
  98. package/dist/lexicon/types/app/bsky/actor/profile.d.ts.map +1 -1
  99. package/dist/lexicon/types/app/bsky/actor/profile.js.map +1 -1
  100. package/dist/lexicon/types/app/bsky/graph/defs.d.ts +36 -1
  101. package/dist/lexicon/types/app/bsky/graph/defs.d.ts.map +1 -1
  102. package/dist/lexicon/types/app/bsky/graph/defs.js +23 -1
  103. package/dist/lexicon/types/app/bsky/graph/defs.js.map +1 -1
  104. package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.d.ts +39 -0
  105. package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.d.ts.map +1 -0
  106. package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.js +3 -0
  107. package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.js.map +1 -0
  108. package/dist/lexicon/types/app/bsky/graph/getStarterPack.d.ts +37 -0
  109. package/dist/lexicon/types/app/bsky/graph/getStarterPack.d.ts.map +1 -0
  110. package/dist/lexicon/types/app/bsky/graph/getStarterPack.js +3 -0
  111. package/dist/lexicon/types/app/bsky/graph/getStarterPack.js.map +1 -0
  112. package/dist/lexicon/types/app/bsky/graph/getStarterPacks.d.ts +36 -0
  113. package/dist/lexicon/types/app/bsky/graph/getStarterPacks.d.ts.map +1 -0
  114. package/dist/lexicon/types/app/bsky/graph/getStarterPacks.js +3 -0
  115. package/dist/lexicon/types/app/bsky/graph/getStarterPacks.js.map +1 -0
  116. package/dist/lexicon/types/app/bsky/graph/starterpack.d.ts +25 -0
  117. package/dist/lexicon/types/app/bsky/graph/starterpack.d.ts.map +1 -0
  118. package/dist/lexicon/types/app/bsky/graph/starterpack.js +27 -0
  119. package/dist/lexicon/types/app/bsky/graph/starterpack.js.map +1 -0
  120. package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +2 -2
  121. package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts.map +1 -1
  122. package/dist/lexicon/types/app/bsky/notification/listNotifications.js.map +1 -1
  123. package/dist/proto/bsky_connect.d.ts +39 -1
  124. package/dist/proto/bsky_connect.d.ts.map +1 -1
  125. package/dist/proto/bsky_connect.js +38 -0
  126. package/dist/proto/bsky_connect.js.map +1 -1
  127. package/dist/proto/bsky_pb.d.ts +160 -0
  128. package/dist/proto/bsky_pb.d.ts.map +1 -1
  129. package/dist/proto/bsky_pb.js +508 -4
  130. package/dist/proto/bsky_pb.js.map +1 -1
  131. package/dist/views/index.d.ts +3 -1
  132. package/dist/views/index.d.ts.map +1 -1
  133. package/dist/views/index.js +64 -0
  134. package/dist/views/index.js.map +1 -1
  135. package/package.json +5 -5
  136. package/proto/bsky.proto +47 -0
  137. package/src/api/app/bsky/actor/searchActors.ts +1 -1
  138. package/src/api/app/bsky/feed/getPostThread.ts +1 -9
  139. package/src/api/app/bsky/feed/searchPosts.ts +1 -1
  140. package/src/api/app/bsky/graph/getActorStarterPacks.ts +99 -0
  141. package/src/api/app/bsky/graph/getStarterPack.ts +80 -0
  142. package/src/api/app/bsky/graph/getStarterPacks.ts +81 -0
  143. package/src/api/index.ts +6 -0
  144. package/src/data-plane/server/db/database-schema.ts +2 -0
  145. package/src/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.ts +45 -0
  146. package/src/data-plane/server/db/migrations/index.ts +1 -0
  147. package/src/data-plane/server/db/tables/profile.ts +2 -0
  148. package/src/data-plane/server/db/tables/starter-pack.ts +16 -0
  149. package/src/data-plane/server/indexing/index.ts +3 -0
  150. package/src/data-plane/server/indexing/plugins/profile.ts +16 -2
  151. package/src/data-plane/server/indexing/plugins/starter-pack.ts +76 -0
  152. package/src/data-plane/server/routes/index.ts +2 -0
  153. package/src/data-plane/server/routes/interactions.ts +56 -2
  154. package/src/data-plane/server/routes/profile.ts +1 -0
  155. package/src/data-plane/server/routes/records.ts +1 -0
  156. package/src/data-plane/server/routes/starter-packs.ts +32 -0
  157. package/src/hydration/actor.ts +5 -0
  158. package/src/hydration/feed.ts +1 -2
  159. package/src/hydration/graph.ts +55 -2
  160. package/src/hydration/hydrator.ts +143 -6
  161. package/src/hydration/util.ts +2 -0
  162. package/src/lexicon/index.ts +37 -0
  163. package/src/lexicon/lexicons.ts +337 -1
  164. package/src/lexicon/types/app/bsky/actor/defs.ts +5 -0
  165. package/src/lexicon/types/app/bsky/actor/profile.ts +3 -0
  166. package/src/lexicon/types/app/bsky/graph/defs.ts +58 -0
  167. package/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts +49 -0
  168. package/src/lexicon/types/app/bsky/graph/getStarterPack.ts +47 -0
  169. package/src/lexicon/types/app/bsky/graph/getStarterPacks.ts +46 -0
  170. package/src/lexicon/types/app/bsky/graph/starterpack.ts +50 -0
  171. package/src/lexicon/types/app/bsky/notification/listNotifications.ts +2 -1
  172. package/src/proto/bsky_connect.ts +46 -0
  173. package/src/proto/bsky_pb.ts +512 -0
  174. package/src/views/index.ts +71 -1
  175. package/tests/__snapshots__/feed-generation.test.ts.snap +28 -0
  176. package/tests/data-plane/__snapshots__/indexing.test.ts.snap +9 -0
  177. package/tests/views/__snapshots__/author-feed.test.ts.snap +29 -0
  178. package/tests/views/__snapshots__/block-lists.test.ts.snap +16 -0
  179. package/tests/views/__snapshots__/blocks.test.ts.snap +4 -0
  180. package/tests/views/__snapshots__/follows.test.ts.snap +34 -0
  181. package/tests/views/__snapshots__/labeler-service.test.ts.snap +4 -0
  182. package/tests/views/__snapshots__/likes.test.ts.snap +1 -0
  183. package/tests/views/__snapshots__/list-feed.test.ts.snap +12 -0
  184. package/tests/views/__snapshots__/mute-lists.test.ts.snap +20 -0
  185. package/tests/views/__snapshots__/mutes.test.ts.snap +8 -0
  186. package/tests/views/__snapshots__/notifications.test.ts.snap +10 -0
  187. package/tests/views/__snapshots__/posts.test.ts.snap +6 -0
  188. package/tests/views/__snapshots__/profile.test.ts.snap +18 -0
  189. package/tests/views/__snapshots__/reposts.test.ts.snap +1 -0
  190. package/tests/views/__snapshots__/starter-packs.test.ts.snap +482 -0
  191. package/tests/views/__snapshots__/thread.test.ts.snap +22 -0
  192. package/tests/views/__snapshots__/threadgating.test.ts.snap +2 -0
  193. package/tests/views/__snapshots__/timeline.test.ts.snap +81 -0
  194. package/tests/views/starter-packs.test.ts +121 -0
@@ -0,0 +1,46 @@
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
+ uris: string[]
14
+ }
15
+
16
+ export type InputSchema = undefined
17
+
18
+ export interface OutputSchema {
19
+ starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
20
+ [k: string]: unknown
21
+ }
22
+
23
+ export type HandlerInput = undefined
24
+
25
+ export interface HandlerSuccess {
26
+ encoding: 'application/json'
27
+ body: OutputSchema
28
+ headers?: { [key: string]: string }
29
+ }
30
+
31
+ export interface HandlerError {
32
+ status: number
33
+ message?: string
34
+ }
35
+
36
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
37
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
38
+ auth: HA
39
+ params: QueryParams
40
+ input: HandlerInput
41
+ req: express.Request
42
+ res: express.Response
43
+ }
44
+ export type Handler<HA extends HandlerAuth = never> = (
45
+ ctx: HandlerReqCtx<HA>,
46
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -0,0 +1,50 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { lexicons } from '../../../../lexicons'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { CID } from 'multiformats/cid'
8
+ import * as AppBskyRichtextFacet from '../richtext/facet'
9
+
10
+ export interface Record {
11
+ /** Display name for starter pack; can not be empty. */
12
+ name: string
13
+ description?: string
14
+ descriptionFacets?: AppBskyRichtextFacet.Main[]
15
+ /** Reference (AT-URI) to the list record. */
16
+ list: string
17
+ feeds?: FeedItem[]
18
+ createdAt: string
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export function isRecord(v: unknown): v is Record {
23
+ return (
24
+ isObj(v) &&
25
+ hasProp(v, '$type') &&
26
+ (v.$type === 'app.bsky.graph.starterpack#main' ||
27
+ v.$type === 'app.bsky.graph.starterpack')
28
+ )
29
+ }
30
+
31
+ export function validateRecord(v: unknown): ValidationResult {
32
+ return lexicons.validate('app.bsky.graph.starterpack#main', v)
33
+ }
34
+
35
+ export interface FeedItem {
36
+ uri: string
37
+ [k: string]: unknown
38
+ }
39
+
40
+ export function isFeedItem(v: unknown): v is FeedItem {
41
+ return (
42
+ isObj(v) &&
43
+ hasProp(v, '$type') &&
44
+ v.$type === 'app.bsky.graph.starterpack#feedItem'
45
+ )
46
+ }
47
+
48
+ export function validateFeedItem(v: unknown): ValidationResult {
49
+ return lexicons.validate('app.bsky.graph.starterpack#feedItem', v)
50
+ }
@@ -54,7 +54,7 @@ export interface Notification {
54
54
  uri: string
55
55
  cid: string
56
56
  author: AppBskyActorDefs.ProfileView
57
- /** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', and 'quote'. */
57
+ /** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'. */
58
58
  reason:
59
59
  | 'like'
60
60
  | 'repost'
@@ -62,6 +62,7 @@ export interface Notification {
62
62
  | 'mention'
63
63
  | 'reply'
64
64
  | 'quote'
65
+ | 'starterpack-joined'
65
66
  | (string & {})
66
67
  reasonSubject?: string
67
68
  record: {}
@@ -40,6 +40,8 @@ import {
40
40
  GetActorRepostsResponse,
41
41
  GetActorsRequest,
42
42
  GetActorsResponse,
43
+ GetActorStarterPacksRequest,
44
+ GetActorStarterPacksResponse,
43
45
  GetActorTakedownRequest,
44
46
  GetActorTakedownResponse,
45
47
  GetAllLabelersRequest,
@@ -104,6 +106,8 @@ import {
104
106
  GetListBlockRecordsResponse,
105
107
  GetListCountRequest,
106
108
  GetListCountResponse,
109
+ GetListCountsRequest,
110
+ GetListCountsResponse,
107
111
  GetListFeedRequest,
108
112
  GetListFeedResponse,
109
113
  GetListItemRecordsRequest,
@@ -140,6 +144,10 @@ import {
140
144
  GetRepostsByActorAndSubjectsResponse,
141
145
  GetRepostsBySubjectRequest,
142
146
  GetRepostsBySubjectResponse,
147
+ GetStarterPackCountsRequest,
148
+ GetStarterPackCountsResponse,
149
+ GetStarterPackRecordsRequest,
150
+ GetStarterPackRecordsResponse,
143
151
  GetSuggestedEntitiesRequest,
144
152
  GetSuggestedEntitiesResponse,
145
153
  GetSuggestedFeedsRequest,
@@ -310,6 +318,15 @@ export const Service = {
310
318
  O: GetLabelerRecordsResponse,
311
319
  kind: MethodKind.Unary,
312
320
  },
321
+ /**
322
+ * @generated from rpc bsky.Service.GetStarterPackRecords
323
+ */
324
+ getStarterPackRecords: {
325
+ name: 'GetStarterPackRecords',
326
+ I: GetStarterPackRecordsRequest,
327
+ O: GetStarterPackRecordsResponse,
328
+ kind: MethodKind.Unary,
329
+ },
313
330
  /**
314
331
  * Follows
315
332
  *
@@ -426,6 +443,24 @@ export const Service = {
426
443
  O: GetCountsForUsersResponse,
427
444
  kind: MethodKind.Unary,
428
445
  },
446
+ /**
447
+ * @generated from rpc bsky.Service.GetStarterPackCounts
448
+ */
449
+ getStarterPackCounts: {
450
+ name: 'GetStarterPackCounts',
451
+ I: GetStarterPackCountsRequest,
452
+ O: GetStarterPackCountsResponse,
453
+ kind: MethodKind.Unary,
454
+ },
455
+ /**
456
+ * @generated from rpc bsky.Service.GetListCounts
457
+ */
458
+ getListCounts: {
459
+ name: 'GetListCounts',
460
+ I: GetListCountsRequest,
461
+ O: GetListCountsResponse,
462
+ kind: MethodKind.Unary,
463
+ },
429
464
  /**
430
465
  * Profile
431
466
  *
@@ -800,6 +835,17 @@ export const Service = {
800
835
  O: GetAllLabelersResponse,
801
836
  kind: MethodKind.Unary,
802
837
  },
838
+ /**
839
+ * Starter packs
840
+ *
841
+ * @generated from rpc bsky.Service.GetActorStarterPacks
842
+ */
843
+ getActorStarterPacks: {
844
+ name: 'GetActorStarterPacks',
845
+ I: GetActorStarterPacksRequest,
846
+ O: GetActorStarterPacksResponse,
847
+ kind: MethodKind.Unary,
848
+ },
803
849
  /**
804
850
  * Sync
805
851
  *