@atproto/pds 0.4.61 → 0.4.62

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/account-manager/helpers/token.d.ts +16 -16
  3. package/dist/lexicon/index.d.ts +11 -0
  4. package/dist/lexicon/index.d.ts.map +1 -1
  5. package/dist/lexicon/index.js +32 -1
  6. package/dist/lexicon/index.js.map +1 -1
  7. package/dist/lexicon/lexicons.d.ts +176 -0
  8. package/dist/lexicon/lexicons.d.ts.map +1 -1
  9. package/dist/lexicon/lexicons.js +176 -0
  10. package/dist/lexicon/lexicons.js.map +1 -1
  11. package/dist/lexicon/types/tools/ozone/signature/defs.d.ts +12 -0
  12. package/dist/lexicon/types/tools/ozone/signature/defs.d.ts.map +1 -0
  13. package/dist/lexicon/types/tools/ozone/signature/defs.js +16 -0
  14. package/dist/lexicon/types/tools/ozone/signature/defs.js.map +1 -0
  15. package/dist/lexicon/types/tools/ozone/signature/findCorrelation.d.ts +36 -0
  16. package/dist/lexicon/types/tools/ozone/signature/findCorrelation.d.ts.map +1 -0
  17. package/dist/lexicon/types/tools/ozone/signature/findCorrelation.js +3 -0
  18. package/dist/lexicon/types/tools/ozone/signature/findCorrelation.js.map +1 -0
  19. package/dist/lexicon/types/tools/ozone/signature/findRelatedAccounts.d.ts +48 -0
  20. package/dist/lexicon/types/tools/ozone/signature/findRelatedAccounts.d.ts.map +1 -0
  21. package/dist/lexicon/types/tools/ozone/signature/findRelatedAccounts.js +16 -0
  22. package/dist/lexicon/types/tools/ozone/signature/findRelatedAccounts.js.map +1 -0
  23. package/dist/lexicon/types/tools/ozone/signature/searchAccounts.d.ts +39 -0
  24. package/dist/lexicon/types/tools/ozone/signature/searchAccounts.d.ts.map +1 -0
  25. package/dist/lexicon/types/tools/ozone/signature/searchAccounts.js +3 -0
  26. package/dist/lexicon/types/tools/ozone/signature/searchAccounts.js.map +1 -0
  27. package/package.json +6 -6
  28. package/src/lexicon/index.ts +46 -0
  29. package/src/lexicon/lexicons.ts +180 -0
  30. package/src/lexicon/types/tools/ozone/signature/defs.ts +25 -0
  31. package/src/lexicon/types/tools/ozone/signature/findCorrelation.ts +46 -0
  32. package/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts +71 -0
  33. package/src/lexicon/types/tools/ozone/signature/searchAccounts.ts +49 -0
