@atproto/bsky 0.0.138 → 0.0.140

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 +13 -0
  2. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
  3. package/dist/api/app/bsky/feed/getAuthorFeed.js +4 -1
  4. package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
  5. package/dist/api/app/bsky/feed/getListFeed.d.ts.map +1 -1
  6. package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
  7. package/dist/api/app/bsky/notification/getUnreadCount.js +3 -1
  8. package/dist/api/app/bsky/notification/getUnreadCount.js.map +1 -1
  9. package/dist/api/app/bsky/notification/listNotifications.d.ts.map +1 -1
  10. package/dist/api/app/bsky/notification/listNotifications.js +3 -1
  11. package/dist/api/app/bsky/notification/listNotifications.js.map +1 -1
  12. package/dist/api/blob-resolver.js +17 -7
  13. package/dist/api/blob-resolver.js.map +1 -1
  14. package/dist/api/com/atproto/admin/getAccountInfos.d.ts.map +1 -1
  15. package/dist/api/com/atproto/admin/getAccountInfos.js +4 -1
  16. package/dist/api/com/atproto/admin/getAccountInfos.js.map +1 -1
  17. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
  18. package/dist/api/com/atproto/admin/getSubjectStatus.js +4 -1
  19. package/dist/api/com/atproto/admin/getSubjectStatus.js.map +1 -1
  20. package/dist/api/com/atproto/identity/resolveHandle.js +17 -7
  21. package/dist/api/com/atproto/identity/resolveHandle.js.map +1 -1
  22. package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
  23. package/dist/api/com/atproto/repo/getRecord.js +3 -1
  24. package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
  25. package/dist/api/health.d.ts.map +1 -1
  26. package/dist/api/index.js +17 -7
  27. package/dist/api/index.js.map +1 -1
  28. package/dist/api/util.d.ts.map +1 -1
  29. package/dist/api/well-known.d.ts.map +1 -1
  30. package/dist/auth-verifier.d.ts.map +1 -1
  31. package/dist/auth-verifier.js +17 -7
  32. package/dist/auth-verifier.js.map +1 -1
  33. package/dist/bsync.d.ts.map +1 -1
  34. package/dist/context.js +17 -7
  35. package/dist/context.js.map +1 -1
  36. package/dist/courier.d.ts.map +1 -1
  37. package/dist/data-plane/client/index.d.ts.map +1 -1
  38. package/dist/data-plane/client/util.d.ts.map +1 -1
  39. package/dist/data-plane/client/util.js +17 -7
  40. package/dist/data-plane/client/util.js.map +1 -1
  41. package/dist/data-plane/server/db/db.js +17 -7
  42. package/dist/data-plane/server/db/db.js.map +1 -1
  43. package/dist/data-plane/server/db/migrations/index.js +17 -7
  44. package/dist/data-plane/server/db/migrations/index.js.map +1 -1
  45. package/dist/data-plane/server/db/pagination.d.ts.map +1 -1
  46. package/dist/data-plane/server/db/util.d.ts.map +1 -1
  47. package/dist/data-plane/server/indexing/index.js +17 -7
  48. package/dist/data-plane/server/indexing/index.js.map +1 -1
  49. package/dist/data-plane/server/indexing/plugins/block.d.ts.map +1 -1
  50. package/dist/data-plane/server/indexing/plugins/block.js +17 -7
  51. package/dist/data-plane/server/indexing/plugins/block.js.map +1 -1
  52. package/dist/data-plane/server/indexing/plugins/chat-declaration.d.ts.map +1 -1
  53. package/dist/data-plane/server/indexing/plugins/chat-declaration.js +17 -7
  54. package/dist/data-plane/server/indexing/plugins/chat-declaration.js.map +1 -1
  55. package/dist/data-plane/server/indexing/plugins/feed-generator.d.ts.map +1 -1
  56. package/dist/data-plane/server/indexing/plugins/feed-generator.js +17 -7
  57. package/dist/data-plane/server/indexing/plugins/feed-generator.js.map +1 -1
  58. package/dist/data-plane/server/indexing/plugins/follow.d.ts.map +1 -1
  59. package/dist/data-plane/server/indexing/plugins/follow.js +17 -7
  60. package/dist/data-plane/server/indexing/plugins/follow.js.map +1 -1
  61. package/dist/data-plane/server/indexing/plugins/labeler.d.ts.map +1 -1
  62. package/dist/data-plane/server/indexing/plugins/labeler.js +17 -7
  63. package/dist/data-plane/server/indexing/plugins/labeler.js.map +1 -1
  64. package/dist/data-plane/server/indexing/plugins/like.d.ts.map +1 -1
  65. package/dist/data-plane/server/indexing/plugins/like.js +17 -7
  66. package/dist/data-plane/server/indexing/plugins/like.js.map +1 -1
  67. package/dist/data-plane/server/indexing/plugins/list-block.d.ts.map +1 -1
  68. package/dist/data-plane/server/indexing/plugins/list-block.js +17 -7
  69. package/dist/data-plane/server/indexing/plugins/list-block.js.map +1 -1
  70. package/dist/data-plane/server/indexing/plugins/list-item.d.ts.map +1 -1
  71. package/dist/data-plane/server/indexing/plugins/list-item.js +17 -7
  72. package/dist/data-plane/server/indexing/plugins/list-item.js.map +1 -1
  73. package/dist/data-plane/server/indexing/plugins/list.d.ts.map +1 -1
  74. package/dist/data-plane/server/indexing/plugins/list.js +17 -7
  75. package/dist/data-plane/server/indexing/plugins/list.js.map +1 -1
  76. package/dist/data-plane/server/indexing/plugins/post-gate.d.ts.map +1 -1
  77. package/dist/data-plane/server/indexing/plugins/post-gate.js +17 -7
  78. package/dist/data-plane/server/indexing/plugins/post-gate.js.map +1 -1
  79. package/dist/data-plane/server/indexing/plugins/post.d.ts.map +1 -1
  80. package/dist/data-plane/server/indexing/plugins/post.js +17 -7
  81. package/dist/data-plane/server/indexing/plugins/post.js.map +1 -1
  82. package/dist/data-plane/server/indexing/plugins/profile.d.ts.map +1 -1
  83. package/dist/data-plane/server/indexing/plugins/profile.js +17 -7
  84. package/dist/data-plane/server/indexing/plugins/profile.js.map +1 -1
  85. package/dist/data-plane/server/indexing/plugins/repost.d.ts.map +1 -1
  86. package/dist/data-plane/server/indexing/plugins/repost.js +17 -7
  87. package/dist/data-plane/server/indexing/plugins/repost.js.map +1 -1
  88. package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -1
  89. package/dist/data-plane/server/indexing/plugins/starter-pack.js +17 -7
  90. package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -1
  91. package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts.map +1 -1
  92. package/dist/data-plane/server/indexing/plugins/thread-gate.js +17 -7
  93. package/dist/data-plane/server/indexing/plugins/thread-gate.js.map +1 -1
  94. package/dist/data-plane/server/routes/blocks.d.ts.map +1 -1
  95. package/dist/data-plane/server/routes/feed-gens.d.ts.map +1 -1
  96. package/dist/data-plane/server/routes/feeds.d.ts.map +1 -1
  97. package/dist/data-plane/server/routes/follows.d.ts.map +1 -1
  98. package/dist/data-plane/server/routes/identity.d.ts.map +1 -1
  99. package/dist/data-plane/server/routes/index.d.ts.map +1 -1
  100. package/dist/data-plane/server/routes/interactions.d.ts.map +1 -1
  101. package/dist/data-plane/server/routes/labels.d.ts.map +1 -1
  102. package/dist/data-plane/server/routes/labels.js +17 -7
  103. package/dist/data-plane/server/routes/labels.js.map +1 -1
  104. package/dist/data-plane/server/routes/likes.d.ts.map +1 -1
  105. package/dist/data-plane/server/routes/lists.d.ts.map +1 -1
  106. package/dist/data-plane/server/routes/moderation.d.ts.map +1 -1
  107. package/dist/data-plane/server/routes/mutes.d.ts.map +1 -1
  108. package/dist/data-plane/server/routes/notifs.d.ts.map +1 -1
  109. package/dist/data-plane/server/routes/posts.d.ts.map +1 -1
  110. package/dist/data-plane/server/routes/profile.d.ts.map +1 -1
  111. package/dist/data-plane/server/routes/quotes.d.ts.map +1 -1
  112. package/dist/data-plane/server/routes/records.d.ts.map +1 -1
  113. package/dist/data-plane/server/routes/records.js +17 -7
  114. package/dist/data-plane/server/routes/records.js.map +1 -1
  115. package/dist/data-plane/server/routes/relationships.d.ts.map +1 -1
  116. package/dist/data-plane/server/routes/reposts.d.ts.map +1 -1
  117. package/dist/data-plane/server/routes/search.d.ts.map +1 -1
  118. package/dist/data-plane/server/routes/starter-packs.d.ts.map +1 -1
  119. package/dist/data-plane/server/routes/suggestions.d.ts.map +1 -1
  120. package/dist/data-plane/server/routes/sync.d.ts.map +1 -1
  121. package/dist/data-plane/server/routes/threads.d.ts.map +1 -1
  122. package/dist/data-plane/server/util.d.ts.map +1 -1
  123. package/dist/hydration/actor.d.ts +4 -1
  124. package/dist/hydration/actor.d.ts.map +1 -1
  125. package/dist/hydration/actor.js +3 -2
  126. package/dist/hydration/actor.js.map +1 -1
  127. package/dist/hydration/hydrator.d.ts +1 -0
  128. package/dist/hydration/hydrator.d.ts.map +1 -1
  129. package/dist/hydration/hydrator.js +19 -5
  130. package/dist/hydration/hydrator.js.map +1 -1
  131. package/dist/hydration/util.d.ts.map +1 -1
  132. package/dist/hydration/util.js +17 -7
  133. package/dist/hydration/util.js.map +1 -1
  134. package/dist/image/server.js +17 -7
  135. package/dist/image/server.js.map +1 -1
  136. package/dist/index.js +17 -7
  137. package/dist/index.js.map +1 -1
  138. package/dist/lexicon/index.d.ts +4 -0
  139. package/dist/lexicon/index.d.ts.map +1 -1
  140. package/dist/lexicon/index.js +8 -0
  141. package/dist/lexicon/index.js.map +1 -1
  142. package/dist/lexicon/lexicons.d.ts +326 -4
  143. package/dist/lexicon/lexicons.d.ts.map +1 -1
  144. package/dist/lexicon/lexicons.js +171 -2
  145. package/dist/lexicon/lexicons.js.map +1 -1
  146. package/dist/lexicon/types/app/bsky/graph/verification.d.ts +19 -0
  147. package/dist/lexicon/types/app/bsky/graph/verification.d.ts.map +1 -0
  148. package/dist/lexicon/types/app/bsky/graph/verification.js +16 -0
  149. package/dist/lexicon/types/app/bsky/graph/verification.js.map +1 -0
  150. package/dist/lexicon/types/com/atproto/sync/defs.d.ts +2 -0
  151. package/dist/lexicon/types/com/atproto/sync/defs.d.ts.map +1 -0
  152. package/dist/lexicon/types/com/atproto/sync/defs.js +7 -0
  153. package/dist/lexicon/types/com/atproto/sync/defs.js.map +1 -0
  154. package/dist/lexicon/types/com/atproto/sync/getHostStatus.d.ts +43 -0
  155. package/dist/lexicon/types/com/atproto/sync/getHostStatus.d.ts.map +1 -0
  156. package/dist/lexicon/types/com/atproto/sync/getHostStatus.js +7 -0
  157. package/dist/lexicon/types/com/atproto/sync/getHostStatus.js.map +1 -0
  158. package/dist/lexicon/types/com/atproto/sync/listHosts.d.ts +51 -0
  159. package/dist/lexicon/types/com/atproto/sync/listHosts.d.ts.map +1 -0
  160. package/dist/lexicon/types/com/atproto/sync/listHosts.js +16 -0
  161. package/dist/lexicon/types/com/atproto/sync/listHosts.js.map +1 -0
  162. package/dist/lexicon/types/com/atproto/sync/requestCrawl.d.ts +1 -0
  163. package/dist/lexicon/types/com/atproto/sync/requestCrawl.d.ts.map +1 -1
  164. package/dist/lexicon/util.d.ts.map +1 -1
  165. package/dist/pipeline.d.ts.map +1 -1
  166. package/dist/proto/bsky_pb.d.ts +9 -5
  167. package/dist/proto/bsky_pb.d.ts.map +1 -1
  168. package/dist/proto/bsky_pb.js +16 -0
  169. package/dist/proto/bsky_pb.js.map +1 -1
  170. package/dist/util/debug.d.ts.map +1 -1
  171. package/dist/util.d.ts.map +1 -1
  172. package/dist/views/util.d.ts.map +1 -1
  173. package/dist/views/util.js +17 -7
  174. package/dist/views/util.js.map +1 -1
  175. package/package.json +4 -5
  176. package/proto/bsky.proto +1 -0
  177. package/src/api/app/bsky/feed/getAuthorFeed.ts +4 -4
  178. package/src/api/app/bsky/notification/getUnreadCount.ts +3 -1
  179. package/src/api/app/bsky/notification/listNotifications.ts +3 -1
  180. package/src/api/com/atproto/admin/getAccountInfos.ts +4 -1
  181. package/src/api/com/atproto/admin/getSubjectStatus.ts +6 -1
  182. package/src/api/com/atproto/repo/getRecord.ts +3 -1
  183. package/src/hydration/actor.ts +9 -2
  184. package/src/hydration/hydrator.ts +20 -13
  185. package/src/lexicon/index.ts +24 -0
  186. package/src/lexicon/lexicons.ts +181 -2
  187. package/src/lexicon/types/app/bsky/graph/verification.ts +38 -0
  188. package/src/lexicon/types/com/atproto/sync/defs.ts +23 -0
  189. package/src/lexicon/types/com/atproto/sync/getHostStatus.ts +61 -0
  190. package/src/lexicon/types/com/atproto/sync/listHosts.ts +77 -0
  191. package/src/lexicon/types/com/atproto/sync/requestCrawl.ts +1 -0
  192. package/src/proto/bsky_pb.ts +12 -0
  193. package/tsconfig.build.tsbuildinfo +1 -1
  194. package/tsconfig.tests.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/util/debug.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,IAAI,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,MAAM,IAAI,eAChD,UAAU,CAAC,IAAI,CAAC,8BAQxC,CAAA"}
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/util/debug.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,IAAI,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,IAAI,IAAI,MACzD,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,8BAQxC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,kBAAkB,WACrB,MAAM,GAAG,SAAS,KACzB,cAAc,GAAG,IAoBnB,CAAA;AAED,eAAO,MAAM,oBAAoB,SAAU,MAAM,EAAE,KAAG,cAKrD,CAAA;AAED,eAAO,MAAM,mBAAmB,WAAY,cAAc,KAAG,MAK5D,CAAA"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,MAAM,GAAG,SAAS,K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AAc,EAAE;QACd,QAAQ,EAAE,OAAO,CAAA;KAClB,CAAA;CACF,CAAA;AAED,qBAAa,eAAe;IAExB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE;QACZ,kBAAkB,EAAE,MAAM,CAAA;QAC1B,mBAAmB,EAAE,MAAM,CAAA;KAC5B;IAEH,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;IAOnD,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;CAOrD"}
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.VideoUriBuilder = exports.parsePostgate = exports.cidFromBlobJson = exports.parseThreadGate = void 0;
27
37
  const util = __importStar(require("node:util"));
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/views/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAiC;AACjC,8CAA0C;AAE1C,sEAGgD;AAChD,0EAMkD;AAClD,oEAAoE;AAE7D,MAAM,eAAe,GAAG,CAC7B,UAAkB,EAClB,QAAgB,EAChB,QAA2B,EAC3B,IAAuB,EACL,EAAE;IACpB,IAAI,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAC3B,CAAC;IACD,yGAAyG;IACzG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACzB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAC3B,CAAC;IAED,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,0BAAa,CAAC,CAAA;IACpD,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,2BAAc,CAAC,CAAA;IACrD,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,4BAAe,CAAC,CAAA;IACvD,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,uBAAU,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAE7E,wDAAwD;IACxD,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,WAAW,GAAG,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;YACnD,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CACxB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,iBAAS,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,CACrD,CAAA;QACH,CAAC,C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AChB,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAC7B,kBAAkB,CAAC,GAAG,CAAC,EACvB,kBAAkB,CAAC,GAAG,CAAC,CACxB,CAAA;IACH,CAAC;CACF;AArBD,0CAqBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/bsky",
3
- "version": "0.0.138",
3
+ "version": "0.0.140",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of app.bsky App View (Bluesky API)",
6
6
  "keywords": [
@@ -15,7 +15,6 @@
15
15
  },
