@atproto/pds 0.4.75 → 0.4.77

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 (46) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/actor-store/repo/transactor.js +2 -2
  3. package/dist/actor-store/repo/transactor.js.map +1 -1
  4. package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
  5. package/dist/api/com/atproto/server/activateAccount.js +4 -8
  6. package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
  7. package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
  8. package/dist/api/com/atproto/server/deactivateAccount.js +3 -8
  9. package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
  10. package/dist/lexicon/index.d.ts +2 -0
  11. package/dist/lexicon/index.d.ts.map +1 -1
  12. package/dist/lexicon/index.js +4 -0
  13. package/dist/lexicon/index.js.map +1 -1
  14. package/dist/lexicon/lexicons.d.ts +150 -0
  15. package/dist/lexicon/lexicons.d.ts.map +1 -1
  16. package/dist/lexicon/lexicons.js +76 -0
  17. package/dist/lexicon/lexicons.js.map +1 -1
  18. package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +2 -0
  19. package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts.map +1 -1
  20. package/dist/lexicon/types/app/bsky/notification/listNotifications.js.map +1 -1
  21. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +9 -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 +10 -0
  24. package/dist/lexicon/types/app/bsky/unspecced/defs.js.map +1 -1
  25. package/dist/lexicon/types/app/bsky/unspecced/getTrendingTopics.d.ts +39 -0
  26. package/dist/lexicon/types/app/bsky/unspecced/getTrendingTopics.d.ts.map +1 -0
  27. package/dist/lexicon/types/app/bsky/unspecced/getTrendingTopics.js +3 -0
  28. package/dist/lexicon/types/app/bsky/unspecced/getTrendingTopics.js.map +1 -0
  29. package/dist/scripts/rebuild-repo.d.ts.map +1 -1
  30. package/dist/scripts/rebuild-repo.js +1 -0
  31. package/dist/scripts/rebuild-repo.js.map +1 -1
  32. package/dist/sequencer/events.d.ts.map +1 -1
  33. package/dist/sequencer/events.js +6 -3
  34. package/dist/sequencer/events.js.map +1 -1
  35. package/package.json +12 -12
  36. package/src/actor-store/repo/transactor.ts +2 -2
  37. package/src/api/com/atproto/server/activateAccount.ts +4 -11
  38. package/src/api/com/atproto/server/deactivateAccount.ts +3 -10
  39. package/src/lexicon/index.ts +12 -0
  40. package/src/lexicon/lexicons.ts +78 -0
  41. package/src/lexicon/types/app/bsky/notification/listNotifications.ts +2 -0
  42. package/src/lexicon/types/app/bsky/unspecced/defs.ts +20 -0
  43. package/src/lexicon/types/app/bsky/unspecced/getTrendingTopics.ts +49 -0
  44. package/src/scripts/rebuild-repo.ts +1 -0
  45. package/src/sequencer/events.ts +7 -3
  46. package/tsconfig.build.tsbuildinfo +1 -1
@@ -7,6 +7,8 @@ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
7
7
  import * as AppBskyActorDefs from '../actor/defs';
8
8
  import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
9
9
  export interface QueryParams {
10
+ /** Notification reasons to include in response. */
11
+ reasons?: string[];
10
12
  limit: number;
11
13
  priority?: boolean;
12
14
  cursor?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"listNotifications.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/notification/listNotifications.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,gBAAgB,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,mBAAmB,MAA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AG,aAAa,CAAA;AAE3C,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAA;IACpC,6GAA6G;IAC7G,MAAM,EACF,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,EAAE,CAAA;IACV,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,mBAAmB,CAAC,KAAK,EAAE,CAAA;IACpC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,YAAY,CAM5D;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAKjE"}
