@atproto/pds 0.4.102 → 0.4.104

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 (163) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
  3. package/dist/api/com/atproto/admin/sendEmail.js +2 -7
  4. package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
  5. package/dist/api/com/atproto/admin/updateAccountEmail.d.ts.map +1 -1
  6. package/dist/api/com/atproto/admin/updateAccountEmail.js +1 -2
  7. package/dist/api/com/atproto/admin/updateAccountEmail.js.map +1 -1
  8. package/dist/api/com/atproto/admin/updateAccountPassword.d.ts.map +1 -1
  9. package/dist/api/com/atproto/admin/updateAccountPassword.js +1 -2
  10. package/dist/api/com/atproto/admin/updateAccountPassword.js.map +1 -1
  11. package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
  12. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js +2 -7
  13. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
  14. package/dist/api/com/atproto/identity/signPlcOperation.d.ts.map +1 -1
  15. package/dist/api/com/atproto/identity/signPlcOperation.js +2 -7
  16. package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
  17. package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
  18. package/dist/api/com/atproto/identity/updateHandle.js +2 -7
  19. package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
  20. package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
  21. package/dist/api/com/atproto/repo/applyWrites.js +12 -7
  22. package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
  23. package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
  24. package/dist/api/com/atproto/repo/createRecord.js +12 -8
  25. package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
  26. package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  27. package/dist/api/com/atproto/repo/deleteRecord.js +12 -7
  28. package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
  29. package/dist/api/com/atproto/repo/listRecords.d.ts.map +1 -1
  30. package/dist/api/com/atproto/repo/listRecords.js +1 -3
  31. package/dist/api/com/atproto/repo/listRecords.js.map +1 -1
  32. package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
  33. package/dist/api/com/atproto/repo/putRecord.js +11 -8
  34. package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
  35. package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
  36. package/dist/api/com/atproto/server/activateAccount.js +1 -2
  37. package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
  38. package/dist/api/com/atproto/server/confirmEmail.d.ts.map +1 -1
  39. package/dist/api/com/atproto/server/confirmEmail.js +2 -7
  40. package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
  41. package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
  42. package/dist/api/com/atproto/server/createAppPassword.js +2 -7
  43. package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
  44. package/dist/api/com/atproto/server/createSession.js +1 -1
  45. package/dist/api/com/atproto/server/createSession.js.map +1 -1
  46. package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
  47. package/dist/api/com/atproto/server/deactivateAccount.js +1 -2
  48. package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
  49. package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
  50. package/dist/api/com/atproto/server/deleteAccount.js +1 -2
  51. package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
  52. package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
  53. package/dist/api/com/atproto/server/deleteSession.js +2 -3
  54. package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
  55. package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts.map +1 -1
  56. package/dist/api/com/atproto/server/getAccountInviteCodes.js +2 -7
  57. package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
  58. package/dist/api/com/atproto/server/getSession.js +1 -1
  59. package/dist/api/com/atproto/server/getSession.js.map +1 -1
  60. package/dist/api/com/atproto/server/listAppPasswords.d.ts.map +1 -1
  61. package/dist/api/com/atproto/server/listAppPasswords.js +2 -7
  62. package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
  63. package/dist/api/com/atproto/server/refreshSession.js +1 -1
  64. package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
  65. package/dist/api/com/atproto/server/requestAccountDelete.d.ts.map +1 -1
  66. package/dist/api/com/atproto/server/requestAccountDelete.js +2 -7
  67. package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
  68. package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts.map +1 -1
  69. package/dist/api/com/atproto/server/requestEmailConfirmation.js +2 -7
  70. package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
  71. package/dist/api/com/atproto/server/requestEmailUpdate.d.ts.map +1 -1
  72. package/dist/api/com/atproto/server/requestEmailUpdate.js +2 -7
  73. package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
  74. package/dist/api/com/atproto/server/requestPasswordReset.d.ts.map +1 -1
  75. package/dist/api/com/atproto/server/requestPasswordReset.js +1 -2
  76. package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
  77. package/dist/api/com/atproto/server/resetPassword.d.ts.map +1 -1
  78. package/dist/api/com/atproto/server/resetPassword.js +1 -2
  79. package/dist/api/com/atproto/server/resetPassword.js.map +1 -1
  80. package/dist/api/com/atproto/server/revokeAppPassword.d.ts.map +1 -1
  81. package/dist/api/com/atproto/server/revokeAppPassword.js +2 -7
  82. package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
  83. package/dist/api/com/atproto/server/updateEmail.d.ts.map +1 -1
  84. package/dist/api/com/atproto/server/updateEmail.js +2 -7
  85. package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
  86. package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
  87. package/dist/api/com/atproto/sync/getRecord.js +1 -4
  88. package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
  89. package/dist/api/com/atproto/temp/checkSignupQueue.js +1 -1
  90. package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
  91. package/dist/api/proxy.d.ts +7 -8
  92. package/dist/api/proxy.d.ts.map +1 -1
  93. package/dist/api/proxy.js +14 -6
  94. package/dist/api/proxy.js.map +1 -1
  95. package/dist/context.d.ts +7 -0
  96. package/dist/context.d.ts.map +1 -1
  97. package/dist/context.js +12 -0
  98. package/dist/context.js.map +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/index.js.map +1 -1
  101. package/dist/lexicon/lexicons.d.ts +108 -28
  102. package/dist/lexicon/lexicons.d.ts.map +1 -1
  103. package/dist/lexicon/lexicons.js +54 -14
  104. package/dist/lexicon/lexicons.js.map +1 -1
  105. package/dist/lexicon/types/app/bsky/labeler/defs.d.ts +7 -0
  106. package/dist/lexicon/types/app/bsky/labeler/defs.d.ts.map +1 -1
  107. package/dist/lexicon/types/app/bsky/labeler/defs.js.map +1 -1
  108. package/dist/lexicon/types/app/bsky/labeler/service.d.ts +7 -0
  109. package/dist/lexicon/types/app/bsky/labeler/service.d.ts.map +1 -1
  110. package/dist/lexicon/types/app/bsky/labeler/service.js.map +1 -1
  111. package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +2 -0
  112. package/dist/lexicon/types/com/atproto/moderation/defs.d.ts.map +1 -1
  113. package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts +0 -4
  114. package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts.map +1 -1
  115. package/dist/lexicon/types/com/atproto/repo/listRecords.js.map +1 -1
  116. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +0 -2
  117. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
  118. package/dist/oauth/provider.d.ts +2 -2
  119. package/dist/oauth/provider.d.ts.map +1 -1
  120. package/dist/oauth/provider.js +2 -1
  121. package/dist/oauth/provider.js.map +1 -1
  122. package/package.json +5 -5
  123. package/src/api/com/atproto/admin/sendEmail.ts +3 -5
  124. package/src/api/com/atproto/admin/updateAccountEmail.ts +1 -2
  125. package/src/api/com/atproto/admin/updateAccountPassword.ts +1 -2
  126. package/src/api/com/atproto/identity/requestPlcOperationSignature.ts +3 -5
  127. package/src/api/com/atproto/identity/signPlcOperation.ts +3 -5
  128. package/src/api/com/atproto/identity/updateHandle.ts +3 -6
  129. package/src/api/com/atproto/repo/applyWrites.ts +21 -11
  130. package/src/api/com/atproto/repo/createRecord.ts +19 -14
  131. package/src/api/com/atproto/repo/deleteRecord.ts +26 -14
  132. package/src/api/com/atproto/repo/listRecords.ts +1 -11
  133. package/src/api/com/atproto/repo/putRecord.ts +24 -16
  134. package/src/api/com/atproto/server/activateAccount.ts +1 -2
  135. package/src/api/com/atproto/server/confirmEmail.ts +3 -5
  136. package/src/api/com/atproto/server/createAppPassword.ts +3 -6
  137. package/src/api/com/atproto/server/createSession.ts +2 -2
  138. package/src/api/com/atproto/server/deactivateAccount.ts +1 -2
  139. package/src/api/com/atproto/server/deleteAccount.ts +1 -2
  140. package/src/api/com/atproto/server/deleteSession.ts +2 -3
  141. package/src/api/com/atproto/server/getAccountInviteCodes.ts +3 -5
  142. package/src/api/com/atproto/server/getSession.ts +2 -2
  143. package/src/api/com/atproto/server/listAppPasswords.ts +3 -5
  144. package/src/api/com/atproto/server/refreshSession.ts +2 -2
  145. package/src/api/com/atproto/server/requestAccountDelete.ts +3 -5
  146. package/src/api/com/atproto/server/requestEmailConfirmation.ts +3 -5
  147. package/src/api/com/atproto/server/requestEmailUpdate.ts +3 -5
  148. package/src/api/com/atproto/server/requestPasswordReset.ts +1 -2
  149. package/src/api/com/atproto/server/resetPassword.ts +1 -2
  150. package/src/api/com/atproto/server/revokeAppPassword.ts +3 -5
  151. package/src/api/com/atproto/server/updateEmail.ts +3 -5
  152. package/src/api/com/atproto/sync/getRecord.ts +1 -3
  153. package/src/api/com/atproto/temp/checkSignupQueue.ts +2 -2
  154. package/src/api/proxy.ts +19 -19
  155. package/src/context.ts +19 -0
  156. package/src/index.ts +1 -1
  157. package/src/lexicon/lexicons.ts +60 -17
  158. package/src/lexicon/types/app/bsky/labeler/defs.ts +7 -0
  159. package/src/lexicon/types/app/bsky/labeler/service.ts +7 -0
  160. package/src/lexicon/types/com/atproto/moderation/defs.ts +3 -0
  161. package/src/lexicon/types/com/atproto/repo/listRecords.ts +0 -4
  162. package/src/lexicon/types/com/atproto/sync/getRecord.ts +0 -2
  163. package/src/oauth/provider.ts +3 -1
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.default = default_1;
7
- const node_assert_1 = __importDefault(require("node:assert"));
8
4
  const lexicons_1 = require("../../../../lexicon/lexicons");