@@ -0,0 +1,12 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon';
5
+ export interface SigDetail {
6
+ property: string;
7
+ value: string;
8
+ [k: string]: unknown;
9
+ }
10
+ export declare function isSigDetail(v: unknown): v is SigDetail;
11
+ export declare function validateSigDetail(v: unknown): ValidationResult;
12
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/signature/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,SAAS,CAMtD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE9D"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateSigDetail = exports.isSigDetail = void 0;
4
+ const lexicons_1 = require("../../../../lexicons");
5
+ const util_1 = require("../../../../util");
6
+ function isSigDetail(v) {
7
+ return ((0, util_1.isObj)(v) &&
8
+ (0, util_1.hasProp)(v, '$type') &&
9
+ v.$type === 'tools.ozone.signature.defs#sigDetail');
10
+ }
11
+ exports.isSigDetail = isSigDetail;
12
+ function validateSigDetail(v) {
13
+ return lexicons_1.lexicons.validate('tools.ozone.signature.defs#sigDetail', v);
14
+ }
15
+ exports.validateSigDetail = validateSigDetail;
16
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/signature/defs.ts"],"names":[],"mappings":";;;AAIA,mDAA+C;AAC/C,2CAAiD;AASjD,SAAgB,WAAW,CAAC,CAAU;IACpC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,sCAAsC,CACnD,CAAA;AACH,CAAC;AAND,kCAMC;AAED,SAAgB,iBAAiB,CAAC,CAAU;IAC1C,OAAO,mBAAQ,CAAC,QAAQ,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAA;AACrE,CAAC;AAFD,8CAEC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import * as ToolsOzoneSignatureDefs from './defs';
7
+ export interface QueryParams {
8
+ dids: string[];
9
+ }
10
+ export type InputSchema = undefined;
11
+ export interface OutputSchema {
12
+ details: ToolsOzoneSignatureDefs.SigDetail[];
13
+ [k: string]: unknown;
14
+ }
15
+ export type HandlerInput = undefined;
16
+ export interface HandlerSuccess {
17
+ encoding: 'application/json';
18
+ body: OutputSchema;
19
+ headers?: {
20
+ [key: string]: string;
21
+ };
22
+ }
23
+ export interface HandlerError {
24
+ status: number;
25
+ message?: string;
26
+ }
27
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
28
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
29
+ auth: HA;
30
+ params: QueryParams;
31
+ input: HandlerInput;
32
+ req: express.Request;
33
+ res: express.Response;
34
+ };
35
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
36
+ //# sourceMappingURL=findCorrelation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findCorrelation.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/signature/findCorrelation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,uBAAuB,MAAM,QAAQ,CAAA;AAEjD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,uBAAuB,CAAC,SAAS,EAAE,CAAA;IAC5C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=findCorrelation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findCorrelation.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/signature/findCorrelation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express';
5
+ import { ValidationResult } from '@atproto/lexicon';
6
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
7
+ import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs';
8
+ import * as ToolsOzoneSignatureDefs from './defs';
9
+ export interface QueryParams {
10
+ did: string;
11
+ cursor?: string;
12
+ limit: number;
13
+ }
14
+ export type InputSchema = undefined;
15
+ export interface OutputSchema {
16
+ cursor?: string;
17
+ accounts: RelatedAccount[];
18
+ [k: string]: unknown;
19
+ }
20
+ export type HandlerInput = undefined;
21
+ export interface HandlerSuccess {
22
+ encoding: 'application/json';
23
+ body: OutputSchema;
24
+ headers?: {
25
+ [key: string]: string;
26
+ };
27
+ }
28
+ export interface HandlerError {
29
+ status: number;
30
+ message?: string;
31
+ }
32
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
33
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
34
+ auth: HA;
35
+ params: QueryParams;
36
+ input: HandlerInput;
37
+ req: express.Request;
38
+ res: express.Response;
39
+ };
40
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
41
+ export interface RelatedAccount {
42
+ account: ComAtprotoAdminDefs.AccountView;
43
+ similarities?: ToolsOzoneSignatureDefs.SigDetail[];
44
+ [k: string]: unknown;
45
+ }
46
+ export declare function isRelatedAccount(v: unknown): v is RelatedAccount;
47
+ export declare function validateRelatedAccount(v: unknown): ValidationResult;
48
+ //# sourceMappingURL=findRelatedAccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findRelatedAccounts.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,mBAAmB,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,uBAAuB,MAAM,QAAQ,CAAA;AAEjD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA;AAE3C,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,mBAAmB,CAAC,WAAW,CAAA;IACxC,YAAY,CAAC,EAAE,uBAAuB,CAAC,SAAS,EAAE,CAAA;IAClD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,cAAc,CAMhE;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAKnE"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateRelatedAccount = exports.isRelatedAccount = void 0;
4
+ const lexicons_1 = require("../../../../lexicons");
5
+ const util_1 = require("../../../../util");
6
+ function isRelatedAccount(v) {
7
+ return ((0, util_1.isObj)(v) &&
8
+ (0, util_1.hasProp)(v, '$type') &&
9
+ v.$type === 'tools.ozone.signature.findRelatedAccounts#relatedAccount');
10
+ }
11
+ exports.isRelatedAccount = isRelatedAccount;
12
+ function validateRelatedAccount(v) {
13
+ return lexicons_1.lexicons.validate('tools.ozone.signature.findRelatedAccounts#relatedAccount', v);
14
+ }
15
+ exports.validateRelatedAccount = validateRelatedAccount;
16
+ //# sourceMappingURL=findRelatedAccounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findRelatedAccounts.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts"],"names":[],"mappings":";;;AAKA,mDAA+C;AAC/C,2CAAiD;AAmDjD,SAAgB,gBAAgB,CAAC,CAAU;IACzC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,0DAA0D,CACvE,CAAA;AACH,CAAC;AAND,4CAMC;AAED,SAAgB,sBAAsB,CAAC,CAAU;IAC/C,OAAO,mBAAQ,CAAC,QAAQ,CACtB,0DAA0D,EAC1D,CAAC,CACF,CAAA;AACH,CAAC;AALD,wDAKC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs';
7
+ export interface QueryParams {
8
+ values: string[];
9
+ cursor?: string;
10
+ limit: number;
11
+ }
12
+ export type InputSchema = undefined;
13
+ export interface OutputSchema {
14
+ cursor?: string;
15
+ accounts: ComAtprotoAdminDefs.AccountView[];
16
+ [k: string]: unknown;
17
+ }
18
+ export type HandlerInput = undefined;
19
+ export interface HandlerSuccess {
20
+ encoding: 'application/json';
21
+ body: OutputSchema;
22
+ headers?: {
23
+ [key: string]: string;
24
+ };
25
+ }
26
+ export interface HandlerError {
27
+ status: number;
28
+ message?: string;
29
+ }
30
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
31
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
32
+ auth: HA;
33
+ params: QueryParams;
34
+ input: HandlerInput;
35
+ req: express.Request;
36
+ res: express.Response;
37
+ };
38
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
39
+ //# sourceMappingURL=searchAccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchAccounts.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/signature/searchAccounts.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,mBAAmB,MAAM,iCAAiC,CAAA;AAEtE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,mBAAmB,CAAC,WAAW,EAAE,CAAA;IAC3C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=searchAccounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchAccounts.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/tools/ozone/signature/searchAccounts.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/pds",
3
- "version": "0.4.61",
3
+ "version": "0.4.62",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of atproto Personal Data Server (PDS)",
6
6
  "keywords": [
@@ -44,14 +44,14 @@
44
44
  "uint8arrays": "3.0.0",
45
45
  "undici": "^6.19.8",
46
46
  "zod": "^3.23.8",
47
- "@atproto-labs/fetch-node": "0.1.1",
48
- "@atproto/api": "^0.13.9",
47
+ "@atproto-labs/fetch-node": "0.1.2",
48
+ "@atproto/api": "^0.13.10",
49
49
  "@atproto/aws": "^0.2.7",
50
50
  "@atproto/common": "^0.4.4",
51
51
  "@atproto/crypto": "^0.4.1",
52
52
  "@atproto/identity": "^0.4.2",
53
53
  "@atproto/lexicon": "^0.4.2",
54
- "@atproto/oauth-provider": "^0.2.3",
54
+ "@atproto/oauth-provider": "^0.2.4",
55
55
  "@atproto/repo": "^0.5.3",
56
56
  "@atproto/syntax": "^0.3.0",
57
57
  "@atproto/xrpc": "^0.6.3",
@@ -73,8 +73,8 @@
73
73
  "jest": "^28.1.2",
74
74
  "ts-node": "^10.8.2",
75
75
  "ws": "^8.12.0",
76
- "@atproto/api": "^0.13.9",
77
- "@atproto/bsky": "^0.0.85",
76
+ "@atproto/api": "^0.13.10",
77
+ "@atproto/bsky": "^0.0.86",
78
78
  "@atproto/lex-cli": "^0.5.1"
79
79
  },