1
+ {"version":3,"file":"listNotifications.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/notification/listNotifications.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,gBAAgB,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,mBAAmB,MAAM,iCAAiC,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CA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IAC7G,MAAM,EACF,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,EAAE,CAAA;IACV,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,mBAAmB,CAAC,KAAK,EAAE,CAAA;IACpC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,YAAY,CAM5D;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAKjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"listNotifications.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/notification/listNotifications.ts"],"names":[],"mappings":";;AA4EA,wCAMC;AAED,oDAKC;AApFD,mDAA+C;AAC/C,2CAAiD;AAsEjD,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,sDAAsD,CACnE,CAAA;AACH,CAAC;AAED,SAAgB,oBAAoB,CAAC,CAAU;IAC7C,OAAO,mBAAQ,CAAC,QAAQ,CACtB,sDAAsD,EACtD,CAAC,CACF,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"listNotifications.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/notification/listNotifications.ts"],"names":[],"mappings":";;AA8EA,wCAMC;AAED,oDAKC;AAtFD,mDAA+C;AAC/C,2CAAiD;AAwEjD,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,sDAAsD,CACnE,CAAA;AACH,CAAC;AAED,SAAgB,oBAAoB,CAAC,CAAU;IAC7C,OAAO,mBAAQ,CAAC,QAAQ,CACtB,sDAAsD,EACtD,CAAC,CACF,CAAA;AACH,CAAC"}
@@ -20,4 +20,13 @@ export interface SkeletonSearchStarterPack {
20
20
  }
21
21
  export declare function isSkeletonSearchStarterPack(v: unknown): v is SkeletonSearchStarterPack;
22
22
  export declare function validateSkeletonSearchStarterPack(v: unknown): ValidationResult;
23
+ export interface TrendingTopic {
24
+ topic: string;
25
+ displayName?: string;
26
+ description?: string;
27
+ link: string;
28
+ [k: string]: unknown;
29
+ }
30
+ export declare function isTrendingTopic(v: unknown): v is TrendingTopic;
31
+ export declare function validateTrendingTopic(v: unknown): ValidationResult;
23
32
  //# sourceMappingURL=defs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,kBAAkB,CAMxE;AAED,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEvE;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,mBAAmB,CAM1E;AAED,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAExE;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,2BAA2B,CACzC,CAAC,EAAE,OAAO,GACT,CAAC,IAAI,yBAAyB,CAMhC;AAED,wBAAgB,iCAAiC,CAC/C,CAAC,EAAE,OAAO,GACT,gBAAgB,CAKlB"}
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,kBAAkB,CAMxE;AAED,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEvE;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,mBAAmB,CAM1E;AAED,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAExE;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,2BAA2B,CACzC,CAAC,EAAE,OAAO,GACT,CAAC,IAAI,yBAAyB,CAMhC;AAED,wBAAgB,iCAAiC,CAC/C,CAAC,EAAE,OAAO,GACT,gBAAgB,CAKlB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,aAAa,CAM9D;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAElE"}
@@ -6,6 +6,8 @@ exports.isSkeletonSearchActor = isSkeletonSearchActor;
6
6
  exports.validateSkeletonSearchActor = validateSkeletonSearchActor;
7
7
  exports.isSkeletonSearchStarterPack = isSkeletonSearchStarterPack;
8
8
  exports.validateSkeletonSearchStarterPack = validateSkeletonSearchStarterPack;
9
+ exports.isTrendingTopic = isTrendingTopic;
10
+ exports.validateTrendingTopic = validateTrendingTopic;
9
11
  const lexicons_1 = require("../../../../lexicons");
10
12
  const util_1 = require("../../../../util");
