@atproto/api 0.13.8 → 0.13.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/client/index.d.ts +6 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +17 -4
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +85 -0
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +93 -0
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/com/atproto/repo/getRecord.d.ts +4 -1
  11. package/dist/client/types/com/atproto/repo/getRecord.d.ts.map +1 -1
  12. package/dist/client/types/com/atproto/repo/getRecord.js +15 -1
  13. package/dist/client/types/com/atproto/repo/getRecord.js.map +1 -1
  14. package/dist/client/types/tools/ozone/moderation/getRecords.d.ts +27 -0
  15. package/dist/client/types/tools/ozone/moderation/getRecords.d.ts.map +1 -0
  16. package/dist/client/types/tools/ozone/moderation/getRecords.js +8 -0
  17. package/dist/client/types/tools/ozone/moderation/getRecords.js.map +1 -0
  18. package/dist/client/types/tools/ozone/moderation/getRepos.d.ts +27 -0
  19. package/dist/client/types/tools/ozone/moderation/getRepos.d.ts.map +1 -0
  20. package/dist/client/types/tools/ozone/moderation/getRepos.js +8 -0
  21. package/dist/client/types/tools/ozone/moderation/getRepos.js.map +1 -0
  22. package/package.json +1 -1
  23. package/src/client/index.ts +33 -6
  24. package/src/client/lexicons.ts +93 -0
  25. package/src/client/types/com/atproto/repo/getRecord.ts +10 -0
  26. package/src/client/types/tools/ozone/moderation/getRecords.ts +39 -0
  27. package/src/client/types/tools/ozone/moderation/getRepos.ts +39 -0
  28. package/tests/{bsky-agent.test.ts → atp-agent.test.ts} +42 -42
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * GENERATED CODE - DO NOT MODIFY
3
3
  */