80
80
  "scripts": {
@@ -173,6 +173,9 @@ import * as ToolsOzoneModerationQueryEvents from './types/tools/ozone/moderation
173
173
  import * as ToolsOzoneModerationQueryStatuses from './types/tools/ozone/moderation/queryStatuses'
174
174
  import * as ToolsOzoneModerationSearchRepos from './types/tools/ozone/moderation/searchRepos'
175
175
  import * as ToolsOzoneServerGetConfig from './types/tools/ozone/server/getConfig'
176
+ import * as ToolsOzoneSignatureFindCorrelation from './types/tools/ozone/signature/findCorrelation'
177
+ import * as ToolsOzoneSignatureFindRelatedAccounts from './types/tools/ozone/signature/findRelatedAccounts'
178
+ import * as ToolsOzoneSignatureSearchAccounts from './types/tools/ozone/signature/searchAccounts'
176
179
  import * as ToolsOzoneTeamAddMember from './types/tools/ozone/team/addMember'
177
180
  import * as ToolsOzoneTeamDeleteMember from './types/tools/ozone/team/deleteMember'
178
181
  import * as ToolsOzoneTeamListMembers from './types/tools/ozone/team/listMembers'
@@ -2161,6 +2164,7 @@ export class ToolsOzoneNS {
2161
2164
  communication: ToolsOzoneCommunicationNS
2162
2165
  moderation: ToolsOzoneModerationNS
2163
2166
  server: ToolsOzoneServerNS
2167
+ signature: ToolsOzoneSignatureNS
2164
2168
  team: ToolsOzoneTeamNS
2165
2169
 
2166
2170
  constructor(server: Server) {
@@ -2168,6 +2172,7 @@ export class ToolsOzoneNS {
2168
2172
  this.communication = new ToolsOzoneCommunicationNS(server)
2169
2173
  this.moderation = new ToolsOzoneModerationNS(server)
2170
2174
  this.server = new ToolsOzoneServerNS(server)
2175
+ this.signature = new ToolsOzoneSignatureNS(server)
2171
2176
  this.team = new ToolsOzoneTeamNS(server)
2172
2177
  }
2173
2178
  }
@@ -2350,6 +2355,47 @@ export class ToolsOzoneServerNS {
2350
2355
  }
2351
2356
  }
2352
2357
 
2358
+ export class ToolsOzoneSignatureNS {
2359
+ _server: Server
2360
+
2361
+ constructor(server: Server) {
2362
+ this._server = server
2363
+ }
2364
+
2365
+ findCorrelation<AV extends AuthVerifier>(
2366
+ cfg: ConfigOf<
2367
+ AV,
2368
+ ToolsOzoneSignatureFindCorrelation.Handler<ExtractAuth<AV>>,
2369
+ ToolsOzoneSignatureFindCorrelation.HandlerReqCtx<ExtractAuth<AV>>
2370
+ >,
2371
+ ) {
2372
+ const nsid = 'tools.ozone.signature.findCorrelation' // @ts-ignore
2373
+ return this._server.xrpc.method(nsid, cfg)
2374
+ }
2375
+
2376
+ findRelatedAccounts<AV extends AuthVerifier>(
2377
+ cfg: ConfigOf<
2378
+ AV,
2379
+ ToolsOzoneSignatureFindRelatedAccounts.Handler<ExtractAuth<AV>>,
2380
+ ToolsOzoneSignatureFindRelatedAccounts.HandlerReqCtx<ExtractAuth<AV>>
2381
+ >,
2382
+ ) {
2383
+ const nsid = 'tools.ozone.signature.findRelatedAccounts' // @ts-ignore
2384
+ return this._server.xrpc.method(nsid, cfg)
2385
+ }
2386
+
2387
+ searchAccounts<AV extends AuthVerifier>(
2388
+ cfg: ConfigOf<
2389
+ AV,
2390
+ ToolsOzoneSignatureSearchAccounts.Handler<ExtractAuth<AV>>,
2391
+ ToolsOzoneSignatureSearchAccounts.HandlerReqCtx<ExtractAuth<AV>>
2392
+ >,
2393
+ ) {
2394
+ const nsid = 'tools.ozone.signature.searchAccounts' // @ts-ignore
2395
+ return this._server.xrpc.method(nsid, cfg)
2396
+ }
2397
+ }
2398
+
2353
2399
  export class ToolsOzoneTeamNS {
2354
2400
  _server: Server
2355
2401
 
@@ -12139,6 +12139,181 @@ export const schemaDict = {
12139
12139
  },
12140
12140
  },
12141
12141
  },