11
13
  function isSkeletonSearchPost(v) {
@@ -32,4 +34,12 @@ function isSkeletonSearchStarterPack(v) {
32
34
  function validateSkeletonSearchStarterPack(v) {
33
35
  return lexicons_1.lexicons.validate('app.bsky.unspecced.defs#skeletonSearchStarterPack', v);
34
36
  }
37
+ function isTrendingTopic(v) {
38
+ return ((0, util_1.isObj)(v) &&
39
+ (0, util_1.hasProp)(v, '$type') &&
40
+ v.$type === 'app.bsky.unspecced.defs#trendingTopic');
41
+ }
42
+ function validateTrendingTopic(v) {
43
+ return lexicons_1.lexicons.validate('app.bsky.unspecced.defs#trendingTopic', v);
44
+ }
35
45
  //# sourceMappingURL=defs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/defs.ts"],"names":[],"mappings":";;AAaA,oDAMC;AAED,gEAEC;AAOD,sDAMC;AAED,kEAEC;AAOD,kEAQC;AAED,8EAOC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ODIFY
3
+ */
4
+ import express from 'express';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import * as AppBskyUnspeccedDefs from './defs';
7
+ export interface QueryParams {
8
+ /** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */
9
+ viewer?: string;
10
+ limit: number;
11
+ }
12
+ export type InputSchema = undefined;
13
+ export interface OutputSchema {
14
+ topics: AppBskyUnspeccedDefs.TrendingTopic[];
15
+ suggested: AppBskyUnspeccedDefs.TrendingTopic[];
16
+ [k: string]: unknown;
17
+ }
18
+ export type HandlerInput = undefined;
19
+ export interface HandlerSuccess {
20
+ encoding: 'application/json';
21
+ body: OutputSchema;
22
+ headers?: {
23
+ [key: string]: string;
24
+ };
25
+ }
26
+ export interface HandlerError {
27
+ status: number;
28
+ message?: string;
29
+ }
30
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
31
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
32
+ auth: HA;
33
+ params: QueryParams;
34
+ input: HandlerInput;
35
+ req: express.Request;
36
+ res: express.Response;
37
+ };
38
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
39
+ //# sourceMappingURL=getTrendingTopics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTrendingTopics.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getTrendingTopics.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,oBAAoB,MAAM,QAAQ,CAAA;AAE9C,MAAM,WAAW,WAAW;IAC1B,2IAA2I;IAC3I,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAAA;IAC5C,SAAS,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAAA;IAC/C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=getTrendingTopics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTrendingTopics.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getTrendingTopics.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"rebuild-repo.d.ts","sourceRoot":"","sources":["../../src/scripts/rebuild-repo.ts"],"names":[],"mappings":"AAaA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,eAAO,MAAM,WAAW,QAAe,UAAU,QAAQ,MAAM,EAAE,kBAiEhE,CAAA"}
1
+ {"version":3,"file":"rebuild-repo.d.ts","sourceRoot":"","sources":["../../src/scripts/rebuild-repo.ts"],"names":[],"mappings":"AAaA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,eAAO,MAAM,WAAW,QAAe,UAAU,QAAQ,MAAM,EAAE,kBAkEhE,CAAA"}
@@ -62,6 +62,7 @@ const rebuildRepo = async (ctx, args) => {
62
62
  since: null,
63
63
  prev: null,
64
64
  newBlocks,
65
+ relevantBlocks: newBlocks,
65
66
  removedCids: toDelete,
66
67
  };
67
68
  });