9
5
  function default_1(server, ctx) {
10
6
  server.com.atproto.server.revokeAppPassword({
11
7
  auth: ctx.authVerifier.accessStandard(),
12
- handler: async ({ auth, input }) => {
8
+ handler: async ({ auth, input, req }) => {
13
9
  if (ctx.entrywayAgent) {
14
- (0, node_assert_1.default)(ctx.cfg.entryway);
15
- await ctx.entrywayAgent.com.atproto.server.revokeAppPassword(input.body, await ctx.serviceAuthHeaders(auth.credentials.did, ctx.cfg.entryway.did, lexicons_1.ids.ComAtprotoServerRevokeAppPassword));
10
+ await ctx.entrywayAgent.com.atproto.server.revokeAppPassword(input.body, await ctx.entrywayAuthHeaders(req, auth.credentials.did, lexicons_1.ids.ComAtprotoServerRevokeAppPassword));
16
11
  return;
17
12
  }
18
13
  const requester = auth.credentials.did;
@@ -1 +1 @@
1
- {"version":3,"file":"revokeAppPassword.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/revokeAppPassword.ts"],"names":[],"mappings":";;;;;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AE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACtC,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;gBACtB,MAAM,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAC1D,KAAK,CAAC,IAAI,EACV,MAAM,GAAG,CAAC,mBAAmB,CAC3B,GAAG,EACH,IAAI,CAAC,WAAW,CAAC,GAAG,EACpB,cAAG,CAAC,iCAAiC,CACtC,CACF,CAAA;gBACD,OAAM;YACR,CAAC;YAED,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAA;YACtC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAE3B,MAAM,GAAG,CAAC,cAAc,CAAC,iBAAiB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;QAC7D,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateEmail.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/updateEmail.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAG5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2DvD"}
1
+ {"version":3,"file":"updateEmail.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/updateEmail.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAG5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0DvD"}
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.default = default_1;
7
- const node_assert_1 = __importDefault(require("node:assert"));
8
4
  const address_1 = require("@hapi/address");
9
5
  const disposable_email_domains_js_1 = require("disposable-email-domains-js");
10
6
  const xrpc_server_1 = require("@atproto/xrpc-server");
@@ -13,7 +9,7 @@ const lexicons_1 = require("../../../../lexicon/lexicons");
13
9
  function default_1(server, ctx) {
14
10
  server.com.atproto.server.updateEmail({
15
11
  auth: ctx.authVerifier.accessFull({ checkTakedown: true }),
16
- handler: async ({ auth, input }) => {
12
+ handler: async ({ auth, input, req }) => {
17
13
  const did = auth.credentials.did;
18
14
  const { token, email } = input.body;
19
15
  if (!(0, address_1.isEmailValid)(email) || (0, disposable_email_domains_js_1.isDisposableEmail)(email)) {
@@ -26,8 +22,7 @@ function default_1(server, ctx) {
26
22
  throw new xrpc_server_1.InvalidRequestError('account not found');
27
23
  }
28
24
  if (ctx.entrywayAgent) {
29
- (0, node_assert_1.default)(ctx.cfg.entryway);
30
- await ctx.entrywayAgent.com.atproto.server.updateEmail(input.body, await ctx.serviceAuthHeaders(auth.credentials.did, ctx.cfg.entryway.did, lexicons_1.ids.ComAtprotoServerUpdateEmail));
25
+ await ctx.entrywayAgent.com.atproto.server.updateEmail(input.body, await ctx.entrywayAuthHeaders(req, auth.credentials.did, lexicons_1.ids.ComAtprotoServerUpdateEmail));
31
26
  return;
32
27
  }
33
28
  // require valid token if account email is confirmed
@@ -1 +1 @@
1
- {"version":3,"file":"updateEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/updateEmail.ts"],"names":[],"mappings":";;;;;AASA,4BA2DC;AApED,8DAAgC;AAChC,2CAA4C;AAC5C,6EAA+D;AAC/D,sDAA0D;AAC1D,yEAAoF;AAGpF,2DAAkD;AAElD,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM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6BAA6B,EAC7B,eAAe,CAChB,CAAA;gBACH,CAAC;gBACD,MAAM,GAAG,CAAC,cAAc,CAAC,qBAAqB,CAC5C,GAAG,EACH,cAAc,EACd,KAAK,CACN,CAAA;YACH,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAA;YACtD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,GAAG,YAAY,gCAAsB,EAAE,CAAC;oBAC1C,MAAM,IAAI,iCAAmB,CAC3B,qEAAqE,CACtE,CAAA;gBACH,CAAC;qBAAM,CAAC;oBACN,MAAM,GAAG,CAAA;gBACX,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"updateEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/updateEmail.ts"],"names":[],"mappings":";;AAQA,4BA0DC;AAlED,2CAA4C;AAC5C,6EAA+D;AAC/D,sDAA0D;AAC1D,yEAAoF;AAGpF,2DAAkD;AAElD,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC;QACpC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;QAC1D,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACtC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAA;YAChC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YACnC,IAAI,CAAC,IAAA,sBAAY,EAAC,KAAK,CAAC,IAAI,IAAA,+CAAiB,EAAC,KAAK,CAAC,EAAE,CAAC;gBACrD,MAAM,IAAI,iCAAmB,CAC3B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Root":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAG5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAwCvD"}
1
+ {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAG5C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsCvD"}
@@ -24,7 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.default = default_1;
27
- const cid_1 = require("multiformats/cid");
28
27
  const common_1 = require("@atproto/common");
29
28
  const repo = __importStar(require("@atproto/repo"));
30
29
  const xrpc_server_1 = require("@atproto/xrpc-server");
@@ -41,9 +40,7 @@ function default_1(server, ctx) {
41
40
  let carStream;
42
41
  try {
43
42
  const storage = new sql_repo_reader_1.SqlRepoReader(actorDb);
44
- const commit = params.commit
45
- ? cid_1.CID.parse(params.commit)
46
- : await storage.getRoot();
43
+ const commit = await storage.getRoot();
47
44
  if (!commit) {
48
45
  throw new xrpc_server_1.InvalidRequestError(`Could not find repo for DID: ${did}`);
49
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getRecord.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAUA,4BAwCC;AAjDD,0CAAsC;AACtC,4CAAsD;AACtD,oDAAqC;AACrC,sDAA0D;AAC1D,kFAA4E;AAG5E,iC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MAAM,EAAE,CAAC;oBACZ,MAAM,IAAI,iCAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAA;gBACtE,CAAC;gBACD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;gBACxE,SAAS,GAAG,IAAA,6BAAoB,EAAC,OAAO,CAAC,CAAA;YAC3C,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,EAAE,CAAA;gBACf,MAAM,GAAG,CAAA;YACX,CAAC;YACD,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;YACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YAC9B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YAE9B,OAAO;gBACL,QAAQ,EAAE,0BAA0B;gBACpC,IAAI,EAAE,SAAS;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
@@ -18,7 +18,7 @@ function default_1(server, ctx) {
18
18
  },
19
19
  };
20
20
  }
21
- return (0, proxy_1.resultPassthru)(await ctx.entrywayAgent.com.atproto.temp.checkSignupQueue(undefined, (0, proxy_1.authPassthru)(req)));
21
+ return (0, proxy_1.resultPassthru)(await ctx.entrywayAgent.com.atproto.temp.checkSignupQueue(undefined, ctx.entrywayPassthruHeaders(req)));
22
22
  },
23
23
  });
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"checkSignupQueue.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/checkSignupQueue.ts"],"names":[],"mappings":";;AAMA,4BAsBC;AA5BD,6DAAqD;AAGrD,0CAA6D;AAE7D,sCAAsC;AACtC,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC;QACvC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,cAAc,CAAC;YACpC,UAAU,EAAE,CAAC,yBAAS,CAAC,YAAY,CAAC;SACrC,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACzB,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;gBACvB,OAAO;oBACL,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE;wBACJ,SAAS,EAAE,IAAI;qBAChB;iBACF,CAAA;YACH,CAAC;YACD,OAAO,IAAA,sBAAc,EACnB,MAAM,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CACvD,SAAS,EACT,IAAA,oBAAY,EAAC,GAAG,CAAC,CAClB,CACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"checkSignupQueue.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/checkSignupQueue.ts"],"names":[],"mappings":";;AAMA,4BAsBC;AA5BD,6DAAqD;AAGrD,0CAA+C;AAE/C,sCAAsC;AACtC,mBAAyB,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC;QACvC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,cAAc,CAAC;YACpC,UAAU,EAAE,CAAC,yBAAS,CAAC,YAAY,CAAC;SACrC,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACzB,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;gBACvB,OAAO;oBACL,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE;wBACJ,SAAS,EAAE,IAAI;qBAChB;iBACF,CAAA;YACH,CAAC;YACD,OAAO,IAAA,sBAAc,EACnB,MAAM,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CACvD,SAAS,EACT,GAAG,CAAC,uBAAuB,CAAC,GAAG,CAAC,CACjC,CACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { IncomingMessage } from 'node:http';
2
+ import express from 'express';
2
3
  import { Headers } from '@atproto/xrpc';
3
4
  export declare const resultPassthru: <T>(result: {
4
5
  headers: Headers;
@@ -7,16 +8,14 @@ export declare const resultPassthru: <T>(result: {
7
8
  encoding: "application/json";
8
9
  body: T;
9
10
  };
10
- export declare function authPassthru(req: IncomingMessage, withEncoding?: false): {
11
+ export declare function authPassthru(req: IncomingMessage): {
11
12
  headers: {
12
13
  authorization: string;
13
14
  };
14
- encoding: undefined;
15
- } | undefined;
16
- export declare function authPassthru(req: IncomingMessage, withEncoding: true): {
17
- headers: {
18
- authorization: string;
19
- };
20
- encoding: 'application/json';
21
15
  } | undefined;
16
+ export declare const forwardedFor: (req: express.Request, params: HeadersParam | undefined) => HeadersParam;
17
+ type HeadersParam = {
18
+ headers: Record<string, string>;
19
+ };
20
+ export {};
22
21
  //# sourceMappingURL=proxy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/api/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,eAAO,MAAM,cAAc,GAAI,CAAC,UAAU;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE;;;CAMtE,CAAA;AAID,wBAAgB,YAAY,CAC1B,GAAG,EAAE,eAAe,EACpB,YAAY,CAAC,EAAE,KAAK,GACnB;IAAE,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAAA;AAE1E,wBAAgB,YAAY,CAC1B,GAAG,EAAE,eAAe,EACpB,YAAY,EAAE,IAAI,GAEhB;IAAE,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,EAAE,kBAAkB,CAAA;CAAE,GACpE,SAAS,CAAA"}
1
+ {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/api/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,eAAO,MAAM,cAAc,GAAI,CAAC,UAAU;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE;;;CAMtE,CAAA;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,eAAe;;;;cAuBhD;AAID,eAAO,MAAM,YAAY,QAClB,OAAO,CAAC,OAAO,UACZ,YAAY,GAAG,SAAS,iBAQjC,CAAA;AAED,KAAK,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAA"}
package/dist/api/proxy.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resultPassthru = void 0;
3
+ exports.forwardedFor = exports.resultPassthru = void 0;
4
4
  exports.authPassthru = authPassthru;
5
5
  const xrpc_server_1 = require("@atproto/xrpc-server");
6
6
  const resultPassthru = (result) => {
@@ -11,7 +11,7 @@ const resultPassthru = (result) => {
11
11
  };
12
12
  };
13
13
  exports.resultPassthru = resultPassthru;
14
- function authPassthru(req, withEncoding) {
14
+ function authPassthru(req) {
15
15
  const { authorization } = req.headers;
16
16
  if (authorization) {
17
17
  // DPoP requests are bound to the endpoint being called. Allowing them to be
@@ -29,10 +29,18 @@ function authPassthru(req, withEncoding) {
29
29
  if (type.toLowerCase() === 'dpop' || req.headers['dpop']) {
30
30
  throw new xrpc_server_1.InvalidRequestError('DPoP requests cannot be proxied');
31
31
  }
32
- return {
33
- headers: { authorization },
34
- encoding: withEncoding ? 'application/json' : undefined,
35
- };
32
+ return { headers: { authorization } };
36
33
  }
37
34
  }
35
+ // @NOTE this function may mutate its params input
36
+ // future improvement here would be to forward along all untrusted ips rather than just the first (req.ip)
37
+ const forwardedFor = (req, params) => {
38
+ const result = params ?? { headers: {} };
39
+ const ip = req.ip;
40
+ if (ip) {
41
+ result.headers['x-forwarded-for'] = ip;
42
+ }
43
+ return result;
44
+ };
45
+ exports.forwardedFor = forwardedFor;
38
46
  //# sourceMappingURL=proxy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/api/proxy.ts"],"names":[],"mappings":";;;AA0BA,oCA0BC;AAlDD,sDAA0D;AAEnD,MAAM,cAAc,GAAG,CAAI,MAAqC,EAAE,EAAE;IACzE,sEAAsE;IACtE,OAAO;QACL,QAAQ,EAAE,kBAA2B;QACrC,IAAI,EAAE,MAAM,CAAC,IAAI;KAClB,CAAA;AACH,CAAC,CAAA;AANY,QAAA,cAAc,kBAM1B;AAgBD,SAAgB,YAAY,CAAC,GAAoB,EAAE,YAAsB;IACvE,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC,OAAO,CAAA;IAErC,IAAI,aAAa,EAAE,CAAC;QAClB,4EAA4E;QAC5E,qEAAqE;QACrE,oEAAoE;QACpE,qEAAqE;QACrE,qBAAqB;QAErB,wEAAwE;QACxE,2EAA2E;QAC3E,0BAA0B;QAC1B,MAAM,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,iCAAmB,CAAC,8BAA8B,CAAC,CAAA;QAC/D,CAAC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,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,EAAE,CAAA;IACvC,CAAC;AACH,CAAC;AAED,kDAAkD;AAClD,0GAA0G;AACnG,MAAM,YAAY,GAAG,CAC1B,GAAoB,EACpB,MAAgC,EAChC,EAAE;IACF,MAAM,MAAM,GAAiB,MAAM,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;IACtD,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAA;IACjB,IAAI,EAAE,EAAE,CAAC;QACP,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAA;IACxC,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAVY,QAAA,YAAY,gBAUxB"}
package/dist/context.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as plc from '@did-plc/lib';
2
+ import express from 'express';
2
3
  import { Redis } from 'ioredis';
3
4
  import * as undici from 'undici';
4
5
  import { AtpAgent } from '@atproto/api';
@@ -78,6 +79,12 @@ export declare class AppContext {
78
79
  authorization: string;
79
80
  };
80
81
  }>;
82
+ entrywayAuthHeaders(req: express.Request, did: string, lxm: string): Promise<{
83
+ headers: Record<string, string>;
84
+ }>;
85
+ entrywayPassthruHeaders(req: express.Request): {
86
+ headers: Record<string, string>;
87
+ };
81
88
  serviceAuthHeaders(did: string, aud: string, lxm: string): Promise<{
82
89
  headers: {
83
90
  authorization: string;
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,C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,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACrC,OAAO,CAAC,UAAU,CAAC;IAwQhB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;;;IAK3C,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;IAUxE,uBAAuB,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO;;;IAItC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;;;IAUxD,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CAS3D"}
package/dist/context.js CHANGED
@@ -40,6 +40,7 @@ const xrpc_server_1 = require("@atproto/xrpc-server");
40
40
  const fetch_node_1 = require("@atproto-labs/fetch-node");
41
41
  const account_manager_1 = require("./account-manager");
42
42
  const actor_store_1 = require("./actor-store/actor-store");
43
+ const proxy_1 = require("./api/proxy");
43
44
  const auth_verifier_1 = require("./auth-verifier");
44
45
  const background_1 = require("./background");
45
46
  const bsky_app_view_1 = require("./bsky-app-view");
@@ -369,6 +370,9 @@ class AppContext {
369
370
  dpopSecret: secrets.dpopSecret,
370
371
  customization: cfg.oauth.provider.customization,
371
372
  safeFetch,
373
+ // @TODO: Make this configurable. The legacy implementation used to
374
+ // blindly trust the X-Forwarded-For header.
375
+ trustProxy: (_addr, _i) => true,
372
376
  })
373
377
  : undefined;
374
378
  const oauthVerifier = authProvider ?? // OAuthProvider extends OAuthVerifier
@@ -420,6 +424,14 @@ class AppContext {
420
424
  (0, node_assert_1.default)(this.bskyAppView);
421
425
  return this.serviceAuthHeaders(did, this.bskyAppView.did, lxm);
422
426
  }
427
+ async entrywayAuthHeaders(req, did, lxm) {
428
+ (0, node_assert_1.default)(this.cfg.entryway);
429
+ const headers = await this.serviceAuthHeaders(did, this.cfg.entryway.did, lxm);
430
+ return (0, proxy_1.forwardedFor)(req, headers);
431
+ }
432
+ entrywayPassthruHeaders(req) {
433
+ return (0, proxy_1.forwardedFor)(req, (0, proxy_1.authPassthru)(req));
434
+ }
423
435
  async serviceAuthHeaders(did, aud, lxm) {
424
436
  const keypair = await this.actorStore.keypair(did);
425
437
  return (0, xrpc_server_1.createServiceAuthHeaders)({
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAgC;AAChC,kDAAmC;AAEnC,uDAAwC;AACxC,+CAAgC;AAChC,sCAAuC;AACvC,sCAAsD;AACtD,wDAAyC;AACzC,gDAA8C;AAC9C,4DAAgE;AAEhE,sDAM6B;AAC7B,yDAMiC;AACjC,uDAAkD;AAClD,2DAAsD;AACtD,mDAIwB;AACxB,6CAA8C;AAC9C,mDAA6C;AAE7C,yCAAqC;AACrC,2CAA4C;AAC5C,qDAAgD;AAChD,iEAA2D;AAC3D,qCAAsC;AACtC,qCAAuC;AACvC,oDAAsD;AACtD,+CAAmD;AACnD,sDAA2E;AAC3E,mCAAwC;AACxC,2CAAuC;AA6BvC,MAAa,UAAU;IA0BrB,YAAY,IAAuB;QAzB5B;;;;;WAAsB;QACtB;;;;;WAAqC;QACrC;;;;;WAA+B;QAC/B;;;;;WAAoB;QACpB;;;;;WAAkC;QAClC;;;;;WAAwB;QACxB;;;;;WAAsB;QACtB;;;;;WAAqB;QACrB;;;;;WAA8B;QAC9B;;;;;WAAoB;QACpB;;;;;WAAgC;QAChC;;;;;WAAoB;QACpB;;;;;WAAqC;QACrC;;;;;WAAkB;QAClB;;;;;WAAyB;QACzB;;;;;WAAqC;QACrC;;;;;WAAoC;QACpC;;;;;WAAmC;QACnC;;;;;WAA6B;QAC7B;;;;;WAAgB;QAChB;;;;;WAA0B;QAC1B;;;;;WAA+B;QAC/B;;;;;WAA8B;QAC9B;;;;;W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)(xrpcOpts);
163
163
  server = (0, api_1.default)(server, ctx);
164
164
  const app = (0, express_1.default)();
165
- app.set('trust proxy', true);
165
+ app.set('trust proxy', ['loopback', 'linklocal', 'uniquelocal']);
166
166
  app.use(logger_1.loggerMiddleware);
167
167
  app.use((0, compression_1.default)());
168
168
  app.use(authRoutes.createRouter(ctx)); // Before CORS
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,sDAAsD;AACtD,mDAAmD;AACnD,+CAA+C;AAC/C,gCAA6B;AAE7B,8DAAgC;AAEhC,sCAA6C;AAC7C,gDAAuB;AACvB,sDAA6B;AAC7B,qDAAsE;AACtE,4CAA2D;AAC3D,sDAI6B;AAC7B,gDAAuB;AACvB,0DAA2C;AAC3C,4DAA6C;AAE7C,uCAAyD;AACzD,+CAAgC;AAChC,uCAAwC;AACxC,qCAA2C;AAC3C,+CAA4C;AAC5C,qEAA4C;AAC5C,wDAAyC;AAEzC,2CAAwB;AACxB,2BAA+B;AAAtB,8FAAA,QAAQ,OAAA;AACjB,mDAAgD;AAAvC,+GAAA,aAAa,OAAA;AACtB,qCAAsC;AAA7B,qGAAA,UAAU,OAAA;AACnB,mCAAqC;AAA5B,oGAAA,UAAU,OAAA;AACnB,iDAAuD;AAA9C,sHAAA,qBAAqB,OAAA;AAE9B,qCAA+D;AAAtD,8GAAA,YAAY,OAAuB;AAC5C,yDAAwC;AAExC,8DAA6C;AAC7C,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAEhB,MAAa,GAAG;IAQd,YAAY,IAAmD;QAPxD;;;;;WAAe;QACf;;;;;WAAwB;QACxB;;;;;WAAoB;QACnB;;;;;WAA2B;QAC3B;;;;;WAAgC;QAChC;;;;;WAAuC;QAG7C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;QACnB,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AA;QACzD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,CAAC,gBAAgB,GAAG,KAAK,CAAA;QACpC,IAAI,CAAC,UAAU,GAAG,IAAA,sCAAoB,EAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAClD,MAAM,qBAAM,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;QACtC,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAA;QAClC,MAAM,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,CAAA;QAClC,MAAM,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,EAAE,CAAA;QACxC,MAAM,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAA;QACrC,MAAM,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,CAAA;QACnC,MAAM,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,CAAA;QACnC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QACnC,aAAa,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IAC5C,CAAC;CACF;AArHD,kBAqHC;AAED,kBAAe,GAAG,CAAA"}
@@ -1182,6 +1182,11 @@ export declare const schemaDict: {
1182
1182
  readonly type: "token";
1183
1183
  readonly description: "Appeal: appeal a previously taken moderation action";
1184
1184
  };
1185
+ readonly subjectType: {
1186
+ readonly type: "string";
1187
+ readonly description: "Tag describing a type of subject that might be reported.";
1188
+ readonly knownValues: ["account", "record", "chat"];
1189
+ };
1185
1190
  };
1186
1191
  };
1187
1192
  readonly ComAtprotoRepoApplyWrites: {
@@ -1714,14 +1719,6 @@ export declare const schemaDict: {
1714
1719
  readonly cursor: {
1715
1720
  readonly type: "string";
1716
1721
  };
1717
- readonly rkeyStart: {
1718
- readonly type: "string";
1719
- readonly description: "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)";
1720
- };
1721
- readonly rkeyEnd: {
1722
- readonly type: "string";
1723
- readonly description: "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)";
1724
- };
1725
1722
  readonly reverse: {
1726
1723
  readonly type: "boolean";
1727
1724
  readonly description: "Flag to reverse the order of the returned records.";
@@ -3141,11 +3138,6 @@ export declare const schemaDict: {
3141
3138
  readonly description: "Record Key";
3142
3139
  readonly format: "record-key";
3143
3140
  };
3144
- readonly commit: {
3145
- readonly type: "string";
3146
- readonly format: "cid";
3147
- readonly description: "DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit";
3148
- };
3149
3141
  };
3150
3142
  };
3151
3143
  readonly output: {
@@ -3451,7 +3443,7 @@ export declare const schemaDict: {
3451
3443
  readonly defs: {
3452
3444
  readonly main: {
3453
3445
  readonly type: "procedure";
3454
- readonly description: "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.";
3446
+ readonly description: "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl";
3455
3447
  readonly input: {
3456
3448
  readonly encoding: "application/json";
3457
3449
  readonly schema: {
@@ -8415,6 +8407,30 @@ export declare const schemaDict: {
8415
8407
  readonly ref: "lex:com.atproto.label.defs#label";
8416
8408
  };
8417
8409
  };
8410
+ readonly reasonTypes: {
8411
+ readonly description: "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.";
8412
+ readonly type: "array";
8413
+ readonly items: {
8414
+ readonly type: "ref";
8415
+ readonly ref: "lex:com.atproto.moderation.defs#reasonType";
8416
+ };
8417
+ };
8418
+ readonly subjectTypes: {
8419
+ readonly description: "The set of subject types (account, record, etc) this service accepts reports on.";
8420
+ readonly type: "array";
8421
+ readonly items: {
8422
+ readonly type: "ref";
8423
+ readonly ref: "lex:com.atproto.moderation.defs#subjectType";
8424
+ };
8425
+ };
8426
+ readonly subjectCollections: {
8427
+ readonly type: "array";
8428
+ readonly description: "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.";
8429
+ readonly items: {
8430
+ readonly type: "string";
8431
+ readonly format: "nsid";
8432
+ };
8433
+ };
8418
8434
  };
8419
8435
  };
8420
8436
  readonly labelerViewerState: {
@@ -8517,6 +8533,30 @@ export declare const schemaDict: {
8517
8533
  readonly type: "string";
8518
8534
  readonly format: "datetime";
8519
8535
  };
8536
+ readonly reasonTypes: {
8537
+ readonly description: "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.";
8538
+ readonly type: "array";
8539
+ readonly items: {
8540
+ readonly type: "ref";
8541
+ readonly ref: "lex:com.atproto.moderation.defs#reasonType";
8542
+ };
8543
+ };
8544
+ readonly subjectTypes: {
8545
+ readonly description: "The set of subject types (account, record, etc) this service accepts reports on.";
8546
+ readonly type: "array";
8547
+ readonly items: {
8548
+ readonly type: "ref";
8549
+ readonly ref: "lex:com.atproto.moderation.defs#subjectType";
8550
+ };
8551
+ };
8552
+ readonly subjectCollections: {
8553
+ readonly type: "array";
8554
+ readonly description: "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.";
8555
+ readonly items: {
8556
+ readonly type: "string";
8557
+ readonly format: "nsid";
8558
+ };
8559
+ };
8520
8560
  };
8521
8561
  };
8522
8562
  };
@@ -14406,6 +14446,11 @@ export declare const schemas: ({
14406
14446
  readonly type: "token";
14407
14447
  readonly description: "Appeal: appeal a previously taken moderation action";
14408
14448
  };
14449
+ readonly subjectType: {
14450
+ readonly type: "string";
14451
+ readonly description: "Tag describing a type of subject that might be reported.";
14452
+ readonly knownValues: ["account", "record", "chat"];
14453
+ };
14409
14454
  };
14410
14455
  } | {
14411
14456
  readonly lexicon: 1;
@@ -14929,14 +14974,6 @@ export declare const schemas: ({
14929
14974
  readonly cursor: {
14930
14975
  readonly type: "string";
14931
14976
  };
14932
- readonly rkeyStart: {
14933
- readonly type: "string";
14934
- readonly description: "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)";
14935
- };
14936
- readonly rkeyEnd: {
14937
- readonly type: "string";
14938
- readonly description: "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)";
14939
- };
14940
14977
  readonly reverse: {
14941
14978
  readonly type: "boolean";
14942
14979
  readonly description: "Flag to reverse the order of the returned records.";
@@ -16321,11 +16358,6 @@ export declare const schemas: ({
16321
16358
  readonly description: "Record Key";
16322
16359
  readonly format: "record-key";
16323
16360
  };
16324
- readonly commit: {
16325
- readonly type: "string";
16326
- readonly format: "cid";
16327
- readonly description: "DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit";
16328
- };
16329
16361
  };
16330
16362
  };
16331
16363
  readonly output: {
@@ -16625,7 +16657,7 @@ export declare const schemas: ({
16625
16657
  readonly defs: {
16626
16658
  readonly main: {
16627
16659
  readonly type: "procedure";
16628
- readonly description: "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.";
16660
+ readonly description: "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl";
16629
16661
  readonly input: {
16630
16662
  readonly encoding: "application/json";
16631
16663
  readonly schema: {
@@ -21514,6 +21546,30 @@ export declare const schemas: ({
21514
21546
  readonly ref: "lex:com.atproto.label.defs#label";
21515
21547
  };
21516
21548
  };
21549
+ readonly reasonTypes: {
21550
+ readonly description: "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.";
21551
+ readonly type: "array";
21552
+ readonly items: {
21553
+ readonly type: "ref";
21554
+ readonly ref: "lex:com.atproto.moderation.defs#reasonType";
21555
+ };
21556
+ };
21557
+ readonly subjectTypes: {
21558
+ readonly description: "The set of subject types (account, record, etc) this service accepts reports on.";
21559
+ readonly type: "array";
21560
+ readonly items: {
21561
+ readonly type: "ref";
21562
+ readonly ref: "lex:com.atproto.moderation.defs#subjectType";
21563
+ };
21564
+ };
21565
+ readonly subjectCollections: {
21566
+ readonly type: "array";
21567
+ readonly description: "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.";
21568
+ readonly items: {
21569
+ readonly type: "string";
21570
+ readonly format: "nsid";
21571
+ };
21572
+ };
21517
21573
  };
21518
21574
  };
21519
21575
  readonly labelerViewerState: {
@@ -21614,6 +21670,30 @@ export declare const schemas: ({
21614
21670
  readonly type: "string";
21615
21671
  readonly format: "datetime";
21616
21672
  };
21673
+ readonly reasonTypes: {
21674
+ readonly description: "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.";
21675
+ readonly type: "array";
21676
+ readonly items: {
21677
+ readonly type: "ref";
21678
+ readonly ref: "lex:com.atproto.moderation.defs#reasonType";
21679
+ };
21680
+ };
21681
+ readonly subjectTypes: {
21682
+ readonly description: "The set of subject types (account, record, etc) this service accepts reports on.";
21683
+ readonly type: "array";
21684
+ readonly items: {
21685
+ readonly type: "ref";
21686
+ readonly ref: "lex:com.atproto.moderation.defs#subjectType";
21687
+ };
21688
+ };
21689
+ readonly subjectCollections: {
21690
+ readonly type: "array";
21691
+ readonly description: "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.";
21692
+ readonly items: {
21693
+ readonly type: "string";
21694
+ readonly format: "nsid";
21695
+ };
21696
+ };
21617
21697
  };
21618
21698
  };
21619
21699
  };