@atproto/pds 0.4.77 → 0.4.79

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 (117) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/account-manager/helpers/auth.d.ts +1 -1
  3. package/dist/account-manager/helpers/auth.d.ts.map +1 -1
  4. package/dist/account-manager/helpers/auth.js +3 -1
  5. package/dist/account-manager/helpers/auth.js.map +1 -1
  6. package/dist/account-manager/index.d.ts +2 -1
  7. package/dist/account-manager/index.d.ts.map +1 -1
  8. package/dist/account-manager/index.js +13 -8
  9. package/dist/account-manager/index.js.map +1 -1
  10. package/dist/api/app/bsky/actor/getPreferences.d.ts.map +1 -1
  11. package/dist/api/app/bsky/actor/getPreferences.js +4 -1
  12. package/dist/api/app/bsky/actor/getPreferences.js.map +1 -1
  13. package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
  14. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js +2 -1
  15. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
  16. package/dist/api/com/atproto/index.d.ts.map +1 -1
  17. package/dist/api/com/atproto/index.js +2 -0
  18. package/dist/api/com/atproto/index.js.map +1 -1
  19. package/dist/api/com/atproto/moderation/createReport.d.ts +4 -0
  20. package/dist/api/com/atproto/moderation/createReport.d.ts.map +1 -0
  21. package/dist/api/com/atproto/moderation/createReport.js +28 -0
  22. package/dist/api/com/atproto/moderation/createReport.js.map +1 -0
  23. package/dist/api/com/atproto/moderation/index.d.ts +4 -0
  24. package/dist/api/com/atproto/moderation/index.d.ts.map +1 -0
  25. package/dist/api/com/atproto/moderation/index.js +11 -0
  26. package/dist/api/com/atproto/moderation/index.js.map +1 -0
  27. package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
  28. package/dist/api/com/atproto/server/createSession.js +6 -2
  29. package/dist/api/com/atproto/server/createSession.js.map +1 -1
  30. package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
  31. package/dist/api/com/atproto/server/deactivateAccount.js +2 -1
  32. package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
  33. package/dist/api/com/atproto/server/getServiceAuth.d.ts.map +1 -1
  34. package/dist/api/com/atproto/server/getServiceAuth.js +10 -1
  35. package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
  36. package/dist/api/com/atproto/sync/deprecated/getCheckout.js +1 -1
  37. package/dist/api/com/atproto/sync/deprecated/getCheckout.js.map +1 -1
  38. package/dist/api/com/atproto/sync/deprecated/getHead.js +1 -1
  39. package/dist/api/com/atproto/sync/deprecated/getHead.js.map +1 -1
  40. package/dist/api/com/atproto/sync/getBlob.d.ts.map +1 -1
  41. package/dist/api/com/atproto/sync/getBlob.js +4 -1
  42. package/dist/api/com/atproto/sync/getBlob.js.map +1 -1
  43. package/dist/api/com/atproto/sync/getBlocks.js +1 -1
  44. package/dist/api/com/atproto/sync/getBlocks.js.map +1 -1
  45. package/dist/api/com/atproto/sync/getLatestCommit.js +1 -1
  46. package/dist/api/com/atproto/sync/getLatestCommit.js.map +1 -1
  47. package/dist/api/com/atproto/sync/getRecord.js +1 -1
  48. package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
  49. package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
  50. package/dist/api/com/atproto/sync/getRepo.js +4 -1
  51. package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
  52. package/dist/api/com/atproto/sync/listBlobs.d.ts.map +1 -1
  53. package/dist/api/com/atproto/sync/listBlobs.js +4 -1
  54. package/dist/api/com/atproto/sync/listBlobs.js.map +1 -1
  55. package/dist/auth-verifier.d.ts +3 -2
  56. package/dist/auth-verifier.d.ts.map +1 -1
  57. package/dist/auth-verifier.js +3 -2
  58. package/dist/auth-verifier.js.map +1 -1
  59. package/dist/basic-routes.d.ts.map +1 -1
  60. package/dist/basic-routes.js +20 -1
  61. package/dist/basic-routes.js.map +1 -1
  62. package/dist/lexicon/index.d.ts +2 -2
  63. package/dist/lexicon/index.d.ts.map +1 -1
  64. package/dist/lexicon/lexicons.d.ts +36 -0
  65. package/dist/lexicon/lexicons.d.ts.map +1 -1
  66. package/dist/lexicon/lexicons.js +18 -0
  67. package/dist/lexicon/lexicons.js.map +1 -1
  68. package/dist/lexicon/types/com/atproto/server/createSession.d.ts +2 -0
  69. package/dist/lexicon/types/com/atproto/server/createSession.d.ts.map +1 -1
  70. package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts +6 -0
  71. package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
  72. package/dist/pipethrough.d.ts +4 -0
  73. package/dist/pipethrough.d.ts.map +1 -1
  74. package/dist/pipethrough.js +1 -0
  75. package/dist/pipethrough.js.map +1 -1
  76. package/package.json +5 -5
  77. package/src/account-manager/helpers/auth.ts +5 -1
  78. package/src/account-manager/index.ts +14 -11
  79. package/src/api/app/bsky/actor/getPreferences.ts +4 -1
  80. package/src/api/com/atproto/identity/requestPlcOperationSignature.ts +2 -1
  81. package/src/api/com/atproto/index.ts +2 -0
  82. package/src/api/com/atproto/moderation/createReport.ts +36 -0
  83. package/src/api/com/atproto/moderation/index.ts +7 -0
  84. package/src/api/com/atproto/server/createSession.ts +11 -2
  85. package/src/api/com/atproto/server/deactivateAccount.ts +2 -1
  86. package/src/api/com/atproto/server/getServiceAuth.ts +14 -1
  87. package/src/api/com/atproto/sync/deprecated/getCheckout.ts +1 -1
  88. package/src/api/com/atproto/sync/deprecated/getHead.ts +1 -1
  89. package/src/api/com/atproto/sync/getBlob.ts +4 -1
  90. package/src/api/com/atproto/sync/getBlocks.ts +1 -1
  91. package/src/api/com/atproto/sync/getLatestCommit.ts +1 -1
  92. package/src/api/com/atproto/sync/getRecord.ts +1 -1
  93. package/src/api/com/atproto/sync/getRepo.ts +4 -1
  94. package/src/api/com/atproto/sync/listBlobs.ts +4 -1
  95. package/src/auth-verifier.ts +13 -10
  96. package/src/basic-routes.ts +20 -3
  97. package/src/lexicon/index.ts +2 -2
  98. package/src/lexicon/lexicons.ts +22 -0
  99. package/src/lexicon/types/com/atproto/server/createSession.ts +2 -0
  100. package/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts +6 -0
  101. package/src/pipethrough.ts +1 -2
  102. package/tests/__snapshots__/takedown-appeal.test.ts.snap +30 -0
  103. package/tests/account-deactivation.test.ts +1 -1
  104. package/tests/account-migration.test.ts +3 -3
  105. package/tests/auth.test.ts +10 -11
  106. package/tests/blob-deletes.test.ts +8 -8
  107. package/tests/crud.test.ts +4 -12
  108. package/tests/file-uploads.test.ts +5 -11
  109. package/tests/moderation.test.ts +1 -1
  110. package/tests/proxied/__snapshots__/admin.test.ts.snap +32 -7
  111. package/tests/proxied/__snapshots__/feedgen.test.ts.snap +4 -4
  112. package/tests/proxied/__snapshots__/views.test.ts.snap +32 -32
  113. package/tests/proxied/read-after-write.test.ts +2 -2
  114. package/tests/seeds/basic.ts +3 -3
  115. package/tests/takedown-appeal.test.ts +157 -0
  116. package/tsconfig.build.tsbuildinfo +1 -1
  117. package/tsconfig.tests.tsbuildinfo +1 -1