4
- import { HeadersMap } from '@atproto/xrpc';
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc';
5
5
  export interface QueryParams {
6
6
  /** The handle or DID of the repo. */
7
7
  repo: string;
@@ -28,5 +28,8 @@ export interface Response {
28
28
  headers: HeadersMap;
29
29
  data: OutputSchema;
30
30
  }
31
+ export declare class RecordNotFoundError extends XRPCError {
32
+ constructor(src: XRPCError);
33
+ }
31
34
  export declare function toKnownErr(e: any): any;
32
35
  //# sourceMappingURL=getRecord.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/repo/getRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AAMrD,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,mGAAmG;IACnG,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,EAAE,CAAA;IACT,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;IACnB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAEhC"}
1
+ {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/repo/getRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAMrD,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,mGAAmG;IACnG,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,EAAE,CAAA;IACT,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;IACnB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,qBAAa,mBAAoB,SAAQ,SAAS;gBACpC,GAAG,EAAE,SAAS;CAG3B;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAMhC"}
@@ -1,7 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toKnownErr = void 0;
3
+ exports.toKnownErr = exports.RecordNotFoundError = void 0;
4
+ /**
5
+ * GENERATED CODE - DO NOT MODIFY
6
+ */
7
+ const xrpc_1 = require("@atproto/xrpc");
8
+ class RecordNotFoundError extends xrpc_1.XRPCError {
9
+ constructor(src) {
10
+ super(src.status, src.error, src.message, src.headers, { cause: src });
11
+ }
12
+ }
13
+ exports.RecordNotFoundError = RecordNotFoundError;
4
14
  function toKnownErr(e) {
15
+ if (e instanceof xrpc_1.XRPCError) {
16
+ if (e.error === 'RecordNotFound')
17
+ return new RecordNotFoundError(e);
18
+ }
5
19
  return e;
6
20
  }
7
21
  exports.toKnownErr = toKnownErr;
@@ -1 +1 @@
1
- {"version":3,"file":"getRecord.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/repo/getRecord.ts"],"names":[],"mappings":";;;AAwCA,SAAgB,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,gCAEC"}
1
+ {"version":3,"file":"getRecord.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/repo/getRecord.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,wCAAqD;AAqCrD,MAAa,mBAAoB,SAAQ,gBAAS;IAChD,YAAY,GAAc;QACxB,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;IACxE,CAAC;CACF;AAJD,kDAIC;AAED,SAAgB,UAAU,CAAC,CAAM;IAC/B,IAAI,CAAC,YAAY,gBAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,CAAC,KAAK,KAAK,gBAAgB;YAAE,OAAO,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAA;IACrE,CAAC;IAED,OAAO,CAAC,CAAA;AACV,CAAC;AAND,gCAMC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap } from '@atproto/xrpc';
5
+ import * as ToolsOzoneModerationDefs from './defs';
6
+ export interface QueryParams {
7
+ uris: string[];
8
+ }
9
+ export type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ records: (ToolsOzoneModerationDefs.RecordViewDetail | ToolsOzoneModerationDefs.RecordViewNotFound | {
12
+ $type: string;
13
+ [k: string]: unknown;
14
+ })[];
15
+ [k: string]: unknown;
16
+ }
17
+ export interface CallOptions {
18
+ signal?: AbortSignal;
19
+ headers?: HeadersMap;
20
+ }
21
+ export interface Response {
22
+ success: boolean;
23
+ headers: HeadersMap;
24
+ data: OutputSchema;
25
+ }
26
+ export declare function toKnownErr(e: any): any;
27
+ //# sourceMappingURL=getRecords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRecords.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/moderation/getRecords.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AAKrD,OAAO,KAAK,wBAAwB,MAAM,QAAQ,CAAA;AAElD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,CACL,wBAAwB,CAAC,gBAAgB,GACzC,wBAAwB,CAAC,kBAAkB,GAC3C;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAC1C,EAAE,CAAA;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;IACnB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAEhC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toKnownErr = void 0;
4
+ function toKnownErr(e) {
5
+ return e;
6
+ }
7
+ exports.toKnownErr = toKnownErr;
8
+ //# sourceMappingURL=getRecords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRecords.js","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/moderation/getRecords.ts"],"names":[],"mappings":";;;AAoCA,SAAgB,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,gCAEC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap } from '@atproto/xrpc';
5
+ import * as ToolsOzoneModerationDefs from './defs';
6
+ export interface QueryParams {
7
+ dids: string[];
8
+ }
9
+ export type InputSchema = undefined;
10
+ export interface OutputSchema {
11
+ repos: (ToolsOzoneModerationDefs.RepoViewDetail | ToolsOzoneModerationDefs.RepoViewNotFound | {
12
+ $type: string;
13
+ [k: string]: unknown;
14
+ })[];
15
+ [k: string]: unknown;
16
+ }
17
+ export interface CallOptions {
18
+ signal?: AbortSignal;
19
+ headers?: HeadersMap;
20
+ }
21
+ export interface Response {
22
+ success: boolean;
23
+ headers: HeadersMap;
24
+ data: OutputSchema;
25
+ }
26
+ export declare function toKnownErr(e: any): any;
27
+ //# sourceMappingURL=getRepos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/moderation/getRepos.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AAKrD,OAAO,KAAK,wBAAwB,MAAM,QAAQ,CAAA;AAElD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,CACH,wBAAwB,CAAC,cAAc,GACvC,wBAAwB,CAAC,gBAAgB,GACzC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAC1C,EAAE,CAAA;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;IACnB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAEhC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toKnownErr = void 0;
4
+ function toKnownErr(e) {
5
+ return e;
6
+ }
7
+ exports.toKnownErr = toKnownErr;
8
+ //# sourceMappingURL=getRepos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRepos.js","sourceRoot":"","sources":["../../../../../../src/client/types/tools/ozone/moderation/getRepos.ts"],"names":[],"mappings":";;;AAoCA,SAAgB,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,gCAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.13.8",
3
+ "version": "0.13.9",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -199,7 +199,9 @@ import * as ToolsOzoneModerationDefs from './types/tools/ozone/moderation/defs'
199
199
  import * as ToolsOzoneModerationEmitEvent from './types/tools/ozone/moderation/emitEvent'
200
200
  import * as ToolsOzoneModerationGetEvent from './types/tools/ozone/moderation/getEvent'
201
201
  import * as ToolsOzoneModerationGetRecord from './types/tools/ozone/moderation/getRecord'
202
+ import * as ToolsOzoneModerationGetRecords from './types/tools/ozone/moderation/getRecords'
202
203
  import * as ToolsOzoneModerationGetRepo from './types/tools/ozone/moderation/getRepo'
204
+ import * as ToolsOzoneModerationGetRepos from './types/tools/ozone/moderation/getRepos'
203
205
  import * as ToolsOzoneModerationQueryEvents from './types/tools/ozone/moderation/queryEvents'
204
206
  import * as ToolsOzoneModerationQueryStatuses from './types/tools/ozone/moderation/queryStatuses'
205
207
  import * as ToolsOzoneModerationSearchRepos from './types/tools/ozone/moderation/searchRepos'
@@ -405,7 +407,9 @@ export * as ToolsOzoneModerationDefs from './types/tools/ozone/moderation/defs'
405
407
  export * as ToolsOzoneModerationEmitEvent from './types/tools/ozone/moderation/emitEvent'
406
408
  export * as ToolsOzoneModerationGetEvent from './types/tools/ozone/moderation/getEvent'
407
409
  export * as ToolsOzoneModerationGetRecord from './types/tools/ozone/moderation/getRecord'
410
+ export * as ToolsOzoneModerationGetRecords from './types/tools/ozone/moderation/getRecords'
408
411
  export * as ToolsOzoneModerationGetRepo from './types/tools/ozone/moderation/getRepo'
412
+ export * as ToolsOzoneModerationGetRepos from './types/tools/ozone/moderation/getRepos'
409
413
  export * as ToolsOzoneModerationQueryEvents from './types/tools/ozone/moderation/queryEvents'
410
414
  export * as ToolsOzoneModerationQueryStatuses from './types/tools/ozone/moderation/queryStatuses'
411
415
  export * as ToolsOzoneModerationSearchRepos from './types/tools/ozone/moderation/searchRepos'
@@ -862,12 +866,11 @@ export class ComAtprotoRepoNS {
862
866
  params?: ComAtprotoRepoGetRecord.QueryParams,
863
867
  opts?: ComAtprotoRepoGetRecord.CallOptions,
864
868
  ): Promise<ComAtprotoRepoGetRecord.Response> {
865
- return this._client.call(
866
- 'com.atproto.repo.getRecord',
867
- params,
868
- undefined,
869
- opts,
870
- )
869
+ return this._client
870
+ .call('com.atproto.repo.getRecord', params, undefined, opts)
871
+ .catch((e) => {
872
+ throw ComAtprotoRepoGetRecord.toKnownErr(e)
873
+ })
871
874
  }
872
875
 
873
876
  importRepo(
@@ -3499,6 +3502,18 @@ export class ToolsOzoneModerationNS {
3499
3502
  })
3500
3503
  }