16
16
  "main": "dist/index.js",
17
17
  "types": "dist/index.d.ts",
18
- "bin": "dist/bin.js",
19
18
  "engines": {
20
19
  "node": ">=18.7.0"
21
20
  },
@@ -50,7 +49,7 @@
50
49
  "undici": "^6.19.8",
51
50
  "@atproto-labs/fetch-node": "0.1.8",
52
51
  "@atproto-labs/xrpc-utils": "0.0.11",
53
- "@atproto/api": "^0.14.21",
52
+ "@atproto/api": "^0.14.22",
54
53
  "@atproto/common": "^0.4.10",
55
54
  "@atproto/crypto": "^0.4.4",
56
55
  "@atproto/did": "^0.1.5",
@@ -74,9 +73,9 @@
74
73
  "jest": "^28.1.2",
75
74
  "ts-node": "^10.8.2",
76
75
  "typescript": "^5.6.3",
77
- "@atproto/api": "^0.14.21",
76
+ "@atproto/api": "^0.14.22",
78
77
  "@atproto/lex-cli": "^0.7.2",
79
- "@atproto/pds": "^0.4.122",
78
+ "@atproto/pds": "^0.4.125",
80
79
  "@atproto/xrpc": "^0.6.12"
81
80
  },
82
81
  "scripts": {
package/proto/bsky.proto CHANGED
@@ -381,6 +381,7 @@ message GetActorRepostsResponse {
381
381
  // - should this include handles? apply repo takedown?
382
382
  message GetActorsRequest {
383
383
  repeated string dids = 1;
384
+ repeated string skip_cache_for_dids = 2;
384
385
  }
385
386
 
386
387
  message ActorInfo {
@@ -70,10 +70,10 @@ export const skeleton = async (inputs: {
70
70
  if (!did) {
71
71
  throw new InvalidRequestError('Profile not found')
72
72
  }
73
- const actors = await ctx.hydrator.actor.getActors(
74
- [did],
75
- params.hydrateCtx.includeTakedowns,
76
- )
73
+ const actors = await ctx.hydrator.actor.getActors([did], {
74
+ includeTakedowns: params.hydrateCtx.includeTakedowns,
75
+ skipCacheForDids: params.hydrateCtx.skipCacheForViewer,
76
+ })
77
77
  const actor = actors.get(did)
78
78
  if (!actor) {
79
79
  throw new InvalidRequestError('Profile not found')
@@ -76,6 +76,8 @@ type SkeletonState = {
76
76
  }
77
77
 
78
78
  const getPriority = async (ctx: Context, did: string) => {
79
- const actors = await ctx.hydrator.actor.getActors([did])
79
+ const actors = await ctx.hydrator.actor.getActors([did], {
80
+ skipCacheForDids: [did],
81
+ })
80
82
  return !!actors.get(did)?.priorityNotifications
81
83
  }
@@ -246,6 +246,8 @@ type SkeletonState = {
246
246
  }
247
247
 
248
248
  const getPriority = async (ctx: Context, did: string) => {
249
- const actors = await ctx.hydrator.actor.getActors([did])
249
+ const actors = await ctx.hydrator.actor.getActors([did], {
250
+ skipCacheForDids: [did],
251
+ })
250
252
  return !!actors.get(did)?.priorityNotifications
251
253
  }
@@ -10,7 +10,10 @@ export default function (server: Server, ctx: AppContext) {
10
10
  const { dids } = params
11
11
  const { includeTakedowns } = ctx.authVerifier.parseCreds(auth)
12
12
 
13
- const actors = await ctx.hydrator.actor.getActors(dids, true)
13
+ const actors = await ctx.hydrator.actor.getActors(dids, {
14
+ includeTakedowns: true,
15
+ skipCacheForDids: dids,
16
+ })
14
17
 
15
18
  const infos = mapDefined(dids, (did) => {
16
19
  const info = actors.get(did)
@@ -47,7 +47,12 @@ export default function (server: Server, ctx: AppContext) {
47
47
  }
48
48
  }
49
49
  } else if (did) {
50
- const res = (await ctx.hydrator.actor.getActors([did], true)).get(did)
50
+ const res = (
51
+ await ctx.hydrator.actor.getActors([did], {
52
+ includeTakedowns: true,
53
+ skipCacheForDids: [did],
54
+ })
55
+ ).get(did)
51
56
  if (res) {
52
57
  body = {
53
58
  subject: {
@@ -14,7 +14,9 @@ export default function (server: Server, ctx: AppContext) {
14
14
  throw new InvalidRequestError(`Could not find repo: ${repo}`)
15
15
  }
16
16
 
17
- const actors = await ctx.hydrator.actor.getActors([did], includeTakedowns)
17
+ const actors = await ctx.hydrator.actor.getActors([did], {
18
+ includeTakedowns,
19
+ })
18
20
  if (!actors.get(did)) {
19
21
  throw new InvalidRequestError(`Could not find repo: ${repo}`)
20
22
  }
@@ -100,9 +100,16 @@ export class ActorHydrator {
100
100
  return res.filter((did) => did !== undefined)
101
101
  }
102
102
 
103
- async getActors(dids: string[], includeTakedowns = false): Promise<Actors> {
103
+ async getActors(
104
+ dids: string[],
105
+ opts: {
106
+ includeTakedowns?: boolean
107
+ skipCacheForDids?: string[]
108
+ } = {},
109
+ ): Promise<Actors> {
110
+ const { includeTakedowns = false, skipCacheForDids } = opts
104
111
  if (!dids.length) return new HydrationMap<Actor>()
105
- const res = await this.dataplane.getActors({ dids })
112
+ const res = await this.dataplane.getActors({ dids, skipCacheForDids })
106
113
  return dids.reduce((acc, did, i) => {
107
114
  const actor = res.actors[i]
108
115
  const isNoHosted =
@@ -71,6 +71,11 @@ export class HydrateCtx {
71
71
  includeActorTakedowns = this.vals.includeActorTakedowns
72
72
  include3pBlocks = this.vals.include3pBlocks
73
73
  constructor(private vals: HydrateCtxVals) {}
74
+ // Convenience with use with dataplane.getActors cache control
75
+ get skipCacheForViewer() {
76
+ if (!this.viewer) return
77
+ return [this.viewer]
78
+ }
74
79
  copy<V extends Partial<HydrateCtxVals>>(vals?: V): HydrateCtx & V {
75
80
  return new HydrateCtx({ ...this.vals, ...vals }) as HydrateCtx & V
76
81
  }
@@ -191,7 +196,10 @@ export class Hydrator {
191
196
  ): Promise<HydrationState> {
192
197
  const includeTakedowns = ctx.includeTakedowns || ctx.includeActorTakedowns
193
198
  const [actors, labels, profileViewersState] = await Promise.all([
194
- this.actor.getActors(dids, includeTakedowns),
199
+ this.actor.getActors(dids, {
200
+ includeTakedowns,
201
+ skipCacheForDids: ctx.skipCacheForViewer,
202
+ }),
195
203
  this.label.getLabelsForSubjects(labelSubjectsForDid(dids), ctx.labelers),
196
204
  this.hydrateProfileViewers(dids, ctx),
197
205
  ])
@@ -304,7 +312,10 @@ export class Hydrator {
304
312
  [...uris, ...includeAuthorDids],
305
313
  ctx.labelers,
306
314
  ),
307
- this.actor.getActors(includeAuthorDids, ctx.includeTakedowns),
315
+ this.actor.getActors(includeAuthorDids, {
316
+ includeTakedowns: ctx.includeTakedowns,
317
+ skipCacheForDids: ctx.skipCacheForViewer,
318
+ }),
308
319
  ])
309
320
 
310
321
  if (!ctx.includeTakedowns) {
@@ -949,10 +960,7 @@ export class Hydrator {
949
960
  }
950
961
  }
951
962
 
952
- const activeListAuthors = await this.actor.getActors(
953
- [...listAuthorDids],
954
- false,
955
- )
963
+ const activeListAuthors = await this.actor.getActors([...listAuthorDids])
956
964
 
957
965
  for (const [source, targets] of didMap) {
958
966
  const didBlocks = new HydrationMap<boolean>()
@@ -1075,9 +1083,9 @@ export class Hydrator {
1075
1083
  )
1076
1084
  } else if (collection === ids.AppBskyActorProfile) {
1077
1085
  const did = parsed.hostname
1078
- const actor = (await this.actor.getActors([did], includeTakedowns)).get(
1079
- did,
1080
- )
1086
+ const actor = (
1087
+ await this.actor.getActors([did], { includeTakedowns })
1088
+ ).get(did)
1081
1089
  if (!actor?.profile || !actor?.profileCid) return undefined
1082
1090
  const recordInfo: RecordInfo<ProfileRecord> = {
1083
1091
  record: actor.profile,
@@ -1097,10 +1105,9 @@ export class Hydrator {
1097
1105
  const nonServiceLabelers = labelers.filter(
1098
1106
  (did) => !this.serviceLabelers.has(did),
1099
1107
  )
1100
- const labelerActors = await this.actor.getActors(
1101
- nonServiceLabelers,
1102
- vals.includeTakedowns,
1103
- )
1108
+ const labelerActors = await this.actor.getActors(nonServiceLabelers, {
1109
+ includeTakedowns: vals.includeTakedowns,
1110
+ })
1104
1111
  const availableDids = labelers.filter(
1105
1112
  (did) => this.serviceLabelers.has(did) || !!labelerActors.get(did),
1106
1113
  )
@@ -75,11 +75,13 @@ import * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob.js'
75
75
  import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks.js'
76
76
  import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout.js'
77
77
  import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead.js'
78
+ import * as ComAtprotoSyncGetHostStatus from './types/com/atproto/sync/getHostStatus.js'
78
79
  import * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit.js'
79
80
  import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord.js'
80
81
  import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo.js'
81
82
  import * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus.js'
82
83
  import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs.js'
84
+ import * as ComAtprotoSyncListHosts from './types/com/atproto/sync/listHosts.js'
83
85
  import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos.js'
84
86
  import * as ComAtprotoSyncListReposByCollection from './types/com/atproto/sync/listReposByCollection.js'
85
87
  import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate.js'
@@ -1061,6 +1063,17 @@ export class ComAtprotoSyncNS {
1061
1063
  return this._server.xrpc.method(nsid, cfg)
1062
1064
  }
1063
1065
 
1066
+ getHostStatus<AV extends AuthVerifier>(
1067
+ cfg: ConfigOf<
1068
+ AV,
1069
+ ComAtprotoSyncGetHostStatus.Handler<ExtractAuth<AV>>,
1070
+ ComAtprotoSyncGetHostStatus.HandlerReqCtx<ExtractAuth<AV>>
1071
+ >,
1072
+ ) {
1073
+ const nsid = 'com.atproto.sync.getHostStatus' // @ts-ignore
1074
+ return this._server.xrpc.method(nsid, cfg)
1075
+ }
1076
+
1064
1077
  getLatestCommit<AV extends AuthVerifier>(
1065
1078
  cfg: ConfigOf<
1066
1079
  AV,
@@ -1116,6 +1129,17 @@ export class ComAtprotoSyncNS {
1116
1129
  return this._server.xrpc.method(nsid, cfg)
1117
1130
  }
1118
1131
 
1132
+ listHosts<AV extends AuthVerifier>(
1133
+ cfg: ConfigOf<
1134
+ AV,
1135
+ ComAtprotoSyncListHosts.Handler<ExtractAuth<AV>>,
1136
+ ComAtprotoSyncListHosts.HandlerReqCtx<ExtractAuth<AV>>
1137
+ >,
1138
+ ) {
1139
+ const nsid = 'com.atproto.sync.listHosts' // @ts-ignore
1140
+ return this._server.xrpc.method(nsid, cfg)
1141
+ }
1142
+
1119
1143
  listRepos<AV extends AuthVerifier>(
1120
1144
  cfg: ConfigOf<
1121
1145
  AV,
@@ -3365,6 +3365,16 @@ export const schemaDict = {
3365
3365
  },
3366
3366
  },
3367
3367
  },
3368
+ ComAtprotoSyncDefs: {
3369
+ lexicon: 1,
3370
+ id: 'com.atproto.sync.defs',
3371
+ defs: {
3372
+ hostStatus: {
3373
+ type: 'string',
3374
+ knownValues: ['active', 'idle', 'offline', 'throttled', 'banned'],
3375
+ },
3376
+ },
3377
+ },
3368
3378
  ComAtprotoSyncGetBlob: {
3369
3379
  lexicon: 1,
3370
3380
  id: 'com.atproto.sync.getBlob',
@@ -3525,6 +3535,59 @@ export const schemaDict = {
3525
3535
  },
3526
3536
  },
3527
3537
  },
3538
+ ComAtprotoSyncGetHostStatus: {
3539
+ lexicon: 1,
3540
+ id: 'com.atproto.sync.getHostStatus',
3541
+ defs: {
3542
+ main: {
3543
+ type: 'query',
3544
+ description:
3545
+ 'Returns information about a specified upstream host, as consumed by the server. Implemented by relays.',
3546
+ parameters: {
3547
+ type: 'params',
3548
+ required: ['hostname'],
3549
+ properties: {
3550
+ hostname: {
3551
+ type: 'string',
3552
+ description:
3553
+ 'Hostname of the host (eg, PDS or relay) being queried.',
3554
+ },
3555
+ },
3556
+ },
3557
+ output: {
3558
+ encoding: 'application/json',
3559
+ schema: {
3560
+ type: 'object',
3561
+ required: ['hostname'],
3562
+ properties: {
3563
+ hostname: {
3564
+ type: 'string',
3565
+ },
3566
+ seq: {
3567
+ type: 'integer',
3568
+ description:
3569
+ 'Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).',
3570
+ },
3571
+ accountCount: {
3572
+ type: 'integer',
3573
+ description:
3574
+ 'Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts.',
3575
+ },
3576
+ status: {
3577
+ type: 'ref',
3578
+ ref: 'lex:com.atproto.sync.defs#hostStatus',
3579
+ },
3580
+ },
3581
+ },
3582
+ },
3583
+ errors: [
3584
+ {
3585
+ name: 'HostNotFound',
3586
+ },
3587
+ ],
3588
+ },
3589
+ },
3590
+ },
3528
3591
  ComAtprotoSyncGetLatestCommit: {
3529
3592
  lexicon: 1,
3530
3593
  id: 'com.atproto.sync.getLatestCommit',
@@ -3805,6 +3868,74 @@ export const schemaDict = {
3805
3868
  },
3806
3869
  },
3807
3870
  },
3871
+ ComAtprotoSyncListHosts: {
3872
+ lexicon: 1,
3873
+ id: 'com.atproto.sync.listHosts',
3874
+ defs: {
3875
+ main: {
3876
+ type: 'query',
3877
+ description:
3878
+ 'Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.',
3879
+ parameters: {
3880
+ type: 'params',
3881
+ properties: {
3882
+ limit: {
3883
+ type: 'integer',
3884
+ minimum: 1,
3885
+ maximum: 1000,
3886
+ default: 200,
3887
+ },
3888
+ cursor: {
3889
+ type: 'string',
3890
+ },
3891
+ },
3892
+ },
3893
+ output: {
3894
+ encoding: 'application/json',
3895
+ schema: {
3896
+ type: 'object',
3897
+ required: ['hosts'],
3898
+ properties: {
3899
+ cursor: {
3900
+ type: 'string',
3901
+ },
3902
+ hosts: {
3903
+ type: 'array',
3904
+ items: {
3905
+ type: 'ref',
3906
+ ref: 'lex:com.atproto.sync.listHosts#host',
3907
+ },
3908
+ description:
3909
+ 'Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first.',
3910
+ },
3911
+ },
3912
+ },
3913
+ },
3914
+ },
3915
+ host: {
3916
+ type: 'object',
3917
+ required: ['hostname'],
3918
+ properties: {
3919
+ hostname: {
3920
+ type: 'string',
3921
+ description: 'hostname of server; not a URL (no scheme)',
3922
+ },
3923
+ seq: {
3924
+ type: 'integer',
3925
+ description:
3926
+ 'Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).',
3927
+ },
3928
+ accountCount: {
3929
+ type: 'integer',
3930
+ },
3931
+ status: {
3932
+ type: 'ref',
3933
+ ref: 'lex:com.atproto.sync.defs#hostStatus',
3934
+ },
3935
+ },
3936
+ },
3937
+ },
3938
+ },
3808
3939
  ComAtprotoSyncListRepos: {
3809
3940
  lexicon: 1,
3810
3941
  id: 'com.atproto.sync.listRepos',
@@ -3992,6 +4123,11 @@ export const schemaDict = {
3992
4123
  },
3993
4124
  },
3994
4125
  },
4126
+ errors: [
4127
+ {
4128
+ name: 'HostBanned',
4129
+ },
4130
+ ],
3995
4131
  },
3996
4132
  },
3997
4133
  },
@@ -9105,6 +9241,45 @@ export const schemaDict = {
9105
9241
  },
9106
9242
  },
9107
9243
  },
9244
+ AppBskyGraphVerification: {
9245
+ lexicon: 1,
9246
+ id: 'app.bsky.graph.verification',
9247
+ defs: {
9248
+ main: {
9249
+ type: 'record',
9250
+ description:
9251
+ 'Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.',
9252
+ key: 'tid',
9253
+ record: {
9254
+ type: 'object',
9255
+ required: ['subject', 'handle', 'displayName', 'createdAt'],
9256
+ properties: {
9257
+ subject: {
9258
+ description: 'DID of the subject the verification applies to.',
9259
+ type: 'string',
9260
+ format: 'did',
9261
+ },
9262
+ handle: {
9263
+ description:
9264
+ 'Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.',
9265
+ type: 'string',
9266
+ format: 'handle',
9267
+ },
9268
+ displayName: {
9269
+ description:
9270
+ 'Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.',
9271
+ type: 'string',
9272
+ },
9273
+ createdAt: {
9274
+ description: 'Date of when the verification was created.',
9275
+ type: 'string',
9276
+ format: 'datetime',
9277
+ },
9278
+ },
9279
+ },
9280
+ },
9281
+ },
9282
+ },
9108
9283
  AppBskyLabelerDefs: {
9109
9284
  lexicon: 1,
9110
9285
  id: 'app.bsky.labeler.defs',
@@ -10928,7 +11103,7 @@ export const schemaDict = {
10928
11103
  value: {
10929
11104
  type: 'string',
10930
11105
  minLength: 1,
10931
- maxLength: 32,
11106
+ maxLength: 64,
10932
11107
  minGraphemes: 1,
10933
11108
  maxGraphemes: 1,
10934
11109
  },
@@ -11714,7 +11889,7 @@ export const schemaDict = {
11714
11889
  value: {
11715
11890
  type: 'string',
11716
11891
  minLength: 1,
11717
- maxLength: 32,
11892
+ maxLength: 64,
11718
11893
  minGraphemes: 1,
11719
11894
  maxGraphemes: 1,
11720
11895
  },
@@ -12195,15 +12370,18 @@ export const ids = {
12195
12370
  ComAtprotoServerResetPassword: 'com.atproto.server.resetPassword',
12196
12371
  ComAtprotoServerRevokeAppPassword: 'com.atproto.server.revokeAppPassword',
12197
12372
  ComAtprotoServerUpdateEmail: 'com.atproto.server.updateEmail',
12373
+ ComAtprotoSyncDefs: 'com.atproto.sync.defs',
12198
12374
  ComAtprotoSyncGetBlob: 'com.atproto.sync.getBlob',
12199
12375
  ComAtprotoSyncGetBlocks: 'com.atproto.sync.getBlocks',
12200
12376
  ComAtprotoSyncGetCheckout: 'com.atproto.sync.getCheckout',
12201
12377
  ComAtprotoSyncGetHead: 'com.atproto.sync.getHead',
12378
+ ComAtprotoSyncGetHostStatus: 'com.atproto.sync.getHostStatus',
12202
12379
  ComAtprotoSyncGetLatestCommit: 'com.atproto.sync.getLatestCommit',
12203
12380
  ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
12204
12381
  ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
12205
12382
  ComAtprotoSyncGetRepoStatus: 'com.atproto.sync.getRepoStatus',
12206
12383
  ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs',
12384
+ ComAtprotoSyncListHosts: 'com.atproto.sync.listHosts',
12207
12385
  ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos',
12208
12386
  ComAtprotoSyncListReposByCollection: 'com.atproto.sync.listReposByCollection',
12209
12387
  ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
@@ -12283,6 +12461,7 @@ export const ids = {
12283
12461
  AppBskyGraphUnmuteActor: 'app.bsky.graph.unmuteActor',
12284
12462
  AppBskyGraphUnmuteActorList: 'app.bsky.graph.unmuteActorList',
12285
12463
  AppBskyGraphUnmuteThread: 'app.bsky.graph.unmuteThread',
12464
+ AppBskyGraphVerification: 'app.bsky.graph.verification',
12286
12465
  AppBskyLabelerDefs: 'app.bsky.labeler.defs',
12287
12466
  AppBskyLabelerGetServices: 'app.bsky.labeler.getServices',
12288
12467
  AppBskyLabelerService: 'app.bsky.labeler.service',
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'app.bsky.graph.verification'
16
+
17
+ export interface Record {
18
+ $type: 'app.bsky.graph.verification'
19
+ /** DID of the subject the verification applies to. */
20
+ subject: string
21
+ /** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. */
22
+ handle: string
23
+ /** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. */
24
+ displayName: string
25
+ /** Date of when the verification was created. */
26
+ createdAt: string
27
+ [k: string]: unknown
28
+ }
29
+
30
+ const hashRecord = 'main'
31
+
32
+ export function isRecord<V>(v: V) {
33
+ return is$typed(v, id, hashRecord)
34
+ }
35
+
36
+ export function validateRecord<V>(v: V) {
37
+ return validate<Record & V>(v, id, hashRecord, true)
38
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'com.atproto.sync.defs'
16
+
17
+ export type HostStatus =
18
+ | 'active'
19
+ | 'idle'
20
+ | 'offline'
21
+ | 'throttled'
22
+ | 'banned'
23
+ | (string & {})