12142
+ ToolsOzoneSignatureDefs: {
12143
+ lexicon: 1,
12144
+ id: 'tools.ozone.signature.defs',
12145
+ defs: {
12146
+ sigDetail: {
12147
+ type: 'object',
12148
+ required: ['property', 'value'],
12149
+ properties: {
12150
+ property: {
12151
+ type: 'string',
12152
+ },
12153
+ value: {
12154
+ type: 'string',
12155
+ },
12156
+ },
12157
+ },
12158
+ },
12159
+ },
12160
+ ToolsOzoneSignatureFindCorrelation: {
12161
+ lexicon: 1,
12162
+ id: 'tools.ozone.signature.findCorrelation',
12163
+ defs: {
12164
+ main: {
12165
+ type: 'query',
12166
+ description:
12167
+ 'Find all correlated threat signatures between 2 or more accounts.',
12168
+ parameters: {
12169
+ type: 'params',
12170
+ required: ['dids'],
12171
+ properties: {
12172
+ dids: {
12173
+ type: 'array',
12174
+ items: {
12175
+ type: 'string',
12176
+ format: 'did',
12177
+ },
12178
+ },
12179
+ },
12180
+ },
12181
+ output: {
12182
+ encoding: 'application/json',
12183
+ schema: {
12184
+ type: 'object',
12185
+ required: ['details'],
12186
+ properties: {
12187
+ details: {
12188
+ type: 'array',
12189
+ items: {
12190
+ type: 'ref',
12191
+ ref: 'lex:tools.ozone.signature.defs#sigDetail',
12192
+ },
12193
+ },
12194
+ },
12195
+ },
12196
+ },
12197
+ },
12198
+ },
12199
+ },
12200
+ ToolsOzoneSignatureFindRelatedAccounts: {
12201
+ lexicon: 1,
12202
+ id: 'tools.ozone.signature.findRelatedAccounts',
12203
+ defs: {
12204
+ main: {
12205
+ type: 'query',
12206
+ description:
12207
+ 'Get accounts that share some matching threat signatures with the root account.',
12208
+ parameters: {
12209
+ type: 'params',
12210
+ required: ['did'],
12211
+ properties: {
12212
+ did: {
12213
+ type: 'string',
12214
+ format: 'did',
12215
+ },
12216
+ cursor: {
12217
+ type: 'string',
12218
+ },
12219
+ limit: {
12220
+ type: 'integer',
12221
+ minimum: 1,
12222
+ maximum: 100,
12223
+ default: 50,
12224
+ },
12225
+ },
12226
+ },
12227
+ output: {
12228
+ encoding: 'application/json',
12229
+ schema: {
12230
+ type: 'object',
12231
+ required: ['accounts'],
12232
+ properties: {
12233
+ cursor: {
12234
+ type: 'string',
12235
+ },
12236
+ accounts: {
12237
+ type: 'array',
12238
+ items: {
12239
+ type: 'ref',
12240
+ ref: 'lex:tools.ozone.signature.findRelatedAccounts#relatedAccount',
12241
+ },
12242
+ },
12243
+ },
12244
+ },
12245
+ },
12246
+ },
12247
+ relatedAccount: {
12248
+ type: 'object',
12249
+ required: ['account'],
12250
+ properties: {
12251
+ account: {
12252
+ type: 'ref',
12253
+ ref: 'lex:com.atproto.admin.defs#accountView',
12254
+ },
12255
+ similarities: {
12256
+ type: 'array',
12257
+ items: {
12258
+ type: 'ref',
12259
+ ref: 'lex:tools.ozone.signature.defs#sigDetail',
12260
+ },
12261
+ },
12262
+ },
12263
+ },
12264
+ },
12265
+ },
12266
+ ToolsOzoneSignatureSearchAccounts: {
12267
+ lexicon: 1,
12268
+ id: 'tools.ozone.signature.searchAccounts',
12269
+ defs: {
12270
+ main: {
12271
+ type: 'query',
12272
+ description:
12273
+ 'Search for accounts that match one or more threat signature values.',
12274
+ parameters: {
12275
+ type: 'params',
12276
+ required: ['values'],
12277
+ properties: {
12278
+ values: {
12279
+ type: 'array',
12280
+ items: {
12281
+ type: 'string',
12282
+ },
12283
+ },
12284
+ cursor: {
12285
+ type: 'string',
12286
+ },
12287
+ limit: {
12288
+ type: 'integer',
12289
+ minimum: 1,
12290
+ maximum: 100,
12291
+ default: 50,
12292
+ },
12293
+ },
12294
+ },
12295
+ output: {
12296
+ encoding: 'application/json',
12297
+ schema: {
12298
+ type: 'object',
12299
+ required: ['accounts'],
12300
+ properties: {
12301
+ cursor: {
12302
+ type: 'string',
12303
+ },
12304
+ accounts: {
12305
+ type: 'array',
12306
+ items: {
12307
+ type: 'ref',
12308
+ ref: 'lex:com.atproto.admin.defs#accountView',
12309
+ },
12310
+ },
12311
+ },
12312
+ },
12313
+ },
12314
+ },
12315
+ },
12316
+ },
12142
12317
  ToolsOzoneTeamAddMember: {
12143
12318
  lexicon: 1,
12144
12319
  id: 'tools.ozone.team.addMember',
@@ -12589,6 +12764,11 @@ export const ids = {
12589
12764
  ToolsOzoneModerationQueryStatuses: 'tools.ozone.moderation.queryStatuses',
12590
12765
  ToolsOzoneModerationSearchRepos: 'tools.ozone.moderation.searchRepos',
12591
12766
  ToolsOzoneServerGetConfig: 'tools.ozone.server.getConfig',
12767
+ ToolsOzoneSignatureDefs: 'tools.ozone.signature.defs',
12768
+ ToolsOzoneSignatureFindCorrelation: 'tools.ozone.signature.findCorrelation',
12769
+ ToolsOzoneSignatureFindRelatedAccounts:
12770
+ 'tools.ozone.signature.findRelatedAccounts',
12771
+ ToolsOzoneSignatureSearchAccounts: 'tools.ozone.signature.searchAccounts',
12592
12772
  ToolsOzoneTeamAddMember: 'tools.ozone.team.addMember',
12593
12773
  ToolsOzoneTeamDefs: 'tools.ozone.team.defs',
12594
12774
  ToolsOzoneTeamDeleteMember: 'tools.ozone.team.deleteMember',
@@ -0,0 +1,25 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { lexicons } from '../../../../lexicons'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { CID } from 'multiformats/cid'
8
+
9
+ export interface SigDetail {
10
+ property: string
11
+ value: string
12
+ [k: string]: unknown
13
+ }
14
+
15
+ export function isSigDetail(v: unknown): v is SigDetail {
16
+ return (
17
+ isObj(v) &&
18
+ hasProp(v, '$type') &&
19
+ v.$type === 'tools.ozone.signature.defs#sigDetail'
20
+ )
21
+ }
22
+
23
+ export function validateSigDetail(v: unknown): ValidationResult {
24
+ return lexicons.validate('tools.ozone.signature.defs#sigDetail', v)
25
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+ import * as ToolsOzoneSignatureDefs from './defs'
11
+
12
+ export interface QueryParams {
13
+ dids: string[]
14
+ }
15
+
16
+ export type InputSchema = undefined
17
+
18
+ export interface OutputSchema {
19
+ details: ToolsOzoneSignatureDefs.SigDetail[]
20
+ [k: string]: unknown
21
+ }
22
+
23
+ export type HandlerInput = undefined
24
+
25
+ export interface HandlerSuccess {
26
+ encoding: 'application/json'
27
+ body: OutputSchema
28
+ headers?: { [key: string]: string }
29
+ }
30
+
31
+ export interface HandlerError {
32
+ status: number
33
+ message?: string
34
+ }
35
+
36
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
37
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
38
+ auth: HA
39
+ params: QueryParams
40
+ input: HandlerInput
41
+ req: express.Request
42
+ res: express.Response
43
+ }
44
+ export type Handler<HA extends HandlerAuth = never> = (
45
+ ctx: HandlerReqCtx<HA>,
46
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -0,0 +1,71 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+ import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs'
11
+ import * as ToolsOzoneSignatureDefs from './defs'
12
+
13
+ export interface QueryParams {
14
+ did: string
15
+ cursor?: string
16
+ limit: number
17
+ }
18
+
19
+ export type InputSchema = undefined
20
+
21
+ export interface OutputSchema {
22
+ cursor?: string
23
+ accounts: RelatedAccount[]
24
+ [k: string]: unknown
25
+ }
26
+
27
+ export type HandlerInput = undefined
28
+
29
+ export interface HandlerSuccess {
30
+ encoding: 'application/json'
31
+ body: OutputSchema
32
+ headers?: { [key: string]: string }
33
+ }
34
+
35
+ export interface HandlerError {
36
+ status: number
37
+ message?: string
38
+ }
39
+
40
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
41
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
42
+ auth: HA
43
+ params: QueryParams
44
+ input: HandlerInput
45
+ req: express.Request
46
+ res: express.Response
47
+ }
48
+ export type Handler<HA extends HandlerAuth = never> = (
49
+ ctx: HandlerReqCtx<HA>,
50
+ ) => Promise<HandlerOutput> | HandlerOutput
51
+
52
+ export interface RelatedAccount {
53
+ account: ComAtprotoAdminDefs.AccountView
54
+ similarities?: ToolsOzoneSignatureDefs.SigDetail[]
55
+ [k: string]: unknown
56
+ }
57
+
58
+ export function isRelatedAccount(v: unknown): v is RelatedAccount {
59
+ return (
60
+ isObj(v) &&
61
+ hasProp(v, '$type') &&
62
+ v.$type === 'tools.ozone.signature.findRelatedAccounts#relatedAccount'
63
+ )
64
+ }
65
+
66
+ export function validateRelatedAccount(v: unknown): ValidationResult {
67
+ return lexicons.validate(
68
+ 'tools.ozone.signature.findRelatedAccounts#relatedAccount',
69
+ v,
70
+ )
71
+ }