3501
3504
 
3505
+ getRecords(
3506
+ params?: ToolsOzoneModerationGetRecords.QueryParams,
3507
+ opts?: ToolsOzoneModerationGetRecords.CallOptions,
3508
+ ): Promise<ToolsOzoneModerationGetRecords.Response> {
3509
+ return this._client.call(
3510
+ 'tools.ozone.moderation.getRecords',
3511
+ params,
3512
+ undefined,
3513
+ opts,
3514
+ )
3515
+ }
3516
+
3502
3517
  getRepo(
3503
3518
  params?: ToolsOzoneModerationGetRepo.QueryParams,
3504
3519
  opts?: ToolsOzoneModerationGetRepo.CallOptions,
@@ -3510,6 +3525,18 @@ export class ToolsOzoneModerationNS {
3510
3525
  })
3511
3526
  }
3512
3527
 
3528
+ getRepos(
3529
+ params?: ToolsOzoneModerationGetRepos.QueryParams,
3530
+ opts?: ToolsOzoneModerationGetRepos.CallOptions,
3531
+ ): Promise<ToolsOzoneModerationGetRepos.Response> {
3532
+ return this._client.call(
3533
+ 'tools.ozone.moderation.getRepos',
3534
+ params,
3535
+ undefined,
3536
+ opts,
3537
+ )
3538
+ }
3539
+
3513
3540
  queryEvents(
3514
3541
  params?: ToolsOzoneModerationQueryEvents.QueryParams,
3515
3542
  opts?: ToolsOzoneModerationQueryEvents.CallOptions,
@@ -1686,6 +1686,11 @@ export const schemaDict = {
1686
1686
  },
1687
1687
  },