@@ -1 +1 @@
1
- {"version":3,"file":"rebuild-repo.js","sourceRoot":"","sources":["../../src/scripts/rebuild-repo.ts"],"names":[],"mappings":";;;;;;AAAA,sEAA6C;AAC7C,0CAAsC;AACtC,wCAOsB;AACtB,4CAAuC;AACvC,4CAAqC;AAI9B,MAAM,WAAW,GAAG,KAAK,EAAE,GAAe,EAAE,IAAc,EAAE,EAAE;IACnE,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC7C,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,uBAAgB,EAAE,CAAA;IAC1C,MAAM,GAAG,GAAG,YAAG,CAAC,OAAO,EAAE,CAAA;IACzB,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QAChE,MAAM,CAAC,OAAO,EAAE,YAAY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,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAEnD,eAAO,MAAM,YAAY;;;;;;EAEvB,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAEvD,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,SAAS,CAAA;CACf,CAAA;AACD,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,SAAS,CAAA;CACf,CAAA;AACD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,UAAU,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,WAAW,CAAA;CACjB,CAAA;AACD,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,SAAS,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,UAAU,CAAA;CAChB,CAAA;AACD,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,WAAW,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,YAAY,CAAA;CAClB,CAAA;AACD,MAAM,MAAM,MAAM,GACd,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,iBAAiB,CAAA"}
@@ -10,11 +10,14 @@ const formatSeqCommit = async (did, commitData, writes) => {
10
10
  const ops = [];
11
11
  const blobs = new repo_1.CidSet();
12
12
  let carSlice;
13
+ const blocksToSend = new repo_1.BlockMap();
14
+ blocksToSend.addMap(commitData.newBlocks);
15
+ blocksToSend.addMap(commitData.relevantBlocks);
13
16
  // max 200 ops or 1MB of data
14
- if (writes.length > 200 || commitData.newBlocks.byteSize > 1000000) {
17
+ if (writes.length > 200 || blocksToSend.byteSize > 1000000) {
15
18
  tooBig = true;
16
19
  const justRoot = new repo_1.BlockMap();
17
- const rootBlock = commitData.newBlocks.get(commitData.cid);
20
+ const rootBlock = blocksToSend.get(commitData.cid);
18
21
  if (rootBlock) {
19
22
  justRoot.set(commitData.cid, rootBlock);
20
23
  }
@@ -36,7 +39,7 @@ const formatSeqCommit = async (did, commitData, writes) => {
36
39
  }
37
40
  ops.push({ action: w.action, path, cid });
38
41
  }
39
- carSlice = await (0, repo_1.blocksToCarFile)(commitData.cid, commitData.newBlocks);
42
+ carSlice = await (0, repo_1.blocksToCarFile)(commitData.cid, blocksToSend);
40
43
  }
41
44
  const evt = {
42
45
  rebase: false,
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/sequencer/events.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,4CAAoD;AACpD,wCAMsB;AAItB,wDAAkD;AAE3C,MAAM,eAAe,GAAG,KAAK,EAClC,GAAW,EACX,UAAsB,EACtB,MAAuB,EACC,EAAE;IAC1B,IAAI,MAAe,CAAA;IACnB,MAAM,GAAG,GAAkB,EAAE,CAAA;IAC7B,MAAM,KAAK,GAAG,IAAI,aAAM,EAAE,CAAA;IAC1B,IAAI,QAAoB,CAAA;IAExB,6BAA6B;IAC7B,IAAI,MAAM,CAAC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,QAAQ,GAAG,OAAO,EAAE,CAAC;QACnE,MAAM,GAAG,IAAI,CAAA;QACb,MAAM,QAAQ,GAAG,IAAI,eAAQ,EAAE,CAAA;QAC/B,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;QAC1D,IAAI,SAAS,EAAE,CAAC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BAAa,CAAC,SAAS;QACvB,+BAAa,CAAC,SAAS;QACvB,+BAAa,CAAC,OAAO;QACrB,+BAAa,CAAC,WAAW;KAC1B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AAGW,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/pds",
3
- "version": "0.4.75",
3
+ "version": "0.4.77",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of atproto Personal Data Server (PDS)",
6
6
  "keywords": [
@@ -46,17 +46,17 @@
46
46
  "undici": "^6.19.8",
47
47
  "zod": "^3.23.8",
48
48
  "@atproto-labs/fetch-node": "0.1.4",
49
- "@atproto/api": "^0.13.19",
50
- "@atproto/aws": "^0.2.9",
51
- "@atproto/common": "^0.4.4",
49
+ "@atproto/api": "^0.13.21",
50
+ "@atproto/aws": "^0.2.10",
51
+ "@atproto/common": "^0.4.5",
52
52
  "@atproto/crypto": "^0.4.2",
53
53
  "@atproto/identity": "^0.4.3",
54
- "@atproto/lexicon": "^0.4.3",
55
- "@atproto/oauth-provider": "^0.2.9",
56
- "@atproto/repo": "^0.5.5",
54
+ "@atproto/lexicon": "^0.4.4",
55
+ "@atproto/oauth-provider": "^0.2.10",
56
+ "@atproto/repo": "^0.6.0",
57
57
  "@atproto/syntax": "^0.3.1",
58
- "@atproto/xrpc": "^0.6.4",
59
- "@atproto/xrpc-server": "^0.7.3"
58
+ "@atproto/xrpc": "^0.6.5",
59
+ "@atproto/xrpc-server": "^0.7.4"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@atproto/pds-entryway": "npm:@atproto/pds@0.3.0-entryway.3",
@@ -75,9 +75,9 @@
75
75
  "ts-node": "^10.8.2",
76
76
  "typescript": "^5.6.3",
77
77
  "ws": "^8.12.0",
78
- "@atproto/api": "^0.13.19",
79
- "@atproto/bsky": "^0.0.97",
80
- "@atproto/lex-cli": "^0.5.2",
78
+ "@atproto/api": "^0.13.21",
79
+ "@atproto/bsky": "^0.0.99",
80
+ "@atproto/lex-cli": "^0.5.3",
81
81
  "@atproto/oauth-client-browser-example": "0.0.0"
82
82
  },
83
83
  "scripts": {
@@ -128,12 +128,12 @@ export class RepoTransactor extends RepoReader {
128
128
 
129
129
  // find blocks that are relevant to ops but not included in diff
130
130
  // (for instance a record that was moved but cid stayed the same)
131
- const newRecordBlocks = commit.newBlocks.getMany(newRecordCids)
131
+ const newRecordBlocks = commit.relevantBlocks.getMany(newRecordCids)
132
132
  if (newRecordBlocks.missing.length > 0) {
133
133
  const missingBlocks = await this.storage.getBlocks(
134
134
  newRecordBlocks.missing,
135
135
  )
136
- commit.newBlocks.addMap(missingBlocks.blocks)
136
+ commit.relevantBlocks.addMap(missingBlocks.blocks)
137
137
  }
138
138
  return commit
139
139
  }
@@ -1,29 +1,21 @@
1
- import assert from 'node:assert'
2
-
3
1
  import { CidSet } from '@atproto/repo'
4
2
  import { INVALID_HANDLE } from '@atproto/syntax'
5
3
  import { InvalidRequestError } from '@atproto/xrpc-server'
6
4
 
7
5
  import AppContext from '../../../../context'
8
6
  import { Server } from '../../../../lexicon'
9
- import { ids } from '../../../../lexicon/lexicons'
10
7
  import { assertValidDidDocumentForService } from './util'
8
+ import { authPassthru } from '../../../proxy'
11
9
 
12
10
  export default function (server: Server, ctx: AppContext) {
13
11
  server.com.atproto.server.activateAccount({
14
12
  auth: ctx.authVerifier.accessFull(),
15
- handler: async ({ auth }) => {
13
+ handler: async ({ req, auth }) => {
16
14
  // in the case of entryway, the full flow is activateAccount (PDS) -> activateAccount (Entryway) -> updateSubjectStatus(PDS)
17
15
  if (ctx.entrywayAgent) {
18
- assert(ctx.cfg.entryway)
19
-
20
16
  await ctx.entrywayAgent.com.atproto.server.activateAccount(
21
17
  undefined,
22
- await ctx.serviceAuthHeaders(
23
- auth.credentials.did,
24
- ctx.cfg.entryway.did,
25
- ids.ComAtprotoServerActivateAccount,
26
- ),
18
+ authPassthru(req),
27
19
  )
28
20
  return
29
21
  }
@@ -50,6 +42,7 @@ export default function (server: Server, ctx: AppContext) {
50
42
  since: null,
51
43
  prev: null,
52
44
  newBlocks: blocks.blocks,
45
+ relevantBlocks: blocks.blocks,
53
46
  removedCids: new CidSet(),
54
47
  }
55
48
  })
@@ -1,23 +1,16 @@
1
- import assert from 'node:assert'
2
-
3
1
  import AppContext from '../../../../context'
4
2
  import { Server } from '../../../../lexicon'
5
- import { ids } from '../../../../lexicon/lexicons'
3
+ import { authPassthru } from '../../../proxy'
6
4
 
7
5
  export default function (server: Server, ctx: AppContext) {
8
6
  server.com.atproto.server.deactivateAccount({
9
7
  auth: ctx.authVerifier.accessFull(),
10
- handler: async ({ auth, input }) => {
8
+ handler: async ({ req, auth, input }) => {
11
9
  // in the case of entryway, the full flow is deactivateAccount (PDS) -> deactivateAccount (Entryway) -> updateSubjectStatus(PDS)
12
10
  if (ctx.entrywayAgent) {
13
- assert(ctx.cfg.entryway)
14
11
  await ctx.entrywayAgent.com.atproto.server.deactivateAccount(
15
12
  input.body,
16
- await ctx.serviceAuthHeaders(
17
- auth.credentials.did,
18
- ctx.cfg.entryway.did,
19
- ids.ComAtprotoServerDeactivateAccount,
20
- ),
13
+ authPassthru(req),
21
14
  )
22
15
  return
23
16
  }
@@ -140,6 +140,7 @@ import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig
140
140
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
141
141
  import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton'
142
142
  import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions'
143
+ import * as AppBskyUnspeccedGetTrendingTopics from './types/app/bsky/unspecced/getTrendingTopics'
143
144
  import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
144
145
  import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
145
146
  import * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton'
@@ -1896,6 +1897,17 @@ export class AppBskyUnspeccedNS {
1896
1897
  return this._server.xrpc.method(nsid, cfg)
1897
1898
  }
1898
1899
 
1900
+ getTrendingTopics<AV extends AuthVerifier>(
1901
+ cfg: ConfigOf<
1902
+ AV,
1903
+ AppBskyUnspeccedGetTrendingTopics.Handler<ExtractAuth<AV>>,
1904
+ AppBskyUnspeccedGetTrendingTopics.HandlerReqCtx<ExtractAuth<AV>>
1905
+ >,
1906
+ ) {
1907
+ const nsid = 'app.bsky.unspecced.getTrendingTopics' // @ts-ignore
1908
+ return this._server.xrpc.method(nsid, cfg)
1909
+ }
1910
+
1899
1911
  searchActorsSkeleton<AV extends AuthVerifier>(
1900
1912
  cfg: ConfigOf<
1901
1913
  AV,
@@ -8944,6 +8944,15 @@ export const schemaDict = {
8944
8944
  parameters: {
8945
8945
  type: 'params',
8946
8946
  properties: {
8947
+ reasons: {
8948
+ description: 'Notification reasons to include in response.',
8949
+ type: 'array',
8950
+ items: {
8951
+ type: 'string',
8952
+ description:
8953
+ 'A reason that matches the reason property of #notification.',
8954
+ },
8955
+ },
8947
8956
  limit: {
8948
8957
  type: 'integer',
8949
8958
  minimum: 1,
@@ -9248,6 +9257,24 @@ export const schemaDict = {
9248
9257
  },
9249
9258
  },
9250
9259
  },
9260
+ trendingTopic: {
9261
+ type: 'object',
9262
+ required: ['topic', 'link'],
9263
+ properties: {
9264
+ topic: {
9265
+ type: 'string',
9266
+ },
9267
+ displayName: {
9268
+ type: 'string',
9269
+ },
9270
+ description: {
9271
+ type: 'string',
9272
+ },
9273
+ link: {
9274
+ type: 'string',
9275
+ },
9276
+ },
9277
+ },
9251
9278
  },
9252
9279
  },
9253
9280
  AppBskyUnspeccedGetConfig: {
@@ -9428,6 +9455,56 @@ export const schemaDict = {
9428
9455
  },
9429
9456
  },
9430
9457
  },
9458
+ AppBskyUnspeccedGetTrendingTopics: {
9459
+ lexicon: 1,
9460
+ id: 'app.bsky.unspecced.getTrendingTopics',
9461
+ defs: {
9462
+ main: {
9463
+ type: 'query',
9464
+ description: 'Get a list of trending topics',
9465
+ parameters: {
9466
+ type: 'params',
9467
+ properties: {
9468
+ viewer: {
9469
+ type: 'string',
9470
+ format: 'did',
9471
+ description:
9472
+ 'DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.',
9473
+ },
9474
+ limit: {
9475
+ type: 'integer',
9476
+ minimum: 1,
9477
+ maximum: 25,
9478
+ default: 10,
9479
+ },
9480
+ },
9481
+ },
9482
+ output: {
9483
+ encoding: 'application/json',
9484
+ schema: {
9485
+ type: 'object',
9486
+ required: ['topics', 'suggested'],
9487
+ properties: {
9488
+ topics: {
9489
+ type: 'array',
9490
+ items: {
9491
+ type: 'ref',
9492
+ ref: 'lex:app.bsky.unspecced.defs#trendingTopic',
9493
+ },
9494
+ },
9495
+ suggested: {
9496
+ type: 'array',
9497
+ items: {
9498
+ type: 'ref',
9499
+ ref: 'lex:app.bsky.unspecced.defs#trendingTopic',
9500
+ },
9501
+ },
9502
+ },
9503
+ },
9504
+ },
9505
+ },
9506
+ },
9507
+ },
9431
9508
  AppBskyUnspeccedSearchActorsSkeleton: {
9432
9509
  lexicon: 1,
9433
9510
  id: 'app.bsky.unspecced.searchActorsSkeleton',
@@ -13677,6 +13754,7 @@ export const ids = {
13677
13754
  'app.bsky.unspecced.getSuggestionsSkeleton',
13678
13755
  AppBskyUnspeccedGetTaggedSuggestions:
13679
13756
  'app.bsky.unspecced.getTaggedSuggestions',
13757
+ AppBskyUnspeccedGetTrendingTopics: 'app.bsky.unspecced.getTrendingTopics',
13680
13758
  AppBskyUnspeccedSearchActorsSkeleton:
13681
13759
  'app.bsky.unspecced.searchActorsSkeleton',
13682
13760
  AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
@@ -11,6 +11,8 @@ import * as AppBskyActorDefs from '../actor/defs'
11
11
  import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
12
12
 
13
13
  export interface QueryParams {
14
+ /** Notification reasons to include in response. */
15
+ reasons?: string[]
14
16
  limit: number
15
17
  priority?: boolean
16
18
  cursor?: string
@@ -63,3 +63,23 @@ export function validateSkeletonSearchStarterPack(
63
63
  v,
64
64
  )
65
65
  }
66
+
67
+ export interface TrendingTopic {
68
+ topic: string
69
+ displayName?: string
70
+ description?: string
71
+ link: string
72
+ [k: string]: unknown
73
+ }
74
+
75
+ export function isTrendingTopic(v: unknown): v is TrendingTopic {
76
+ return (
77
+ isObj(v) &&
78
+ hasProp(v, '$type') &&
79
+ v.$type === 'app.bsky.unspecced.defs#trendingTopic'
80
+ )
81
+ }
82
+
83
+ export function validateTrendingTopic(v: unknown): ValidationResult {
84
+ return lexicons.validate('app.bsky.unspecced.defs#trendingTopic', v)
85
+ }
@@ -0,0 +1,49 @@
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
+ /** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */
14
+ viewer?: string
15
+ limit: number
16
+ }
17
+
18
+ export type InputSchema = undefined
19
+
20
+ export interface OutputSchema {
21
+ topics: AppBskyUnspeccedDefs.TrendingTopic[]
22
+ suggested: AppBskyUnspeccedDefs.TrendingTopic[]
23
+ [k: string]: unknown
24
+ }
25
+
26
+ export type HandlerInput = undefined
27
+
28
+ export interface HandlerSuccess {
29
+ encoding: 'application/json'
30
+ body: OutputSchema
31
+ headers?: { [key: string]: string }
32
+ }
33
+
34
+ export interface HandlerError {
35
+ status: number
36
+ message?: string
37
+ }
38
+
39
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
40
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
41
+ auth: HA
42
+ params: QueryParams
43
+ input: HandlerInput
44
+ req: express.Request
45
+ res: express.Response
46
+ }
47
+ export type Handler<HA extends HandlerAuth = never> = (
48
+ ctx: HandlerReqCtx<HA>,
49
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -73,6 +73,7 @@ export const rebuildRepo = async (ctx: AppContext, args: string[]) => {
73
73
  since: null,
74
74
  prev: null,
75
75
  newBlocks,
76
+ relevantBlocks: newBlocks,
76
77
  removedCids: toDelete,
77
78
  }
78
79
  })
@@ -22,11 +22,15 @@ export const formatSeqCommit = async (
22
22
  const blobs = new CidSet()
23
23
  let carSlice: Uint8Array
24
24
 
25
+ const blocksToSend = new BlockMap()
26
+ blocksToSend.addMap(commitData.newBlocks)
27
+ blocksToSend.addMap(commitData.relevantBlocks)
28
+
25
29
  // max 200 ops or 1MB of data
26
- if (writes.length > 200 || commitData.newBlocks.byteSize > 1000000) {
30
+ if (writes.length > 200 || blocksToSend.byteSize > 1000000) {
27
31
  tooBig = true
28
32
  const justRoot = new BlockMap()
29
- const rootBlock = commitData.newBlocks.get(commitData.cid)
33
+ const rootBlock = blocksToSend.get(commitData.cid)
30
34
  if (rootBlock) {
31
35
  justRoot.set(commitData.cid, rootBlock)
32
36
  }
@@ -46,7 +50,7 @@ export const formatSeqCommit = async (
46
50
  }
47
51
  ops.push({ action: w.action, path, cid })
48
52
  }
49
- carSlice = await blocksToCarFile(commitData.cid, commitData.newBlocks)
53
+ carSlice = await blocksToCarFile(commitData.cid, blocksToSend)
50
54
  }
51
55
 
52
56
  const evt: CommitEvt = {