@atproto/pds 0.4.103 → 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.
- package/CHANGELOG.md +13 -0
- package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.js +2 -7
- package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountEmail.js +1 -2
- package/dist/api/com/atproto/admin/updateAccountEmail.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountPassword.js +1 -2
- package/dist/api/com/atproto/admin/updateAccountPassword.js.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.js +2 -7
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.js +2 -7
- package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.js +2 -7
- package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.js +12 -7
- package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.js +12 -8
- package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.js +12 -7
- package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/listRecords.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/listRecords.js +1 -3
- package/dist/api/com/atproto/repo/listRecords.js.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.js +11 -8
- package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.js +1 -2
- package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.js +2 -7
- package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.js +2 -7
- package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/createSession.js +1 -1
- package/dist/api/com/atproto/server/createSession.js.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.js +1 -2
- package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.js +1 -2
- package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.js +2 -3
- package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.js +2 -7
- package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/server/getSession.js +1 -1
- package/dist/api/com/atproto/server/getSession.js.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.d.ts.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.js +2 -7
- package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.js +1 -1
- package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.js +2 -7
- package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.js +2 -7
- package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.js +2 -7
- package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.js +1 -2
- package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
- package/dist/api/com/atproto/server/resetPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/resetPassword.js +1 -2
- package/dist/api/com/atproto/server/resetPassword.js.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.js +2 -7
- package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.js +2 -7
- package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.js +1 -4
- package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.js +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
- package/dist/api/proxy.d.ts +7 -8
- package/dist/api/proxy.d.ts.map +1 -1
- package/dist/api/proxy.js +14 -6
- package/dist/api/proxy.js.map +1 -1
- package/dist/context.d.ts +7 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +9 -0
- package/dist/context.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +108 -28
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +54 -14
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/labeler/defs.d.ts +7 -0
- package/dist/lexicon/types/app/bsky/labeler/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/labeler/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/labeler/service.d.ts +7 -0
- package/dist/lexicon/types/app/bsky/labeler/service.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/labeler/service.js.map +1 -1
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +2 -0
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts +0 -4
- package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/listRecords.js.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +0 -2
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/com/atproto/admin/sendEmail.ts +3 -5
- package/src/api/com/atproto/admin/updateAccountEmail.ts +1 -2
- package/src/api/com/atproto/admin/updateAccountPassword.ts +1 -2
- package/src/api/com/atproto/identity/requestPlcOperationSignature.ts +3 -5
- package/src/api/com/atproto/identity/signPlcOperation.ts +3 -5
- package/src/api/com/atproto/identity/updateHandle.ts +3 -6
- package/src/api/com/atproto/repo/applyWrites.ts +21 -11
- package/src/api/com/atproto/repo/createRecord.ts +19 -14
- package/src/api/com/atproto/repo/deleteRecord.ts +26 -14
- package/src/api/com/atproto/repo/listRecords.ts +1 -11
- package/src/api/com/atproto/repo/putRecord.ts +24 -16
- package/src/api/com/atproto/server/activateAccount.ts +1 -2
- package/src/api/com/atproto/server/confirmEmail.ts +3 -5
- package/src/api/com/atproto/server/createAppPassword.ts +3 -6
- package/src/api/com/atproto/server/createSession.ts +2 -2
- package/src/api/com/atproto/server/deactivateAccount.ts +1 -2
- package/src/api/com/atproto/server/deleteAccount.ts +1 -2
- package/src/api/com/atproto/server/deleteSession.ts +2 -3
- package/src/api/com/atproto/server/getAccountInviteCodes.ts +3 -5
- package/src/api/com/atproto/server/getSession.ts +2 -2
- package/src/api/com/atproto/server/listAppPasswords.ts +3 -5
- package/src/api/com/atproto/server/refreshSession.ts +2 -2
- package/src/api/com/atproto/server/requestAccountDelete.ts +3 -5
- package/src/api/com/atproto/server/requestEmailConfirmation.ts +3 -5
- package/src/api/com/atproto/server/requestEmailUpdate.ts +3 -5
- package/src/api/com/atproto/server/requestPasswordReset.ts +1 -2
- package/src/api/com/atproto/server/resetPassword.ts +1 -2
- package/src/api/com/atproto/server/revokeAppPassword.ts +3 -5
- package/src/api/com/atproto/server/updateEmail.ts +3 -5
- package/src/api/com/atproto/sync/getRecord.ts +1 -3
- package/src/api/com/atproto/temp/checkSignupQueue.ts +2 -2
- package/src/api/proxy.ts +19 -19
- package/src/context.ts +16 -0
- package/src/index.ts +1 -1
- package/src/lexicon/lexicons.ts +60 -17
- package/src/lexicon/types/app/bsky/labeler/defs.ts +7 -0
- package/src/lexicon/types/app/bsky/labeler/service.ts +7 -0
- package/src/lexicon/types/com/atproto/moderation/defs.ts +3 -0
- package/src/lexicon/types/com/atproto/repo/listRecords.ts +0 -4
- package/src/lexicon/types/com/atproto/sync/getRecord.ts +0 -2
@@ -4,6 +4,7 @@
|
|
4
4
|
import { ValidationResult } from '@atproto/lexicon';
|
5
5
|
import type * as AppBskyActorDefs from '../actor/defs.js';
|
6
6
|
import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js';
|
7
|
+
import type * as ComAtprotoModerationDefs from '../../../com/atproto/moderation/defs.js';
|
7
8
|
export interface LabelerView {
|
8
9
|
$type?: 'app.bsky.labeler.defs#labelerView';
|
9
10
|
uri: string;
|
@@ -26,6 +27,12 @@ export interface LabelerViewDetailed {
|
|
26
27
|
viewer?: LabelerViewerState;
|
27
28
|
indexedAt: string;
|
28
29
|
labels?: ComAtprotoLabelDefs.Label[];
|
30
|
+
/** 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. */
|
31
|
+
reasonTypes?: ComAtprotoModerationDefs.ReasonType[];
|
32
|
+
/** The set of subject types (account, record, etc) this service accepts reports on. */
|
33
|
+
subjectTypes?: ComAtprotoModerationDefs.SubjectType[];
|
34
|
+
/** 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. */
|
35
|
+
subjectCollections?: string[];
|
29
36
|
}
|
30
37
|
export declare function isLabelerViewDetailed<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.labeler.defs", "labelerViewDetailed">;
|
31
38
|
export declare function validateLabelerViewDetailed<V>(v: V): ValidationResult<LabelerViewDetailed & V>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/labeler/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;
|
1
|
+
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/labeler/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;AAC9E,OAAO,KAAK,KAAK,wBAAwB,MAAM,yCAAyC,CAAA;AAMxF,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,mCAAmC,CAAA;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,mBAAmB,CAAC,KAAK,EAAE,CAAA;CACrC;AAID,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,2FAEpC;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,qCAE1C;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,2CAA2C,CAAA;IACnD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAA;IACrC,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,mBAAmB,CAAC,KAAK,EAAE,CAAA;IACpC,qNAAqN;IACrN,WAAW,CAAC,EAAE,wBAAwB,CAAC,UAAU,EAAE,CAAA;IACnD,uFAAuF;IACvF,YAAY,CAAC,EAAE,wBAAwB,CAAC,WAAW,EAAE,CAAA;IACrD,4JAA4J;IAC5J,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B;AAID,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,mGAE5C;AAED,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,6CAElD;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,0CAA0C,CAAA;IAClD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAID,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,kGAE3C;AAED,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,4CAEjD;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,uCAAuC,CAAA;IAC/C,0FAA0F;IAC1F,WAAW,EAAE,mBAAmB,CAAC,UAAU,EAAE,CAAA;IAC7C,sJAAsJ;IACtJ,qBAAqB,CAAC,EAAE,mBAAmB,CAAC,oBAAoB,EAAE,CAAA;CACnE;AAID,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,+FAExC;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,yCAE9C"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/labeler/defs.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/labeler/defs.ts"],"names":[],"mappings":";;AA4BA,sCAEC;AAED,kDAEC;AAsBD,sDAEC;AAED,kEAEC;AASD,oDAEC;AAED,gEAEC;AAYD,8CAEC;AAED,0DAEC;AA1FD,mDAA4D;AAC5D,2CAAyE;AAKzE,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,uBAAuB,CAAA;AAalC,MAAM,eAAe,GAAG,aAAa,CAAA;AAErC,SAAgB,aAAa,CAAI,CAAI;IACnC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;AACzC,CAAC;AAED,SAAgB,mBAAmB,CAAI,CAAI;IACzC,OAAO,QAAQ,CAAkB,CAAC,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;AAC1D,CAAC;AAoBD,MAAM,uBAAuB,GAAG,qBAAqB,CAAA;AAErD,SAAgB,qBAAqB,CAAI,CAAI;IAC3C,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,uBAAuB,CAAC,CAAA;AACjD,CAAC;AAED,SAAgB,2BAA2B,CAAI,CAAI;IACjD,OAAO,QAAQ,CAA0B,CAAC,EAAE,EAAE,EAAE,uBAAuB,CAAC,CAAA;AAC1E,CAAC;AAOD,MAAM,sBAAsB,GAAG,oBAAoB,CAAA;AAEnD,SAAgB,oBAAoB,CAAI,CAAI;IAC1C,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,sBAAsB,CAAC,CAAA;AAChD,CAAC;AAED,SAAgB,0BAA0B,CAAI,CAAI;IAChD,OAAO,QAAQ,CAAyB,CAAC,EAAE,EAAE,EAAE,sBAAsB,CAAC,CAAA;AACxE,CAAC;AAUD,MAAM,mBAAmB,GAAG,iBAAiB,CAAA;AAE7C,SAAgB,iBAAiB,CAAI,CAAI;IACvC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAA;AAC7C,CAAC;AAED,SAAgB,uBAAuB,CAAI,CAAI;IAC7C,OAAO,QAAQ,CAAsB,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAA;AAClE,CAAC"}
|
@@ -5,6 +5,7 @@ import { ValidationResult } from '@atproto/lexicon';
|
|
5
5
|
import { $Typed } from '../../../../util';
|
6
6
|
import type * as AppBskyLabelerDefs from './defs.js';
|
7
7
|
import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js';
|
8
|
+
import type * as ComAtprotoModerationDefs from '../../../com/atproto/moderation/defs.js';
|
8
9
|
export interface Record {
|
9
10
|
$type: 'app.bsky.labeler.service';
|
10
11
|
policies: AppBskyLabelerDefs.LabelerPolicies;
|
@@ -12,6 +13,12 @@ export interface Record {
|
|
12
13
|
$type: string;
|
13
14
|
};
|
14
15
|
createdAt: string;
|
16
|
+
/** 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. */
|
17
|
+
reasonTypes?: ComAtprotoModerationDefs.ReasonType[];
|
18
|
+
/** The set of subject types (account, record, etc) this service accepts reports on. */
|
19
|
+
subjectTypes?: ComAtprotoModerationDefs.SubjectType[];
|
20
|
+
/** 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. */
|
21
|
+
subjectCollections?: string[];
|
15
22
|
[k: string]: unknown;
|
16
23
|
}
|
17
24
|
export declare function isRecord<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.labeler.service", "main">;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/labeler/service.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAG5D,OAAO,EAAE,MAAM,EAAkC,MAAM,kBAAkB,CAAA;AACzE,OAAO,KAAK,KAAK,kBAAkB,MAAM,WAAW,CAAA;AACpD,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/labeler/service.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAG5D,OAAO,EAAE,MAAM,EAAkC,MAAM,kBAAkB,CAAA;AACzE,OAAO,KAAK,KAAK,kBAAkB,MAAM,WAAW,CAAA;AACpD,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;AAC9E,OAAO,KAAK,KAAK,wBAAwB,MAAM,yCAAyC,CAAA;AAMxF,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,0BAA0B,CAAA;IACjC,QAAQ,EAAE,kBAAkB,CAAC,eAAe,CAAA;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACnE,SAAS,EAAE,MAAM,CAAA;IACjB,qNAAqN;IACrN,WAAW,CAAC,EAAE,wBAAwB,CAAC,UAAU,EAAE,CAAA;IACnD,uFAAuF;IACvF,YAAY,CAAC,EAAE,wBAAwB,CAAC,WAAW,EAAE,CAAA;IACrD,4JAA4J;IAC5J,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,uFAE/B;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,gCAErC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/labeler/service.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/labeler/service.ts"],"names":[],"mappings":";;AA+BA,4BAEC;AAED,wCAEC;AAhCD,mDAA4D;AAC5D,2CAAyE;AAKzE,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,0BAA0B,CAAA;AAgBrC,MAAM,UAAU,GAAG,MAAM,CAAA;AAEzB,SAAgB,QAAQ,CAAI,CAAI;IAC9B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;AACpC,CAAC;AAED,SAAgB,cAAc,CAAI,CAAI;IACpC,OAAO,QAAQ,CAAa,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;AACtD,CAAC"}
|
@@ -13,4 +13,6 @@ export declare const REASONRUDE = "com.atproto.moderation.defs#reasonRude";
|
|
13
13
|
export declare const REASONOTHER = "com.atproto.moderation.defs#reasonOther";
|
14
14
|
/** Appeal: appeal a previously taken moderation action */
|
15
15
|
export declare const REASONAPPEAL = "com.atproto.moderation.defs#reasonAppeal";
|
16
|
+
/** Tag describing a type of subject that might be reported. */
|
17
|
+
export type SubjectType = 'account' | 'record' | 'chat' | (string & {});
|
16
18
|
//# sourceMappingURL=defs.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/moderation/defs.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,UAAU,GAClB,wCAAwC,GACxC,6CAA6C,GAC7C,8CAA8C,GAC9C,0CAA0C,GAC1C,wCAAwC,GACxC,yCAAyC,GACzC,0CAA0C,GAC1C,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,2DAA2D;AAC3D,eAAO,MAAM,UAAU,2CAAqB,CAAA;AAC5C,+DAA+D;AAC/D,eAAO,MAAM,eAAe,gDAA0B,CAAA;AACtD,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,iDAA2B,CAAA;AACxD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,6CAAuB,CAAA;AAChD,mEAAmE;AACnE,eAAO,MAAM,UAAU,2CAAqB,CAAA;AAC5C,+DAA+D;AAC/D,eAAO,MAAM,WAAW,4CAAsB,CAAA;AAC9C,0DAA0D;AAC1D,eAAO,MAAM,YAAY,6CAAuB,CAAA"}
|
1
|
+
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/moderation/defs.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,UAAU,GAClB,wCAAwC,GACxC,6CAA6C,GAC7C,8CAA8C,GAC9C,0CAA0C,GAC1C,wCAAwC,GACxC,yCAAyC,GACzC,0CAA0C,GAC1C,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,2DAA2D;AAC3D,eAAO,MAAM,UAAU,2CAAqB,CAAA;AAC5C,+DAA+D;AAC/D,eAAO,MAAM,eAAe,gDAA0B,CAAA;AACtD,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,iDAA2B,CAAA;AACxD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,6CAAuB,CAAA;AAChD,mEAAmE;AACnE,eAAO,MAAM,UAAU,2CAAqB,CAAA;AAC5C,+DAA+D;AAC/D,eAAO,MAAM,WAAW,4CAAsB,CAAA;AAC9C,0DAA0D;AAC1D,eAAO,MAAM,YAAY,6CAAuB,CAAA;AAEhD,+DAA+D;AAC/D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
|
@@ -12,10 +12,6 @@ export interface QueryParams {
|
|
12
12
|
/** The number of records to return. */
|
13
13
|
limit: number;
|
14
14
|
cursor?: string;
|
15
|
-
/** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */
|
16
|
-
rkeyStart?: string;
|
17
|
-
/** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
|
18
|
-
rkeyEnd?: string;
|
19
15
|
/** Flag to reverse the order of the returned records. */
|
20
16
|
reverse?: boolean;
|
21
17
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listRecords.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/listRecords.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;AAMtE,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,
|
1
|
+
{"version":3,"file":"listRecords.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/listRecords.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;AAMtE,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;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;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,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;AAE3C,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,EAAE,qCAAqC,CAAA;IAC7C,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;CAClC;AAID,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,6FAE/B;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,gCAErC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listRecords.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/listRecords.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"listRecords.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/repo/listRecords.ts"],"names":[],"mappings":";;AAoEA,4BAEC;AAED,wCAEC;AApED,mDAA4D;AAC5D,2CAAyE;AAGzE,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8BAA8B,CAAA;AAsDzC,MAAM,UAAU,GAAG,QAAQ,CAAA;AAE3B,SAAgB,QAAQ,CAAI,CAAI;IAC9B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;AACpC,CAAC;AAED,SAAgB,cAAc,CAAI,CAAI;IACpC,OAAO,QAAQ,CAAa,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;AAChD,CAAC"}
|
@@ -10,8 +10,6 @@ export interface QueryParams {
|
|
10
10
|
collection: string;
|
11
11
|
/** Record Key */
|
12
12
|
rkey: string;
|
13
|
-
/** DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit */
|
14
|
-
commit?: string;
|
15
13
|
}
|
16
14
|
export type InputSchema = undefined;
|
17
15
|
export type HandlerInput = undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAA;AAKhC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAA;AAKhC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,0BAA0B,CAAA;IACpC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAA;IAClC,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,EACF,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,eAAe,GACf,iBAAiB,CAAA;CACtB;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;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,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"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.104",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"zod": "^3.23.8",
|
51
51
|
"@atproto-labs/fetch-node": "0.1.7",
|
52
52
|
"@atproto-labs/xrpc-utils": "0.0.7",
|
53
|
-
"@atproto/api": "^0.14.
|
53
|
+
"@atproto/api": "^0.14.7",
|
54
54
|
"@atproto/aws": "^0.2.16",
|
55
55
|
"@atproto/common": "^0.4.8",
|
56
56
|
"@atproto/crypto": "^0.4.4",
|
@@ -78,8 +78,8 @@
|
|
78
78
|
"ts-node": "^10.8.2",
|
79
79
|
"typescript": "^5.6.3",
|
80
80
|
"ws": "^8.12.0",
|
81
|
-
"@atproto/api": "^0.14.
|
82
|
-
"@atproto/bsky": "^0.0.
|
81
|
+
"@atproto/api": "^0.14.7",
|
82
|
+
"@atproto/bsky": "^0.0.124",
|
83
83
|
"@atproto/lex-cli": "^0.6.1",
|
84
84
|
"@atproto/oauth-client-browser-example": "0.0.1"
|
85
85
|
},
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import assert from 'node:assert'
|
2
1
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
3
2
|
import { AppContext } from '../../../../context'
|
4
3
|
import { Server } from '../../../../lexicon'
|
@@ -8,7 +7,7 @@ import { resultPassthru } from '../../../proxy'
|
|
8
7
|
export default function (server: Server, ctx: AppContext) {
|
9
8
|
server.com.atproto.admin.sendEmail({
|
10
9
|
auth: ctx.authVerifier.moderator,
|
11
|
-
handler: async ({ input }) => {
|
10
|
+
handler: async ({ input, req }) => {
|
12
11
|
const {
|
13
12
|
content,
|
14
13
|
recipientDid,
|
@@ -24,13 +23,12 @@ export default function (server: Server, ctx: AppContext) {
|
|
24
23
|
}
|
25
24
|
|
26
25
|
if (ctx.entrywayAgent) {
|
27
|
-
assert(ctx.cfg.entryway)
|
28
26
|
return resultPassthru(
|
29
27
|
await ctx.entrywayAgent.com.atproto.admin.sendEmail(
|
30
28
|
input.body,
|
31
|
-
await ctx.
|
29
|
+
await ctx.entrywayAuthHeaders(
|
30
|
+
req,
|
32
31
|
recipientDid,
|
33
|
-
ctx.cfg.entryway.did,
|
34
32
|
ids.ComAtprotoAdminSendEmail,
|
35
33
|
),
|
36
34
|
),
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
2
2
|
import { AppContext } from '../../../../context'
|
3
3
|
import { Server } from '../../../../lexicon'
|
4
|
-
import { authPassthru } from './util'
|
5
4
|
|
6
5
|
export default function (server: Server, ctx: AppContext) {
|
7
6
|
server.com.atproto.admin.updateAccountEmail({
|
@@ -20,7 +19,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
20
19
|
if (ctx.entrywayAgent) {
|
21
20
|
await ctx.entrywayAgent.com.atproto.admin.updateAccountEmail(
|
22
21
|
input.body,
|
23
|
-
|
22
|
+
ctx.entrywayPassthruHeaders(req),
|
24
23
|
)
|
25
24
|
return
|
26
25
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { AppContext } from '../../../../context'
|
2
2
|
import { Server } from '../../../../lexicon'
|
3
|
-
import { authPassthru } from './util'
|
4
3
|
|
5
4
|
export default function (server: Server, ctx: AppContext) {
|
6
5
|
server.com.atproto.admin.updateAccountPassword({
|
@@ -9,7 +8,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
9
8
|
if (ctx.entrywayAgent) {
|
10
9
|
await ctx.entrywayAgent.com.atproto.admin.updateAccountPassword(
|
11
10
|
input.body,
|
12
|
-
|
11
|
+
ctx.entrywayPassthruHeaders(req),
|
13
12
|
)
|
14
13
|
return
|
15
14
|
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import assert from 'node:assert'
|
2
1
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
3
2
|
import { AuthScope } from '../../../../auth-verifier'
|
4
3
|
import { AppContext } from '../../../../context'
|
@@ -8,14 +7,13 @@ import { ids } from '../../../../lexicon/lexicons'
|
|
8
7
|
export default function (server: Server, ctx: AppContext) {
|
9
8
|
server.com.atproto.identity.requestPlcOperationSignature({
|
10
9
|
auth: ctx.authVerifier.accessFull({ additional: [AuthScope.Takendown] }),
|
11
|
-
handler: async ({ auth }) => {
|
10
|
+
handler: async ({ auth, req }) => {
|
12
11
|
if (ctx.entrywayAgent) {
|
13
|
-
assert(ctx.cfg.entryway)
|
14
12
|
await ctx.entrywayAgent.com.atproto.identity.requestPlcOperationSignature(
|
15
13
|
undefined,
|
16
|
-
await ctx.
|
14
|
+
await ctx.entrywayAuthHeaders(
|
15
|
+
req,
|
17
16
|
auth.credentials.did,
|
18
|
-
ctx.cfg.entryway.did,
|
19
17
|
ids.ComAtprotoIdentityRequestPlcOperationSignature,
|
20
18
|
),
|
21
19
|
)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import assert from 'node:assert'
|
2
1
|
import * as plc from '@did-plc/lib'
|
3
2
|
import { check } from '@atproto/common'
|
4
3
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
@@ -10,15 +9,14 @@ import { resultPassthru } from '../../../proxy'
|
|
10
9
|
export default function (server: Server, ctx: AppContext) {
|
11
10
|
server.com.atproto.identity.signPlcOperation({
|
12
11
|
auth: ctx.authVerifier.accessFull(),
|
13
|
-
handler: async ({ auth, input }) => {
|
12
|
+
handler: async ({ auth, input, req }) => {
|
14
13
|
if (ctx.entrywayAgent) {
|
15
|
-
assert(ctx.cfg.entryway)
|
16
14
|
return resultPassthru(
|
17
15
|
await ctx.entrywayAgent.com.atproto.identity.signPlcOperation(
|
18
16
|
input.body,
|
19
|
-
await ctx.
|
17
|
+
await ctx.entrywayAuthHeaders(
|
18
|
+
req,
|
20
19
|
auth.credentials.did,
|
21
|
-
ctx.cfg.entryway.did,
|
22
20
|
ids.ComAtprotoIdentitySignPlcOperation,
|
23
21
|
),
|
24
22
|
),
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import assert from 'node:assert'
|
2
1
|
import { DAY, MINUTE } from '@atproto/common'
|
3
2
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
4
3
|
import { AppContext } from '../../../../context'
|
@@ -22,21 +21,19 @@ export default function (server: Server, ctx: AppContext) {
|
|
22
21
|
calcKey: ({ auth }) => auth.credentials.did,
|
23
22
|
},
|
24
23
|
],
|
25
|
-
handler: async ({ auth, input }) => {
|
24
|
+
handler: async ({ auth, input, req }) => {
|
26
25
|
const requester = auth.credentials.did
|
27
26
|
|
28
27
|
if (ctx.entrywayAgent) {
|
29
|
-
assert(ctx.cfg.entryway)
|
30
|
-
|
31
28
|
// the full flow is:
|
32
29
|
// -> entryway(identity.updateHandle) [update handle, submit plc op]
|
33
30
|
// -> pds(admin.updateAccountHandle) [track handle, sequence handle update]
|
34
31
|
await ctx.entrywayAgent.com.atproto.identity.updateHandle(
|
35
32
|
// @ts-expect-error "did" is not in the schema
|
36
33
|
{ did: requester, handle: input.body.handle },
|
37
|
-
await ctx.
|
34
|
+
await ctx.entrywayAuthHeaders(
|
35
|
+
req,
|
38
36
|
auth.credentials.did,
|
39
|
-
ctx.cfg.entryway.did,
|
40
37
|
ids.ComAtprotoIdentityUpdateHandle,
|
41
38
|
),
|
42
39
|
)
|
@@ -12,6 +12,7 @@ import {
|
|
12
12
|
isDelete,
|
13
13
|
isUpdate,
|
14
14
|
} from '../../../../lexicon/types/com/atproto/repo/applyWrites'
|
15
|
+
import { dbLogger } from '../../../../logger'
|
15
16
|
import {
|
16
17
|
BadCommitSwapError,
|
17
18
|
InvalidRecordError,
|
@@ -119,19 +120,28 @@ export default function (server: Server, ctx: AppContext) {
|
|
119
120
|
const swapCommitCid = swapCommit ? CID.parse(swapCommit) : undefined
|
120
121
|
|
121
122
|
const commit = await ctx.actorStore.transact(did, async (actorTxn) => {
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
123
|
+
const commit = await actorTxn.repo
|
124
|
+
.processWrites(writes, swapCommitCid)
|
125
|
+
.catch((err) => {
|
126
|
+
if (err instanceof BadCommitSwapError) {
|
127
|
+
throw new InvalidRequestError(err.message, 'InvalidSwap')
|
128
|
+
} else {
|
129
|
+
throw err
|
130
|
+
}
|
131
|
+
})
|
132
|
+
|
133
|
+
await ctx.sequencer.sequenceCommit(did, commit)
|
134
|
+
return commit
|
131
135
|
})
|
132
136
|
|
133
|
-
await ctx.
|
134
|
-
|
137
|
+
await ctx.accountManager
|
138
|
+
.updateRepoRoot(did, commit.cid, commit.rev)
|
139
|
+
.catch((err) => {
|
140
|
+
dbLogger.error(
|
141
|
+
{ err, did, cid: commit.cid, rev: commit.rev },
|
142
|
+
'failed to update account root',
|
143
|
+
)
|
144
|
+
})
|
135
145
|
|
136
146
|
return {
|
137
147
|
encoding: 'application/json',
|
@@ -3,6 +3,7 @@ import { InvalidRecordKeyError } from '@atproto/syntax'
|
|
3
3
|
import { AuthRequiredError, InvalidRequestError } from '@atproto/xrpc-server'
|
4
4
|
import { AppContext } from '../../../../context'
|
5
5
|
import { Server } from '../../../../lexicon'
|
6
|
+
import { dbLogger } from '../../../../logger'
|
6
7
|
import {
|
7
8
|
BadCommitSwapError,
|
8
9
|
InvalidRecordError,
|
@@ -82,22 +83,26 @@ export default function (server: Server, ctx: AppContext) {
|
|
82
83
|
}),
|
83
84
|
)
|
84
85
|
const writes = [...backlinkDeletions, write]
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
throw err
|
96
|
-
}
|
86
|
+
const commit = await actorTxn.repo
|
87
|
+
.processWrites(writes, swapCommitCid)
|
88
|
+
.catch((err) => {
|
89
|
+
if (err instanceof BadCommitSwapError) {
|
90
|
+
throw new InvalidRequestError(err.message, 'InvalidSwap')
|
91
|
+
}
|
92
|
+
throw err
|
93
|
+
})
|
94
|
+
await ctx.sequencer.sequenceCommit(did, commit)
|
95
|
+
return commit
|
97
96
|
})
|
98
97
|
|
99
|
-
await ctx.
|
100
|
-
|
98
|
+
await ctx.accountManager
|
99
|
+
.updateRepoRoot(did, commit.cid, commit.rev)
|
100
|
+
.catch((err) => {
|
101
|
+
dbLogger.error(
|
102
|
+
{ err, did, cid: commit.cid, rev: commit.rev },
|
103
|
+
'failed to update account root',
|
104
|
+
)
|
105
|
+
})
|
101
106
|
|
102
107
|
return {
|
103
108
|
encoding: 'application/json',
|
@@ -2,6 +2,7 @@ import { CID } from 'multiformats/cid'
|
|
2
2
|
import { AuthRequiredError, InvalidRequestError } from '@atproto/xrpc-server'
|
3
3
|
import { AppContext } from '../../../../context'
|
4
4
|
import { Server } from '../../../../lexicon'
|
5
|
+
import { dbLogger } from '../../../../logger'
|
5
6
|
import {
|
6
7
|
BadCommitSwapError,
|
7
8
|
BadRecordSwapError,
|
@@ -56,24 +57,35 @@ export default function (server: Server, ctx: AppContext) {
|
|
56
57
|
if (!record) {
|
57
58
|
return null // No-op if record already doesn't exist
|
58
59
|
}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
60
|
+
|
61
|
+
const commit = await actorTxn.repo
|
62
|
+
.processWrites([write], swapCommitCid)
|
63
|
+
.catch((err) => {
|
64
|
+
if (
|
65
|
+
err instanceof BadCommitSwapError ||
|
66
|
+
err instanceof BadRecordSwapError
|
67
|
+
) {
|
68
|
+
throw new InvalidRequestError(err.message, 'InvalidSwap')
|
69
|
+
} else {
|
70
|
+
throw err
|
71
|
+
}
|
72
|
+
})
|
73
|
+
|
74
|
+
await ctx.sequencer.sequenceCommit(did, commit)
|
75
|
+
return commit
|
71
76
|
})
|
72
77
|
|
73
78
|
if (commit !== null) {
|
74
|
-
await ctx.
|
75
|
-
|
79
|
+
await ctx.accountManager
|
80
|
+
.updateRepoRoot(did, commit.cid, commit.rev)
|
81
|
+
.catch((err) => {
|
82
|
+
dbLogger.error(
|
83
|
+
{ err, did, cid: commit.cid, rev: commit.rev },
|
84
|
+
'failed to update account root',
|
85
|
+
)
|
86
|
+
})
|
76
87
|
}
|
88
|
+
|
77
89
|
return {
|
78
90
|
encoding: 'application/json',
|
79
91
|
body: {
|
@@ -5,15 +5,7 @@ import { Server } from '../../../../lexicon'
|
|
5
5
|
|
6
6
|
export default function (server: Server, ctx: AppContext) {
|
7
7
|
server.com.atproto.repo.listRecords(async ({ params }) => {
|
8
|
-
const {
|
9
|
-
repo,
|
10
|
-
collection,
|
11
|
-
limit = 50,
|
12
|
-
cursor,
|
13
|
-
rkeyStart,
|
14
|
-
rkeyEnd,
|
15
|
-
reverse = false,
|
16
|
-
} = params
|
8
|
+
const { repo, collection, limit = 50, cursor, reverse = false } = params
|
17
9
|
|
18
10
|
const did = await ctx.accountManager.getDidForActor(repo)
|
19
11
|
if (!did) {
|
@@ -26,8 +18,6 @@ export default function (server: Server, ctx: AppContext) {
|
|
26
18
|
limit,
|
27
19
|
reverse,
|
28
20
|
cursor,
|
29
|
-
rkeyStart,
|
30
|
-
rkeyEnd,
|
31
21
|
}),
|
32
22
|
)
|
33
23
|
|
@@ -7,10 +7,10 @@ import { AppContext } from '../../../../context'
|
|
7
7
|
import { Server } from '../../../../lexicon'
|
8
8
|
import { ids } from '../../../../lexicon/lexicons'
|
9
9
|
import { Record as ProfileRecord } from '../../../../lexicon/types/app/bsky/actor/profile'
|
10
|
+
import { dbLogger } from '../../../../logger'
|
10
11
|
import {
|
11
12
|
BadCommitSwapError,
|
12
13
|
BadRecordSwapError,
|
13
|
-
CommitDataWithOps,
|
14
14
|
InvalidRecordError,
|
15
15
|
PreparedCreate,
|
16
16
|
PreparedUpdate,
|
@@ -104,26 +104,34 @@ export default function (server: Server, ctx: AppContext) {
|
|
104
104
|
}
|
105
105
|
}
|
106
106
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
}
|
119
|
-
|
107
|
+
const commit = await actorTxn.repo
|
108
|
+
.processWrites([write], swapCommitCid)
|
109
|
+
.catch((err) => {
|
110
|
+
if (
|
111
|
+
err instanceof BadCommitSwapError ||
|
112
|
+
err instanceof BadRecordSwapError
|
113
|
+
) {
|
114
|
+
throw new InvalidRequestError(err.message, 'InvalidSwap')
|
115
|
+
} else {
|
116
|
+
throw err
|
117
|
+
}
|
118
|
+
})
|
119
|
+
|
120
|
+
await ctx.sequencer.sequenceCommit(did, commit)
|
121
|
+
|
120
122
|
return { commit, write }
|
121
123
|
},
|
122
124
|
)
|
123
125
|
|
124
126
|
if (commit !== null) {
|
125
|
-
await ctx.
|
126
|
-
|
127
|
+
await ctx.accountManager
|
128
|
+
.updateRepoRoot(did, commit.cid, commit.rev)
|
129
|
+
.catch((err) => {
|
130
|
+
dbLogger.error(
|
131
|
+
{ err, did, cid: commit.cid, rev: commit.rev },
|
132
|
+
'failed to update account root',
|
133
|
+
)
|
134
|
+
})
|
127
135
|
}
|
128
136
|
|
129
137
|
return {
|
@@ -3,7 +3,6 @@ import { INVALID_HANDLE } from '@atproto/syntax'
|
|
3
3
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
4
4
|
import { AppContext } from '../../../../context'
|
5
5
|
import { Server } from '../../../../lexicon'
|
6
|
-
import { authPassthru } from '../../../proxy'
|
7
6
|
import { assertValidDidDocumentForService } from './util'
|
8
7
|
|
9
8
|
export default function (server: Server, ctx: AppContext) {
|
@@ -14,7 +13,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
14
13
|
if (ctx.entrywayAgent) {
|
15
14
|
await ctx.entrywayAgent.com.atproto.server.activateAccount(
|
16
15
|
undefined,
|
17
|
-
|
16
|
+
ctx.entrywayPassthruHeaders(req),
|
18
17
|
)
|
19
18
|
return
|
20
19
|
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import assert from 'node:assert'
|
2
1
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
3
2
|
import { AppContext } from '../../../../context'
|
4
3
|
import { Server } from '../../../../lexicon'
|
@@ -7,7 +6,7 @@ import { ids } from '../../../../lexicon/lexicons'
|
|
7
6
|
export default function (server: Server, ctx: AppContext) {
|
8
7
|
server.com.atproto.server.confirmEmail({
|
9
8
|
auth: ctx.authVerifier.accessStandard({ checkTakedown: true }),
|
10
|
-
handler: async ({ auth, input }) => {
|
9
|
+
handler: async ({ auth, input, req }) => {
|
11
10
|
const did = auth.credentials.did
|
12
11
|
|
13
12
|
const user = await ctx.accountManager.getAccount(did, {
|
@@ -18,12 +17,11 @@ export default function (server: Server, ctx: AppContext) {
|
|
18
17
|
}
|
19
18
|
|
20
19
|
if (ctx.entrywayAgent) {
|
21
|
-
assert(ctx.cfg.entryway)
|
22
20
|
await ctx.entrywayAgent.com.atproto.server.confirmEmail(
|
23
21
|
input.body,
|
24
|
-
await ctx.
|
22
|
+
await ctx.entrywayAuthHeaders(
|
23
|
+
req,
|
25
24
|
auth.credentials.did,
|
26
|
-
ctx.cfg.entryway.did,
|
27
25
|
ids.ComAtprotoServerConfirmEmail,
|
28
26
|
),
|
29
27
|
)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import assert from 'node:assert'
|
2
1
|
import { AppContext } from '../../../../context'
|
3
2
|
import { Server } from '../../../../lexicon'
|
4
3
|
import { ids } from '../../../../lexicon/lexicons'
|
@@ -9,16 +8,14 @@ export default function (server: Server, ctx: AppContext) {
|
|
9
8
|
auth: ctx.authVerifier.accessFull({
|
10
9
|
checkTakedown: true,
|
11
10
|
}),
|
12
|
-
handler: async ({ auth, input }) => {
|
11
|
+
handler: async ({ auth, input, req }) => {
|
13
12
|
if (ctx.entrywayAgent) {
|
14
|
-
assert(ctx.cfg.entryway)
|
15
|
-
|
16
13
|
return resultPassthru(
|
17
14
|
await ctx.entrywayAgent.com.atproto.server.createAppPassword(
|
18
15
|
input.body,
|
19
|
-
await ctx.
|
16
|
+
await ctx.entrywayAuthHeaders(
|
17
|
+
req,
|
20
18
|
auth.credentials.did,
|
21
|
-
ctx.cfg.entryway.did,
|
22
19
|
ids.ComAtprotoServerCreateAppPassword,
|
23
20
|
),
|
24
21
|
),
|