@@ -10,6 +10,8 @@ export interface InputSchema {
10
10
  identifier: string;
11
11
  password: string;
12
12
  authFactorToken?: string;
13
+ /** When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned */
14
+ allowTakendown?: boolean;
13
15
  [k: string]: unknown;
14
16
  }
15
17
  export interface OutputSchema {
@@ -1 +1 @@
1
- {"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/createSession.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,sFAAsF;IACtF,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAA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ACnB,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"}
1
+ {"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/createSession.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,sFAAsF;IACtF,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gIAAgI;IAChI,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,EAAE,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oOAAoO;IACpO,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAClE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,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;IAChB,KAAK,CAAC,EAAE,iBAAiB,GAAG,yBAAyB,CAAA;CACtD;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"}
@@ -5,6 +5,12 @@ import express from 'express';
5
5
  import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
6
  import * as ToolsOzoneModerationDefs from './defs';
7
7
  export interface QueryParams {
8
+ /** Number of queues being used by moderators. Subjects will be split among all queues. */
9
+ queueCount?: number;
10
+ /** Index of the queue to fetch subjects from. Works only when queueCount value is specified. */
11
+ queueIndex?: number;
12
+ /** A seeder to shuffle/balance the queue items. */
13
+ queueSeed?: string;
8
14
  /** All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. */
9
15
  includeAllUserRecords?: boolean;
10
16
  /** The subject to get the status for. */
@@ -1 +1 @@
1
- {"version":3,"file":"queryStatuses.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/moderation/queryStatuses.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,wBAAwB,MAAM,QAAQ,CAAA;AAElD,MAAM,WAAW,WAAW;IAC1B,4IAA4I;IAC5I,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,8FAA8F;IAC9F,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,8FAA8F;IAC9F,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,oGAAoG;IACpG,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,0EAA0E;IAC1E,cAAc,CAAC,EAAE,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,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"}
1
+ {"version":3,"file":"queryStatuses.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/moderation/queryStatuses.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,wBAAwB,MAAM,QAAQ,CAAA;AAElD,MAAM,WAAW,WAAW;IAC1B,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gGAAgG;IAChG,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4IAA4I;IAC5I,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,8FAA8F;IAC9F,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,8FAA8F;IAC9F,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,+FAA+F;IAC/F,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AA;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"}
@@ -25,6 +25,10 @@ export declare function pipethrough(ctx: AppContext, req: express.Request, optio
25
25
  headers: Record<string, string>;
26
26
  encoding: string;
27
27
  }>;
28
+ export declare function parseProxyInfo(ctx: AppContext, req: express.Request, lxm: string): Promise<{
29
+ url: string;
30
+ did: string;
31
+ }>;
28
32
  export declare const parseProxyHeader: (ctx: Pick<AppContext, "idResolver">, proxyTo: string) => Promise<{
29
33
  did: string;
30
34
  url: string;
@@ -1 +1 @@
1
- {"version":3,"file":"pipethrough.d.ts","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,EAAe,QAAQ,EAAE,MAAM,aAAa,CAAA;AAUnD,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EAKzB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,UAAU,MAAM,WAAW,CAA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
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROTECTED_METHODS = exports.PRIVILEGED_METHODS = exports.parseProxyHeader = exports.proxyHandler = void 0;
4
4
  exports.pipethrough = pipethrough;
5
+ exports.parseProxyInfo = parseProxyInfo;
5
6
  exports.isJsonContentType = isJsonContentType;
6
7
  exports.asPipeThroughBuffer = asPipeThroughBuffer;
7
8
  const node_stream_1 = require("node:stream");
@@ -1 +1 @@
1
- {"version":3,"file":"pipethrough.js","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;;AA0IA,kCAkEC;AAoRD,8CAGC;AAyDD,kDAWC;AAriBD,6CAAmD;AAGnD,4CAKwB;AACxB,wCAA0E;AAC1E,sDAQ6B;AAG7B,iDAAwC;AACxC,qCAAqC;AAE9B,MAAM,YAAY,GAAG,CAAC,GAAe,EAAmB,EAAE;IAC/D,MAAM,cAAc,GAAG,GAAG,CAAC,YAAY,CAAC,cAAc,EAAE,CAAA;IACxD,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC9B,eAAe;QAEf,IAAI,CAAC;YACH,IACE,GAAG,CAAC,MAAM,KAAK,KAAK;gBACpB,GAAG,CAAC,MAAM,KAAK,MAAM;gBACrB,GAAG,CAAC,MAAM,KAAK,MAAM,EACrB,CAAC;gBACD,MAAM,IAAI,uBAAe,CACvB,mBAAY,CAAC,cAAc,EAC3B,0CAA0C,CAC3C,CAAA;YACH,CAAC;YAED,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;YACpD,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACnC,qDAAqD;gBACrD,MAAM,IAAI,iCAAmB,CAAC,8BAA8B,CAAC,CAAA;YAC/D,CAAC;YAED,MAAM,GAAG,GAAG,IAAA,0BAAY,EAAC,GAAG,CAA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/C,KAAK,cAAG,CAAC,qCAAqC,CAAC;QAC/C,KAAK,cAAG,CAAC,oCAAoC,CAAC;QAC9C,KAAK,cAAG,CAAC,6BAA6B,CAAC;QACvC,KAAK,cAAG,CAAC,4BAA4B,CAAC;QACtC,KAAK,cAAG,CAAC,6BAA6B,CAAC;QACvC,KAAK,cAAG,CAAC,2BAA2B,CAAC;QACrC,KAAK,cAAG,CAAC,+BAA+B,CAAC;QACzC,KAAK,cAAG,CAAC,iCAAiC,CAAC;QAC3C,KAAK,cAAG,CAAC,+BAA+B;YACtC,OAAO,GAAG,CAAC,GAAG,CAAC,UAAU,CAAA;QAC3B,KAAK,cAAG,CAAC,gCAAgC;YACvC,OAAO,GAAG,CAAC,GAAG,CAAC,aAAa,CAAA;QAC9B;YACE,OAAO,GAAG,CAAC,GAAG,CAAC,WAAW,CAAA;IAC9B,CAAC;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAY,EAAsB,EAAE;IACtD,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AAClD,CAAC,CAAA;AAED,SAAS,gBAAgB,CAAuB,GAAY;IAC1D,mBAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,oCAAoC,CAAC,CAAA;AAChE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/pds",
3
- "version": "0.4.77",
3
+ "version": "0.4.79",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of atproto Personal Data Server (PDS)",
6
6
  "keywords": [
@@ -46,7 +46,7 @@
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.21",
49
+ "@atproto/api": "^0.13.23",
50
50
  "@atproto/aws": "^0.2.10",
51
51
  "@atproto/common": "^0.4.5",
52
52
  "@atproto/crypto": "^0.4.2",
@@ -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.21",
79
- "@atproto/bsky": "^0.0.99",
80
- "@atproto/lex-cli": "^0.5.3",
78
+ "@atproto/api": "^0.13.23",
79
+ "@atproto/bsky": "^0.0.101",
80
+ "@atproto/lex-cli": "^0.5.4",
81
81
  "@atproto/oauth-client-browser-example": "0.0.0"
82
82
  },
83
83
  "scripts": {
@@ -208,7 +208,11 @@ export const getRefreshTokenId = () => {
208
208
  return ui8.toString(crypto.randomBytes(32), 'base64')
209
209
  }
210
210
 
211
- export const formatScope = (appPassword: AppPassDescript | null): AuthScope => {
211
+ export const formatScope = (
212
+ appPassword: AppPassDescript | null,
213
+ isSoftDeleted?: boolean,
214
+ ): AuthScope => {
215
+ if (isSoftDeleted) return AuthScope.Takendown
212
216
  if (!appPassword) return AuthScope.Access
213
217
  return appPassword.privileged
214
218
  ? AuthScope.AppPassPrivileged
@@ -211,15 +211,19 @@ export class AccountManager
211
211
  async createSession(
212
212
  did: string,
213
213
  appPassword: password.AppPassDescript | null,
214
+ isSoftDeleted = false,
214
215
  ) {
215
216
  const { accessJwt, refreshJwt } = await auth.createTokens({
216
217
  did,
217
218
  jwtKey: this.jwtKey,
218
219
  serviceDid: this.serviceDid,
219
- scope: auth.formatScope(appPassword),
220
+ scope: auth.formatScope(appPassword, isSoftDeleted),
220
221
  })
221
- const refreshPayload = auth.decodeRefreshToken(refreshJwt)
222
- await auth.storeRefreshToken(this.db, refreshPayload, appPassword)
222
+ // For soft deleted accounts don't store refresh token so that it can't be rotated.
223
+ if (!isSoftDeleted) {
224
+ const refreshPayload = auth.decodeRefreshToken(refreshJwt)
225
+ await auth.storeRefreshToken(this.db, refreshPayload, appPassword)
226
+ }
223
227
  return { accessJwt, refreshJwt }
224
228
  }
225
229
 
@@ -295,6 +299,7 @@ export class AccountManager
295
299
  }): Promise<{
296
300
  user: ActorAccount
297
301
  appPassword: password.AppPassDescript | null
302
+ isSoftDeleted: boolean
298
303
  }> {
299
304
  const start = Date.now()
300
305
  try {
@@ -313,6 +318,7 @@ export class AccountManager
313
318
  if (!user) {
314
319
  throw new AuthRequiredError('Invalid identifier or password')
315
320
  }
321
+ const isSoftDeleted = softDeleted(user)
316
322
 
317
323
  let appPassword: password.AppPassDescript | null = null
318
324
  const validAccountPass = await this.verifyAccountPassword(
@@ -320,20 +326,17 @@ export class AccountManager
320
326
  password,
321
327
  )
322
328
  if (!validAccountPass) {
329
+ // takendown/suspended accounts cannot login with app password
330
+ if (isSoftDeleted) {
331
+ throw new AuthRequiredError('Invalid identifier or password')
332
+ }
323
333
  appPassword = await this.verifyAppPassword(user.did, password)
324
334
  if (appPassword === null) {
325
335
  throw new AuthRequiredError('Invalid identifier or password')
326
336
  }
327
337
  }
328
338
 
329
- if (softDeleted(user)) {
330
- throw new AuthRequiredError(
331
- 'Account has been taken down',
332
- 'AccountTakedown',
333
- )
334
- }
335
-
336
- return { user, appPassword }
339
+ return { user, appPassword, isSoftDeleted }
337
340
  } finally {
338
341
  // Mitigate timing attacks
339
342
  await wait(350 - (Date.now() - start))
@@ -1,10 +1,13 @@
1
1
  import { Server } from '../../../../lexicon'
2
2
  import AppContext from '../../../../context'
3
+ import { AuthScope } from '../../../../auth-verifier'
3
4
 
4
5
  export default function (server: Server, ctx: AppContext) {
5
6
  if (!ctx.cfg.bskyAppView) return
6
7
  server.app.bsky.actor.getPreferences({
7
- auth: ctx.authVerifier.accessStandard(),
8
+ auth: ctx.authVerifier.accessStandard({
9
+ additional: [AuthScope.Takendown],
10
+ }),
8
11
  handler: async ({ auth }) => {
9
12
  const requester = auth.credentials.did
10
13
  const preferences = await ctx.actorStore.read(requester, (store) =>
@@ -5,10 +5,11 @@ import { InvalidRequestError } from '@atproto/xrpc-server'
5
5
  import AppContext from '../../../../context'
6
6
  import { Server } from '../../../../lexicon'
7
7
  import { ids } from '../../../../lexicon/lexicons'
8
+ import { AuthScope } from '../../../../auth-verifier'
8
9
 
9
10
  export default function (server: Server, ctx: AppContext) {
10
11
  server.com.atproto.identity.requestPlcOperationSignature({
11
- auth: ctx.authVerifier.accessFull(),
12
+ auth: ctx.authVerifier.accessFull({ additional: [AuthScope.Takendown] }),
12
13
  handler: async ({ auth }) => {
13
14
  if (ctx.entrywayAgent) {
14
15
  assert(ctx.cfg.entryway)
@@ -2,6 +2,7 @@ import AppContext from '../../../context'
2
2
  import { Server } from '../../../lexicon'
3
3
  import admin from './admin'
4
4
  import identity from './identity'
5
+ import moderation from './moderation'
5
6
  import repo from './repo'
6
7
  import serverMethods from './server'
7
8
  import sync from './sync'
@@ -10,6 +11,7 @@ import temp from './temp'
10
11
  export default function (server: Server, ctx: AppContext) {
11
12
  admin(server, ctx)
12
13
  identity(server, ctx)
14
+ moderation(server, ctx)
13
15
  repo(server, ctx)
14
16
  serverMethods(server, ctx)
15
17
  sync(server, ctx)
@@ -0,0 +1,36 @@
1
+ import { Server } from '../../../../lexicon'
2
+ import AppContext from '../../../../context'
3
+ import { parseProxyInfo } from '../../../../pipethrough'
4
+ import { ids } from '../../../../lexicon/lexicons'
5
+ import { AtpAgent } from '@atproto/api'
6
+ import { AuthScope } from '../../../../auth-verifier'
7
+
8
+ export default function (server: Server, ctx: AppContext) {
9
+ server.com.atproto.moderation.createReport({
10
+ auth: ctx.authVerifier.accessStandard({
11
+ additional: [AuthScope.Takendown],
12
+ }),
13
+ handler: async ({ auth, input, req }) => {
14
+ const { url, did: aud } = await parseProxyInfo(
15
+ ctx,
16
+ req,
17
+ ids.ComAtprotoModerationCreateReport,
18
+ )
19
+ const agent = new AtpAgent({ service: url })
20
+ const serviceAuth = await ctx.serviceAuthHeaders(
21
+ auth.credentials.did,
22
+ aud,
23
+ ids.ComAtprotoModerationCreateReport,
24
+ )
25
+ const res = await agent.com.atproto.moderation.createReport(input.body, {
26
+ ...serviceAuth,
27
+ encoding: 'application/json',
28
+ })
29
+
30
+ return {
31
+ encoding: 'application/json',
32
+ body: res.data,
33
+ }
34
+ },
35
+ })
36
+ }
@@ -0,0 +1,7 @@
1
+ import AppContext from '../../../../context'
2
+ import { Server } from '../../../../lexicon'
3
+ import createReport from './createReport'
4
+
5
+ export default function (server: Server, ctx: AppContext) {
6
+ createReport(server, ctx)
7
+ }
@@ -1,5 +1,6 @@
1
1
  import { DAY, MINUTE } from '@atproto/common'
2
2
  import { INVALID_HANDLE } from '@atproto/syntax'
3
+ import { AuthRequiredError } from '@atproto/xrpc-server'
3
4
 
4
5
  import { formatAccountStatus } from '../../../../account-manager'
5
6
  import AppContext from '../../../../context'
@@ -31,10 +32,18 @@ export default function (server: Server, ctx: AppContext) {
31
32
  )
32
33
  }
33
34
 
34
- const { user, appPassword } = await ctx.accountManager.login(input.body)
35
+ const { user, isSoftDeleted, appPassword } =
36
+ await ctx.accountManager.login(input.body)
37
+
38
+ if (!input.body.allowTakendown && isSoftDeleted) {
39
+ throw new AuthRequiredError(
40
+ 'Account has been taken down',
41
+ 'AccountTakedown',
42
+ )
43
+ }
35
44
 
36
45
  const [{ accessJwt, refreshJwt }, didDoc] = await Promise.all([
37
- ctx.accountManager.createSession(user.did, appPassword),
46
+ ctx.accountManager.createSession(user.did, appPassword, isSoftDeleted),
38
47
  didDocForSession(ctx, user.did),
39
48
  ])
40
49
 
@@ -1,10 +1,11 @@
1
+ import { AuthScope } from '../../../../auth-verifier'
1
2
  import AppContext from '../../../../context'
2
3
  import { Server } from '../../../../lexicon'
3
4
  import { authPassthru } from '../../../proxy'
4
5
 
5
6
  export default function (server: Server, ctx: AppContext) {
6
7
  server.com.atproto.server.deactivateAccount({
7
- auth: ctx.authVerifier.accessFull(),
8
+ auth: ctx.authVerifier.accessFull({ additional: [AuthScope.Takendown] }),
8
9
  handler: async ({ req, auth, input }) => {
9
10
  // in the case of entryway, the full flow is deactivateAccount (PDS) -> deactivateAccount (Entryway) -> updateSubjectStatus(PDS)
10
11
  if (ctx.entrywayAgent) {
@@ -3,14 +3,27 @@ import { HOUR, MINUTE } from '@atproto/common'
3
3
  import AppContext from '../../../../context'
4
4
  import { Server } from '../../../../lexicon'
5
5
  import { PRIVILEGED_METHODS, PROTECTED_METHODS } from '../../../../pipethrough'
6
+ import { AuthScope } from '../../../../auth-verifier'
7
+ import { ids } from '../../../../lexicon/lexicons'
6
8
 
7
9
  export default function (server: Server, ctx: AppContext) {
8
10
  server.com.atproto.server.getServiceAuth({
9
- auth: ctx.authVerifier.accessStandard(),
11
+ auth: ctx.authVerifier.accessStandard({
12
+ additional: [AuthScope.Takendown],
13
+ }),
10
14
  handler: async ({ params, auth }) => {
11
15
  const did = auth.credentials.did
12
16
  const { aud, lxm = null } = params
13
17
  const exp = params.exp ? params.exp * 1000 : undefined
18
+
19
+ // Takendown accounts should not be able to generate service auth tokens except for methods necessary for account migration
20
+ if (
21
+ auth.credentials.scope === AuthScope.Takendown &&
22
+ lxm !== ids.ComAtprotoServerCreateAccount
23
+ ) {
24
+ throw new InvalidRequestError('Bad token scope', 'InvalidToken')
25
+ }
26
+
14
27
  if (exp) {
15
28
  const diff = exp - Date.now()
16
29
  if (diff < 0) {
@@ -5,7 +5,7 @@ import { assertRepoAvailability } from '../util'
5
5
 
6
6
  export default function (server: Server, ctx: AppContext) {
7
7
  server.com.atproto.sync.getCheckout({
8
- auth: ctx.authVerifier.optionalAccessOrAdminToken,
8
+ auth: ctx.authVerifier.optionalAccessOrAdminToken(),
9
9
  handler: async ({ params, auth }) => {
10
10
  const { did } = params
11
11
  await assertRepoAvailability(
@@ -5,7 +5,7 @@ import { assertRepoAvailability } from '../util'
5
5
 
6
6
  export default function (server: Server, ctx: AppContext) {
7
7
  server.com.atproto.sync.getHead({
8
- auth: ctx.authVerifier.optionalAccessOrAdminToken,
8
+ auth: ctx.authVerifier.optionalAccessOrAdminToken(),
9
9
  handler: async ({ params, auth }) => {
10
10
  const { did } = params
11
11
  await assertRepoAvailability(
@@ -4,10 +4,13 @@ import AppContext from '../../../../context'
4
4
  import { InvalidRequestError } from '@atproto/xrpc-server'
5
5
  import { BlobNotFoundError } from '@atproto/repo'
6
6
  import { assertRepoAvailability } from './util'
7
+ import { AuthScope } from '../../../../auth-verifier'
7
8
 
8
9
  export default function (server: Server, ctx: AppContext) {
9
10
  server.com.atproto.sync.getBlob({
10
- auth: ctx.authVerifier.optionalAccessOrAdminToken,
11
+ auth: ctx.authVerifier.optionalAccessOrAdminToken({
12
+ additional: [AuthScope.Takendown],
13
+ }),
11
14
  handler: async ({ params, res, auth }) => {
12
15
  const { did } = params
13
16
  await assertRepoAvailability(
@@ -8,7 +8,7 @@ import { assertRepoAvailability } from './util'
8
8
 
9
9
  export default function (server: Server, ctx: AppContext) {
10
10
  server.com.atproto.sync.getBlocks({
11
- auth: ctx.authVerifier.optionalAccessOrAdminToken,
11
+ auth: ctx.authVerifier.optionalAccessOrAdminToken(),
12
12
  handler: async ({ params, auth }) => {
13
13
  const { did } = params
14
14
  await assertRepoAvailability(
@@ -5,7 +5,7 @@ import { assertRepoAvailability } from './util'
5
5
 
6
6
  export default function (server: Server, ctx: AppContext) {
7
7
  server.com.atproto.sync.getLatestCommit({
8
- auth: ctx.authVerifier.optionalAccessOrAdminToken,
8
+ auth: ctx.authVerifier.optionalAccessOrAdminToken(),
9
9
  handler: async ({ params, auth }) => {
10
10
  const { did } = params
11
11
  await assertRepoAvailability(
@@ -10,7 +10,7 @@ import { assertRepoAvailability } from './util'
10
10
 
11
11
  export default function (server: Server, ctx: AppContext) {
12
12
  server.com.atproto.sync.getRecord({
13
- auth: ctx.authVerifier.optionalAccessOrAdminToken,
13
+ auth: ctx.authVerifier.optionalAccessOrAdminToken(),
14
14
  handler: async ({ params, auth }) => {
15
15
  const { did, collection, rkey } = params
16
16
  await assertRepoAvailability(
@@ -7,10 +7,13 @@ import {
7
7
  SqlRepoReader,
8
8
  } from '../../../../actor-store/repo/sql-repo-reader'
9
9
  import { assertRepoAvailability } from './util'
10
+ import { AuthScope } from '../../../../auth-verifier'
10
11
 
11
12
  export default function (server: Server, ctx: AppContext) {
12
13
  server.com.atproto.sync.getRepo({
13
- auth: ctx.authVerifier.optionalAccessOrAdminToken,
14
+ auth: ctx.authVerifier.optionalAccessOrAdminToken({
15
+ additional: [AuthScope.Takendown],
16
+ }),
14
17
  handler: async ({ params, auth }) => {
15
18
  const { did, since } = params
16
19
  await assertRepoAvailability(
@@ -1,10 +1,13 @@
1
1
  import { Server } from '../../../../lexicon'
2
2
  import AppContext from '../../../../context'
3
3
  import { assertRepoAvailability } from './util'
4
+ import { AuthScope } from '../../../../auth-verifier'
4
5
 
5
6
  export default function (server: Server, ctx: AppContext) {
6
7
  server.com.atproto.sync.listBlobs({
7
- auth: ctx.authVerifier.optionalAccessOrAdminToken,
8
+ auth: ctx.authVerifier.optionalAccessOrAdminToken({
9
+ additional: [AuthScope.Takendown],
10
+ }),
8
11
  handler: async ({ params, auth }) => {
9
12
  const { did, since, limit, cursor } = params
10
13
  await assertRepoAvailability(
@@ -32,6 +32,7 @@ export enum AuthScope {
32
32
  AppPass = 'com.atproto.appPass',
33
33
  AppPassPrivileged = 'com.atproto.appPassPrivileged',
34
34
  SignupQueued = 'com.atproto.signupQueued',
35
+ Takendown = 'com.atproto.takendown',
35
36
  }
36
37
 
37
38
  export type AccessOpts = {
@@ -209,17 +210,19 @@ export class AuthVerifier {
209
210
  return this.validateAdminToken(ctx)
210
211
  }
211
212
 
212
- optionalAccessOrAdminToken = async (
213
- ctx: ReqCtx,
214
- ): Promise<AccessOutput | AdminTokenOutput | NullOutput> => {
215
- if (isAccessToken(ctx.req)) {
216
- return await this.accessStandard()(ctx)
217
- } else if (isBasicToken(ctx.req)) {
218
- return await this.adminToken(ctx)
219
- } else {
220
- return this.null(ctx)
213
+ optionalAccessOrAdminToken =
214
+ (opts: Partial<AccessOpts> = {}) =>
215
+ async (
216
+ ctx: ReqCtx,
217
+ ): Promise<AccessOutput | AdminTokenOutput | NullOutput> => {
218
+ if (isAccessToken(ctx.req)) {
219
+ return await this.accessStandard(opts)(ctx)
220
+ } else if (isBasicToken(ctx.req)) {
221
+ return await this.adminToken(ctx)
222
+ } else {
223
+ return this.null(ctx)
224
+ }
221
225
  }
222
- }
223
226
 
224
227
  userServiceAuth = async (ctx: ReqCtx): Promise<UserServiceAuthOutput> => {
225
228
  const payload = await this.verifyServiceJwt(ctx, {
@@ -7,9 +7,26 @@ export const createRouter = (ctx: AppContext): express.Router => {
7
7
 
8
8
  router.get('/', function (req, res) {
9
9
  res.type('text/plain')
10
- res.send(
11
- 'This is an AT Protocol Personal Data Server (PDS): https://github.com/bluesky-social/atproto\n\nMost API routes are under /xrpc/',
12
- )
10
+ res.send(`
11
+ __ __
12
+ /\\ \\__ /\\ \\__
13
+ __ \\ \\ ,_\\ _____ _ __ ___\\ \\ ,_\\ ___
14
+ /'__'\\ \\ \\ \\/ /\\ '__'\\/\\''__\\/ __'\\ \\ \\/ / __'\\
15
+ /\\ \\L\\.\\_\\ \\ \\_\\ \\ \\L\\ \\ \\ \\//\\ \\L\\ \\ \\ \\_/\\ \\L\\ \\
16
+ \\ \\__/.\\_\\\\ \\__\\\\ \\ ,__/\\ \\_\\\\ \\____/\\ \\__\\ \\____/
17
+ \\/__/\\/_/ \\/__/ \\ \\ \\/ \\/_/ \\/___/ \\/__/\\/___/
18
+ \\ \\_\\
19
+ \\/_/
20
+
21
+
22
+ This is an AT Protocol Personal Data Server (aka, an atproto PDS)
23
+
24
+ Most API routes are under /xrpc/
25
+
26
+ Code: https://github.com/bluesky-social/atproto
27
+ Self-Host: https://github.com/bluesky-social/pds
28
+ Protocol: https://atproto.com
29
+ `)
13
30
  })
14
31
 
15
32
  router.get('/robots.txt', function (req, res) {
@@ -2638,13 +2638,13 @@ export class ToolsOzoneTeamNS {
2638
2638
 
2639
2639
  type SharedRateLimitOpts<T> = {
2640
2640
  name: string
2641
- calcKey?: (ctx: T) => string
2641
+ calcKey?: (ctx: T) => string | null
2642
2642
  calcPoints?: (ctx: T) => number
2643
2643
  }
2644
2644
  type RouteRateLimitOpts<T> = {
2645
2645
  durationMs: number
2646
2646
  points: number
2647
- calcKey?: (ctx: T) => string
2647
+ calcKey?: (ctx: T) => string | null
2648
2648
  calcPoints?: (ctx: T) => number
2649
2649
  }
2650
2650
  type HandlerOpts = { blobLimit?: number }