1688
1688
  },
1689
+ errors: [
1690
+ {
1691
+ name: 'RecordNotFound',
1692
+ },
1693
+ ],
1689
1694
  },
1690
1695
  },
1691
1696
  },
@@ -11643,6 +11648,49 @@ export const schemaDict = {
11643
11648
  },
11644
11649
  },
11645
11650
  },
11651
+ ToolsOzoneModerationGetRecords: {
11652
+ lexicon: 1,
11653
+ id: 'tools.ozone.moderation.getRecords',
11654
+ defs: {
11655
+ main: {
11656
+ type: 'query',
11657
+ description: 'Get details about some records.',
11658
+ parameters: {
11659
+ type: 'params',
11660
+ required: ['uris'],
11661
+ properties: {
11662
+ uris: {
11663
+ type: 'array',
11664
+ maxLength: 100,
11665
+ items: {
11666
+ type: 'string',
11667
+ format: 'at-uri',
11668
+ },
11669
+ },
11670
+ },
11671
+ },
11672
+ output: {
11673
+ encoding: 'application/json',
11674
+ schema: {
11675
+ type: 'object',
11676
+ required: ['records'],
11677
+ properties: {
11678
+ records: {
11679
+ type: 'array',
11680
+ items: {
11681
+ type: 'union',
11682
+ refs: [
11683
+ 'lex:tools.ozone.moderation.defs#recordViewDetail',
11684
+ 'lex:tools.ozone.moderation.defs#recordViewNotFound',
11685
+ ],
11686
+ },
11687
+ },
11688
+ },
11689
+ },
11690
+ },
11691
+ },
11692
+ },
11693
+ },
11646
11694
  ToolsOzoneModerationGetRepo: {
11647
11695
  lexicon: 1,
11648
11696
  id: 'tools.ozone.moderation.getRepo',
@@ -11675,6 +11723,49 @@ export const schemaDict = {
11675
11723
  },
11676
11724
  },
11677
11725
  },
