@atproto/pds 0.4.66 → 0.4.68
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -0
- package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.js +15 -5
- package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +47 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +49 -2
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +8 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/admin/defs.js +10 -0
- package/dist/lexicon/types/com/atproto/admin/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts +5 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts +5 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
- package/dist/sequencer/events.d.ts.map +1 -1
- package/dist/sequencer/events.js +4 -1
- package/dist/sequencer/events.js.map +1 -1
- package/package.json +4 -4
- package/src/api/com/atproto/identity/updateHandle.ts +22 -4
- package/src/lexicon/lexicons.ts +53 -2
- package/src/lexicon/types/com/atproto/admin/defs.ts +19 -0
- package/src/lexicon/types/tools/ozone/moderation/queryEvents.ts +5 -1
- package/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts +5 -1
- package/src/sequencer/events.ts +4 -1
- package/tests/sequencer.test.ts +46 -2
@@ -22,6 +22,7 @@ export interface AccountView {
|
|
22
22
|
emailConfirmedAt?: string;
|
23
23
|
inviteNote?: string;
|
24
24
|
deactivatedAt?: string;
|
25
|
+
threatSignatures?: ThreatSignature[];
|
25
26
|
[k: string]: unknown;
|
26
27
|
}
|
27
28
|
export declare function isAccountView(v: unknown): v is AccountView;
|
@@ -40,4 +41,11 @@ export interface RepoBlobRef {
|
|
40
41
|
}
|
41
42
|
export declare function isRepoBlobRef(v: unknown): v is RepoBlobRef;
|
42
43
|
export declare function validateRepoBlobRef(v: unknown): ValidationResult;
|
44
|
+
export interface ThreatSignature {
|
45
|
+
property: string;
|
46
|
+
value: string;
|
47
|
+
[k: string]: unknown;
|
48
|
+
}
|
49
|
+
export declare function isThreatSignature(v: unknown): v is ThreatSignature;
|
50
|
+
export declare function validateThreatSignature(v: unknown): ValidationResult;
|
43
51
|
//# sourceMappingURL=defs.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/admin/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,KAAK,oBAAoB,MAAM,gBAAgB,CAAA;AAEtD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAMxD;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE/D;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,EAAE,EAAE,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAA;IAC3C,OAAO,CAAC,EAAE,oBAAoB,CAAC,UAAU,EAAE,CAAA;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,gBAAgB,CAAC,EAAE,MA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C,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,WAAW,CAM1D;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEhE;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,eAAe,CAMlE;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEpE"}
|
@@ -8,6 +8,8 @@ exports.isRepoRef = isRepoRef;
|
|
8
8
|
exports.validateRepoRef = validateRepoRef;
|
9
9
|
exports.isRepoBlobRef = isRepoBlobRef;
|
10
10
|
exports.validateRepoBlobRef = validateRepoBlobRef;
|
11
|
+
exports.isThreatSignature = isThreatSignature;
|
12
|
+
exports.validateThreatSignature = validateThreatSignature;
|
11
13
|
const lexicons_1 = require("../../../../lexicons");
|
12
14
|
const util_1 = require("../../../../util");
|
13
15
|
function isStatusAttr(v) {
|
@@ -42,4 +44,12 @@ function isRepoBlobRef(v) {
|
|
42
44
|
function validateRepoBlobRef(v) {
|
43
45
|
return lexicons_1.lexicons.validate('com.atproto.admin.defs#repoBlobRef', v);
|
44
46
|
}
|
47
|
+
function isThreatSignature(v) {
|
48
|
+
return ((0, util_1.isObj)(v) &&
|
49
|
+
(0, util_1.hasProp)(v, '$type') &&
|
50
|
+
v.$type === 'com.atproto.admin.defs#threatSignature');
|
51
|
+
}
|
52
|
+
function validateThreatSignature(v) {
|
53
|
+
return lexicons_1.lexicons.validate('com.atproto.admin.defs#threatSignature', v);
|
54
|
+
}
|
45
55
|
//# sourceMappingURL=defs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/admin/defs.ts"],"names":[],"mappings":";;AAeA,oCAMC;AAED,gDAEC;
|
1
|
+
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/admin/defs.ts"],"names":[],"mappings":";;AAeA,oCAMC;AAED,gDAEC;AAkBD,sCAMC;AAED,kDAEC;AAOD,8BAMC;AAED,0CAEC;AASD,sCAMC;AAED,kDAEC;AAQD,8CAMC;AAED,0DAEC;AAvGD,mDAA+C;AAC/C,2CAAiD;AAUjD,SAAgB,YAAY,CAAC,CAAU;IACrC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,mCAAmC,CAChD,CAAA;AACH,CAAC;AAED,SAAgB,kBAAkB,CAAC,CAAU;IAC3C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAA;AAClE,CAAC;AAkBD,SAAgB,aAAa,CAAC,CAAU;IACtC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,oCAAoC,CACjD,CAAA;AACH,CAAC;AAED,SAAgB,mBAAmB,CAAC,CAAU;IAC5C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,oCAAoC,EAAE,CAAC,CAAC,CAAA;AACnE,CAAC;AAOD,SAAgB,SAAS,CAAC,CAAU;IAClC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,gCAAgC,CAC7C,CAAA;AACH,CAAC;AAED,SAAgB,eAAe,CAAC,CAAU;IACxC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAA;AAC/D,CAAC;AASD,SAAgB,aAAa,CAAC,CAAU;IACtC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,oCAAoC,CACjD,CAAA;AACH,CAAC;AAED,SAAgB,mBAAmB,CAAC,CAAU;IAC5C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,oCAAoC,EAAE,CAAC,CAAC,CAAA;AACnE,CAAC;AAQD,SAAgB,iBAAiB,CAAC,CAAU;IAC1C,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,wCAAwC,CACrD,CAAA;AACH,CAAC;AAED,SAAgB,uBAAuB,CAAC,CAAU;IAChD,OAAO,mBAAQ,CAAC,QAAQ,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAA;AACvE,CAAC"}
|
@@ -15,7 +15,11 @@ export interface QueryParams {
|
|
15
15
|
/** Retrieve events created before a given timestamp */
|
16
16
|
createdBefore?: string;
|
17
17
|
subject?: string;
|
18
|
-
/** If
|
18
|
+
/** If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. */
|
19
|
+
collections?: string[];
|
20
|
+
/** If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. */
|
21
|
+
subjectType?: 'account' | 'record' | (string & {});
|
22
|
+
/** If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned. */
|
19
23
|
includeAllUserRecords: boolean;
|
20
24
|
limit: number;
|
21
25
|
/** If true, only events with comments are returned */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"queryEvents.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/moderation/queryEvents.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,wKAAwK;IACxK,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2FAA2F;IAC3F,aAAa,EAAE,KAAK,GAAG,MAAM,CAAA;IAC7B,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,
|
1
|
+
{"version":3,"file":"queryEvents.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/moderation/queryEvents.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,wKAAwK;IACxK,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2FAA2F;IAC3F,aAAa,EAAE,KAAK,GAAG,MAAM,CAAA;IAC7B,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iKAAiK;IACjK,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,4PAA4P;IAC5P,WAAW,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAClD,iJAAiJ;IACjJ,qBAAqB,EAAE,OAAO,CAAA;IA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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,7 +5,7 @@ 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
|
-
/** All subjects belonging to the account specified in the 'subject' param will be returned. */
|
8
|
+
/** All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. */
|
9
9
|
includeAllUserRecords?: boolean;
|
10
10
|
/** The subject to get the status for. */
|
11
11
|
subject?: string;
|
@@ -38,6 +38,10 @@ export interface QueryParams {
|
|
38
38
|
tags?: string[];
|
39
39
|
excludeTags?: string[];
|
40
40
|
cursor?: string;
|
41
|
+
/** If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. */
|
42
|
+
collections?: string[];
|
43
|
+
/** If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. */
|
44
|
+
subjectType?: 'account' | 'record' | (string & {});
|
41
45
|
}
|
42
46
|
export type InputSchema = undefined;
|
43
47
|
export interface OutputSchema {
|
@@ -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
|
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,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,MAAM,CAAA;IACvB,SAAS,EAAE,gBAAgB,GAAG,gBAAgB,CAAA;IAC9C,aAAa,EAAE,KAAK,GAAG,MAAM,CAAA;IAC7B,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,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ot":"","sources":["../../src/sequencer/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAIL,UAAU,EAEX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,eAAO,MAAM,eAAe,QACrB,MAAM,cACC,UAAU,UACd,aAAa,EAAE,KACtB,OAAO,CAAC,aAAa,
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/sequencer/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAIL,UAAU,EAEX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,eAAO,MAAM,eAAe,QACrB,MAAM,cACC,UAAU,UACd,aAAa,EAAE,KACtB,OAAO,CAAC,aAAa,CAmDvB,CAAA;AAED,eAAO,MAAM,qBAAqB,QAC3B,MAAM,UACH,MAAM,KACb,OAAO,CAAC,aAAa,CAWvB,CAAA;AAED,eAAO,MAAM,oBAAoB,QAC1B,MAAM,WACF,MAAM,KACd,OAAO,CAAC,aAAa,CAavB,CAAA;AAED,eAAO,MAAM,mBAAmB,QACzB,MAAM,UACH,aAAa,KACpB,OAAO,CAAC,aAAa,CAevB,CAAA;AAED,eAAO,MAAM,kBAAkB,QACxB,MAAM,KACV,OAAO,CAAC,aAAa,CAUvB,CAAA;AAED,e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AAE,WAAW,CAAA;CACjB,CAAA;AACD,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,SAAS,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,UAAU,CAAA;CAChB,CAAA;AACD,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,WAAW,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,YAAY,CAAA;CAClB,CAAA;AACD,MAAM,MAAM,MAAM,GACd,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,iBAAiB,CAAA"}
|
package/dist/sequencer/events.js
CHANGED
@@ -14,7 +14,10 @@ const formatSeqCommit = async (did, commitData, writes) => {
|
|
14
14
|
if (writes.length > 200 || commitData.newBlocks.byteSize > 1000000) {
|
15
15
|
tooBig = true;
|
16
16
|
const justRoot = new repo_1.BlockMap();
|
17
|
-
|
17
|
+
const rootBlock = commitData.newBlocks.get(commitData.cid);
|
18
|
+
if (rootBlock) {
|
19
|
+
justRoot.set(commitData.cid, rootBlock);
|
20
|
+
}
|
18
21
|
carSlice = await (0, repo_1.blocksToCarFile)(commitData.cid, justRoot);
|
19
22
|
}
|
20
23
|
else {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/sequencer/events.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,4CAAoD;AACpD,wCAMsB;AAItB,wDAAkD;AAE3C,MAAM,eAAe,GAAG,KAAK,EAClC,GAAW,EACX,UAAsB,EACtB,MAAuB,EACC,EAAE;IAC1B,IAAI,MAAe,CAAA;IACnB,MAAM,GAAG,GAAkB,EAAE,CAAA;IAC7B,MAAM,KAAK,GAAG,IAAI,aAAM,EAAE,CAAA;IAC1B,IAAI,QAAoB,CAAA;IAExB,6BAA6B;IAC7B,IAAI,MAAM,CAAC,MAAM,GAAG,GA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C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAA;AAGW,QAAA,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,MAAM,EAAE,OAAC;SACN,IAAI,CAAC;QACJ,+BAAa,CAAC,SAAS;QACvB,+BAAa,CAAC,SAAS;QACvB,+BAAa,CAAC,OAAO;QACrB,+BAAa,CAAC,WAAW;KAC1B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AAGW,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.68",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"undici": "^6.19.8",
|
46
46
|
"zod": "^3.23.8",
|
47
47
|
"@atproto-labs/fetch-node": "0.1.3",
|
48
|
-
"@atproto/api": "^0.13.
|
48
|
+
"@atproto/api": "^0.13.13",
|
49
49
|
"@atproto/aws": "^0.2.7",
|
50
50
|
"@atproto/common": "^0.4.4",
|
51
51
|
"@atproto/crypto": "^0.4.1",
|
@@ -75,8 +75,8 @@
|
|
75
75
|
"ts-node": "^10.8.2",
|
76
76
|
"typescript": "^5.6.3",
|
77
77
|
"ws": "^8.12.0",
|
78
|
-
"@atproto/api": "^0.13.
|
79
|
-
"@atproto/bsky": "^0.0.
|
78
|
+
"@atproto/api": "^0.13.13",
|
79
|
+
"@atproto/bsky": "^0.0.91",
|
80
80
|
"@atproto/lex-cli": "^0.5.1",
|
81
81
|
"@atproto/oauth-client-browser-example": "0.0.0"
|
82
82
|
},
|
@@ -53,13 +53,31 @@ export default function (server: Server, ctx: AppContext) {
|
|
53
53
|
includeDeactivated: true,
|
54
54
|
})
|
55
55
|
|
56
|
-
if (account) {
|
56
|
+
if (!account) {
|
57
|
+
if (requester.startsWith('did:plc:')) {
|
58
|
+
await ctx.plcClient.updateHandle(
|
59
|
+
requester,
|
60
|
+
ctx.plcRotationKey,
|
61
|
+
handle,
|
62
|
+
)
|
63
|
+
} else {
|
64
|
+
const resolved = await ctx.idResolver.did.resolveAtprotoData(
|
65
|
+
requester,
|
66
|
+
true,
|
67
|
+
)
|
68
|
+
if (resolved.handle !== handle) {
|
69
|
+
throw new InvalidRequestError(
|
70
|
+
'DID is not properly configured for handle',
|
71
|
+
)
|
72
|
+
}
|
73
|
+
}
|
74
|
+
await ctx.accountManager.updateHandle(requester, handle)
|
75
|
+
} else {
|
76
|
+
// if we found an account with matching handle, check if it is the same as requester
|
77
|
+
// if so emit an identity event, otherwise error.
|
57
78
|
if (account.did !== requester) {
|
58
79
|
throw new InvalidRequestError(`Handle already taken: ${handle}`)
|
59
80
|
}
|
60
|
-
} else {
|
61
|
-
await ctx.plcClient.updateHandle(requester, ctx.plcRotationKey, handle)
|
62
|
-
await ctx.accountManager.updateHandle(requester, handle)
|
63
81
|
}
|
64
82
|
|
65
83
|
try {
|
package/src/lexicon/lexicons.ts
CHANGED
@@ -70,6 +70,13 @@ export const schemaDict = {
|
|
70
70
|
type: 'string',
|
71
71
|
format: 'datetime',
|
72
72
|
},
|
73
|
+
threatSignatures: {
|
74
|
+
type: 'array',
|
75
|
+
items: {
|
76
|
+
type: 'ref',
|
77
|
+
ref: 'lex:com.atproto.admin.defs#threatSignature',
|
78
|
+
},
|
79
|
+
},
|
73
80
|
},
|
74
81
|
},
|
75
82
|
repoRef: {
|
@@ -100,6 +107,18 @@ export const schemaDict = {
|
|
100
107
|
},
|
101
108
|
},
|
102
109
|
},
|
110
|
+
threatSignature: {
|
111
|
+
type: 'object',
|
112
|
+
required: ['property', 'value'],
|
113
|
+
properties: {
|
114
|
+
property: {
|
115
|
+
type: 'string',
|
116
|
+
},
|
117
|
+
value: {
|
118
|
+
type: 'string',
|
119
|
+
},
|
120
|
+
},
|
121
|
+
},
|
103
122
|
},
|
104
123
|
},
|
105
124
|
ComAtprotoAdminDeleteAccount: {
|
@@ -11809,11 +11828,27 @@ export const schemaDict = {
|
|
11809
11828
|
type: 'string',
|
11810
11829
|
format: 'uri',
|
11811
11830
|
},
|
11831
|
+
collections: {
|
11832
|
+
type: 'array',
|
11833
|
+
maxLength: 20,
|
11834
|
+
description:
|
11835
|
+
"If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
|
11836
|
+
items: {
|
11837
|
+
type: 'string',
|
11838
|
+
format: 'nsid',
|
11839
|
+
},
|
11840
|
+
},
|
11841
|
+
subjectType: {
|
11842
|
+
type: 'string',
|
11843
|
+
description:
|
11844
|
+
"If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",
|
11845
|
+
knownValues: ['account', 'record'],
|
11846
|
+
},
|
11812
11847
|
includeAllUserRecords: {
|
11813
11848
|
type: 'boolean',
|
11814
11849
|
default: false,
|
11815
11850
|
description:
|
11816
|
-
|
11851
|
+
"If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned.",
|
11817
11852
|
},
|
11818
11853
|
limit: {
|
11819
11854
|
type: 'integer',
|
@@ -11908,7 +11943,7 @@ export const schemaDict = {
|
|
11908
11943
|
includeAllUserRecords: {
|
11909
11944
|
type: 'boolean',
|
11910
11945
|
description:
|
11911
|
-
"All subjects belonging to the account specified in the 'subject' param will be returned.",
|
11946
|
+
"All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned.",
|
11912
11947
|
},
|
11913
11948
|
subject: {
|
11914
11949
|
type: 'string',
|
@@ -12005,6 +12040,22 @@ export const schemaDict = {
|
|
12005
12040
|
cursor: {
|
12006
12041
|
type: 'string',
|
12007
12042
|
},
|
12043
|
+
collections: {
|
12044
|
+
type: 'array',
|
12045
|
+
maxLength: 20,
|
12046
|
+
description:
|
12047
|
+
"If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
|
12048
|
+
items: {
|
12049
|
+
type: 'string',
|
12050
|
+
format: 'nsid',
|
12051
|
+
},
|
12052
|
+
},
|
12053
|
+
subjectType: {
|
12054
|
+
type: 'string',
|
12055
|
+
description:
|
12056
|
+
"If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",
|
12057
|
+
knownValues: ['account', 'record'],
|
12058
|
+
},
|
12008
12059
|
},
|
12009
12060
|
},
|
12010
12061
|
output: {
|
@@ -37,6 +37,7 @@ export interface AccountView {
|
|
37
37
|
emailConfirmedAt?: string
|
38
38
|
inviteNote?: string
|
39
39
|
deactivatedAt?: string
|
40
|
+
threatSignatures?: ThreatSignature[]
|
40
41
|
[k: string]: unknown
|
41
42
|
}
|
42
43
|
|
@@ -87,3 +88,21 @@ export function isRepoBlobRef(v: unknown): v is RepoBlobRef {
|
|
87
88
|
export function validateRepoBlobRef(v: unknown): ValidationResult {
|
88
89
|
return lexicons.validate('com.atproto.admin.defs#repoBlobRef', v)
|
89
90
|
}
|
91
|
+
|
92
|
+
export interface ThreatSignature {
|
93
|
+
property: string
|
94
|
+
value: string
|
95
|
+
[k: string]: unknown
|
96
|
+
}
|
97
|
+
|
98
|
+
export function isThreatSignature(v: unknown): v is ThreatSignature {
|
99
|
+
return (
|
100
|
+
isObj(v) &&
|
101
|
+
hasProp(v, '$type') &&
|
102
|
+
v.$type === 'com.atproto.admin.defs#threatSignature'
|
103
|
+
)
|
104
|
+
}
|
105
|
+
|
106
|
+
export function validateThreatSignature(v: unknown): ValidationResult {
|
107
|
+
return lexicons.validate('com.atproto.admin.defs#threatSignature', v)
|
108
|
+
}
|
@@ -20,7 +20,11 @@ export interface QueryParams {
|
|
20
20
|
/** Retrieve events created before a given timestamp */
|
21
21
|
createdBefore?: string
|
22
22
|
subject?: string
|
23
|
-
/** If
|
23
|
+
/** If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. */
|
24
|
+
collections?: string[]
|
25
|
+
/** If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. */
|
26
|
+
subjectType?: 'account' | 'record' | (string & {})
|
27
|
+
/** If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned. */
|
24
28
|
includeAllUserRecords: boolean
|
25
29
|
limit: number
|
26
30
|
/** If true, only events with comments are returned */
|
@@ -10,7 +10,7 @@ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
10
|
import * as ToolsOzoneModerationDefs from './defs'
|
11
11
|
|
12
12
|
export interface QueryParams {
|
13
|
-
/** All subjects belonging to the account specified in the 'subject' param will be returned. */
|
13
|
+
/** All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. */
|
14
14
|
includeAllUserRecords?: boolean
|
15
15
|
/** The subject to get the status for. */
|
16
16
|
subject?: string
|
@@ -43,6 +43,10 @@ export interface QueryParams {
|
|
43
43
|
tags?: string[]
|
44
44
|
excludeTags?: string[]
|
45
45
|
cursor?: string
|
46
|
+
/** If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. */
|
47
|
+
collections?: string[]
|
48
|
+
/** If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. */
|
49
|
+
subjectType?: 'account' | 'record' | (string & {})
|
46
50
|
}
|
47
51
|
|
48
52
|
export type InputSchema = undefined
|
package/src/sequencer/events.ts
CHANGED
@@ -26,7 +26,10 @@ export const formatSeqCommit = async (
|
|
26
26
|
if (writes.length > 200 || commitData.newBlocks.byteSize > 1000000) {
|
27
27
|
tooBig = true
|
28
28
|
const justRoot = new BlockMap()
|
29
|
-
|
29
|
+
const rootBlock = commitData.newBlocks.get(commitData.cid)
|
30
|
+
if (rootBlock) {
|
31
|
+
justRoot.set(commitData.cid, rootBlock)
|
32
|
+
}
|
30
33
|
carSlice = await blocksToCarFile(commitData.cid, justRoot)
|
31
34
|
} else {
|
32
35
|
tooBig = false
|
package/tests/sequencer.test.ts
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
import { TestNetworkNoAppView, SeedClient } from '@atproto/dev-env'
|
2
2
|
import { randomStr } from '@atproto/crypto'
|
3
|
-
import {
|
4
|
-
|
3
|
+
import {
|
4
|
+
cborDecode,
|
5
|
+
cborEncode,
|
6
|
+
readFromGenerator,
|
7
|
+
wait,
|
8
|
+
} from '@atproto/common'
|
9
|
+
import { Sequencer, SeqEvt, formatSeqCommit } from '../src/sequencer'
|
10
|
+
import { sequencer, repoPrepare } from '../../pds'
|
5
11
|
import Outbox from '../src/sequencer/outbox'
|
6
12
|
import userSeed from './seeds/users'
|
13
|
+
import { ids } from '../src/lexicon/lexicons'
|
14
|
+
import { readCarWithRoot } from '@atproto/repo'
|
7
15
|
|
8
16
|
describe('sequencer', () => {
|
9
17
|
let network: TestNetworkNoAppView
|
@@ -207,4 +215,40 @@ describe('sequencer', () => {
|
|
207
215
|
}
|
208
216
|
lastSeen = results[0].at(-1)?.seq ?? lastSeen
|
209
217
|
})
|
218
|
+
|
219
|
+
it('root block must be returned in tooBig seq commit', async () => {
|
220
|
+
// Create good records to exceed the event limit (the current limit is 200 events)
|
221
|
+
// it creates events completely locally, so it doesn't need to be in the network
|
222
|
+
const eventsToCreate = 250
|
223
|
+
const createPostRecord = () =>
|
224
|
+
repoPrepare.prepareCreate({
|
225
|
+
did: sc.dids.alice,
|
226
|
+
collection: ids.AppBskyFeedPost,
|
227
|
+
record: { text: 'valid', createdAt: new Date().toISOString() },
|
228
|
+
})
|
229
|
+
const writesPromises = Array.from(
|
230
|
+
{ length: eventsToCreate },
|
231
|
+
createPostRecord,
|
232
|
+
)
|
233
|
+
const writes = await Promise.all(writesPromises)
|
234
|
+
// just format commit without processing writes
|
235
|
+
const writeCommit = await network.pds.ctx.actorStore.transact(
|
236
|
+
sc.dids.alice,
|
237
|
+
(store) => store.repo.formatCommit(writes),
|
238
|
+
)
|
239
|
+
|
240
|
+
const repoSeqInsert = await formatSeqCommit(
|
241
|
+
sc.dids.alice,
|
242
|
+
writeCommit,
|
243
|
+
writes,
|
244
|
+
)
|
245
|
+
|
246
|
+
const evt = cborDecode<sequencer.CommitEvt>(repoSeqInsert.event)
|
247
|
+
expect(evt.tooBig).toBe(true)
|
248
|
+
|
249
|
+
const car = await readCarWithRoot(evt.blocks)
|
250
|
+
expect(car.root.toString()).toBe(writeCommit.cid.toString())
|
251
|
+
// in the case of tooBig, the blocks must contain the root block only
|
252
|
+
expect(car.blocks.size).toBe(1)
|
253
|
+
})
|
210
254
|
})
|