11726
+ ToolsOzoneModerationGetRepos: {
11727
+ lexicon: 1,
11728
+ id: 'tools.ozone.moderation.getRepos',
11729
+ defs: {
11730
+ main: {
11731
+ type: 'query',
11732
+ description: 'Get details about some repositories.',
11733
+ parameters: {
11734
+ type: 'params',
11735
+ required: ['dids'],
11736
+ properties: {
11737
+ dids: {
11738
+ type: 'array',
11739
+ maxLength: 100,
11740
+ items: {
11741
+ type: 'string',
11742
+ format: 'did',
11743
+ },
11744
+ },
11745
+ },
11746
+ },
11747
+ output: {
11748
+ encoding: 'application/json',
11749
+ schema: {
11750
+ type: 'object',
11751
+ required: ['repos'],
11752
+ properties: {
11753
+ repos: {
11754
+ type: 'array',
11755
+ items: {
11756
+ type: 'union',
11757
+ refs: [
11758
+ 'lex:tools.ozone.moderation.defs#repoViewDetail',
11759
+ 'lex:tools.ozone.moderation.defs#repoViewNotFound',
11760
+ ],
11761
+ },
11762
+ },
11763
+ },
11764
+ },
11765
+ },
11766
+ },
11767
+ },
11768
+ },
11678
11769
  ToolsOzoneModerationQueryEvents: {
11679
11770
  lexicon: 1,
11680
11771
  id: 'tools.ozone.moderation.queryEvents',
@@ -12491,7 +12582,9 @@ export const ids = {
12491
12582
  ToolsOzoneModerationEmitEvent: 'tools.ozone.moderation.emitEvent',
12492
12583
  ToolsOzoneModerationGetEvent: 'tools.ozone.moderation.getEvent',
12493
12584
  ToolsOzoneModerationGetRecord: 'tools.ozone.moderation.getRecord',
12585
+ ToolsOzoneModerationGetRecords: 'tools.ozone.moderation.getRecords',
12494
12586
  ToolsOzoneModerationGetRepo: 'tools.ozone.moderation.getRepo',
12587
+ ToolsOzoneModerationGetRepos: 'tools.ozone.moderation.getRepos',
12495
12588
  ToolsOzoneModerationQueryEvents: 'tools.ozone.moderation.queryEvents',
12496
12589
  ToolsOzoneModerationQueryStatuses: 'tools.ozone.moderation.queryStatuses',
12497
12590
  ToolsOzoneModerationSearchRepos: 'tools.ozone.moderation.searchRepos',
@@ -38,6 +38,16 @@ export interface Response {
38
38
  data: OutputSchema
39
39
  }
40
40
 
41
+ export class RecordNotFoundError extends XRPCError {
42
+ constructor(src: XRPCError) {
43
+ super(src.status, src.error, src.message, src.headers, { cause: src })
44
+ }
45
+ }
46
+
41
47
  export function toKnownErr(e: any) {
48
+ if (e instanceof XRPCError) {
49
+ if (e.error === 'RecordNotFound') return new RecordNotFoundError(e)
50
+ }
51
+
42
52
  return e
43
53
  }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import { CID } from 'multiformats/cid'
9
+ import * as ToolsOzoneModerationDefs from './defs'
10
+
11
+ export interface QueryParams {
12
+ uris: string[]
13
+ }
14
+
15
+ export type InputSchema = undefined
16
+
17
+ export interface OutputSchema {
18
+ records: (
19
+ | ToolsOzoneModerationDefs.RecordViewDetail
20
+ | ToolsOzoneModerationDefs.RecordViewNotFound
21
+ | { $type: string; [k: string]: unknown }
22
+ )[]
23
+ [k: string]: unknown
24
+ }
25
+
26
+ export interface CallOptions {
27
+ signal?: AbortSignal
28
+ headers?: HeadersMap
29
+ }
30
+
31
+ export interface Response {
32
+ success: boolean
33
+ headers: HeadersMap
34
+ data: OutputSchema
35
+ }
36
+
37
+ export function toKnownErr(e: any) {
38
+ return e
39
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import { CID } from 'multiformats/cid'
9
+ import * as ToolsOzoneModerationDefs from './defs'
10
+
11
+ export interface QueryParams {
12
+ dids: string[]
13
+ }
14
+
15
+ export type InputSchema = undefined
16
+
17
+ export interface OutputSchema {
18
+ repos: (
19
+ | ToolsOzoneModerationDefs.RepoViewDetail
20
+ | ToolsOzoneModerationDefs.RepoViewNotFound
21
+ | { $type: string; [k: string]: unknown }
22
+ )[]
23
+ [k: string]: unknown
24
+ }
25
+
26
+ export interface CallOptions {
27
+ signal?: AbortSignal
28
+ headers?: HeadersMap
29
+ }
30
+
31
+ export interface Response {
32
+ success: boolean
33
+ headers: HeadersMap
34
+ data: OutputSchema
35
+ }
36
+
37
+ export function toKnownErr(e: any) {
38
+ return e
39
+ }