@atproto/api 0.14.20 → 0.14.22

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 (36) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/client/index.d.ts +7 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +26 -7
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +256 -6
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +135 -3
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/app/bsky/unspecced/getSuggestedUsers.d.ts +1 -1
  11. package/dist/client/types/app/bsky/unspecced/getSuggestedUsers.d.ts.map +1 -1
  12. package/dist/client/types/com/atproto/sync/defs.d.ts +2 -0
  13. package/dist/client/types/com/atproto/sync/defs.d.ts.map +1 -0
  14. package/dist/client/types/com/atproto/sync/defs.js +7 -0
  15. package/dist/client/types/com/atproto/sync/defs.js.map +1 -0
  16. package/dist/client/types/com/atproto/sync/getHostStatus.d.ts +32 -0
  17. package/dist/client/types/com/atproto/sync/getHostStatus.d.ts.map +1 -0
  18. package/dist/client/types/com/atproto/sync/getHostStatus.js +26 -0
  19. package/dist/client/types/com/atproto/sync/getHostStatus.js.map +1 -0
  20. package/dist/client/types/com/atproto/sync/listHosts.d.ts +38 -0
  21. package/dist/client/types/com/atproto/sync/listHosts.d.ts.map +1 -0
  22. package/dist/client/types/com/atproto/sync/listHosts.js +20 -0
  23. package/dist/client/types/com/atproto/sync/listHosts.js.map +1 -0
  24. package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +4 -1
  25. package/dist/client/types/com/atproto/sync/requestCrawl.d.ts.map +1 -1
  26. package/dist/client/types/com/atproto/sync/requestCrawl.js +15 -0
  27. package/dist/client/types/com/atproto/sync/requestCrawl.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/client/index.ts +34 -6
  30. package/src/client/lexicons.ts +142 -3
  31. package/src/client/types/app/bsky/unspecced/getSuggestedUsers.ts +1 -1
  32. package/src/client/types/com/atproto/sync/defs.ts +23 -0
  33. package/src/client/types/com/atproto/sync/getHostStatus.ts +58 -0
  34. package/src/client/types/com/atproto/sync/listHosts.ts +65 -0
  35. package/src/client/types/com/atproto/sync/requestCrawl.ts +10 -0
  36. package/tsconfig.build.tsbuildinfo +1 -1
@@ -10,7 +10,7 @@ export interface QueryParams {
10
10
  }
11
11
  export type InputSchema = undefined;
12
12
  export interface OutputSchema {
13
- actors: AppBskyActorDefs.ProfileViewBasic[];
13
+ actors: AppBskyActorDefs.ProfileView[];
14
14
  }
15
15
  export interface CallOptions {
16
16
  signal?: AbortSignal;
@@ -1 +1 @@
1
- {"version":3,"file":"getSuggestedUsers.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AASrD,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AAMzD,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,CAAA;CAC5C;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":"getSuggestedUsers.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AASrD,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AAMzD,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,gBAAgB,CAAC,WAAW,EAAE,CAAA;CACvC;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,2 @@
1
+ export type HostStatus = 'active' | 'idle' | 'offline' | 'throttled' | 'banned' | (string & {});
2
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/defs.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,MAAM,GACN,SAAS,GACT,WAAW,GACX,QAAQ,GACR,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lexicons_1 = require("../../../../lexicons");
4
+ const util_1 = require("../../../../util");
5
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
6
+ const id = 'com.atproto.sync.defs';
7
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/defs.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,uBAAuB,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc';
5
+ import type * as ComAtprotoSyncDefs from './defs.js';
6
+ export interface QueryParams {
7
+ /** Hostname of the host (eg, PDS or relay) being queried. */
8
+ hostname: string;
9
+ }
10
+ export type InputSchema = undefined;
11
+ export interface OutputSchema {
12
+ hostname: string;
13
+ /** Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). */
14
+ seq?: number;
15
+ /** Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts. */
16
+ accountCount?: number;
17
+ status?: ComAtprotoSyncDefs.HostStatus;
18
+ }
19
+ export interface CallOptions {
20
+ signal?: AbortSignal;
21
+ headers?: HeadersMap;
22
+ }
23
+ export interface Response {
24
+ success: boolean;
25
+ headers: HeadersMap;
26
+ data: OutputSchema;
27
+ }
28
+ export declare class HostNotFoundError extends XRPCError {
29
+ constructor(src: XRPCError);
30
+ }
31
+ export declare function toKnownErr(e: any): any;
32
+ //# sourceMappingURL=getHostStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHostStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/getHostStatus.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AASrD,OAAO,KAAK,KAAK,kBAAkB,MAAM,WAAW,CAAA;AAMpD,MAAM,WAAW,WAAW;IAC1B,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,0IAA0I;IAC1I,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4IAA4I;IAC5I,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAA;CACvC;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,iBAAkB,SAAQ,SAAS;gBAClC,GAAG,EAAE,SAAS;CAG3B;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAMhC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HostNotFoundError = void 0;
4
+ exports.toKnownErr = toKnownErr;
5
+ /**
6
+ * GENERATED CODE - DO NOT MODIFY
7
+ */
8
+ const xrpc_1 = require("@atproto/xrpc");
9
+ const lexicons_1 = require("../../../../lexicons");
10
+ const util_1 = require("../../../../util");
11
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
12
+ const id = 'com.atproto.sync.getHostStatus';
13
+ class HostNotFoundError extends xrpc_1.XRPCError {
14
+ constructor(src) {
15
+ super(src.status, src.error, src.message, src.headers, { cause: src });
16
+ }
17
+ }
18
+ exports.HostNotFoundError = HostNotFoundError;
19
+ function toKnownErr(e) {
20
+ if (e instanceof xrpc_1.XRPCError) {
21
+ if (e.error === 'HostNotFound')
22
+ return new HostNotFoundError(e);
23
+ }
24
+ return e;
25
+ }
26
+ //# sourceMappingURL=getHostStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHostStatus.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/getHostStatus.ts"],"names":[],"mappings":";;;AAmDA,gCAMC;AAzDD;;GAEG;AACH,wCAAqD;AAGrD,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,gCAAgC,CAAA;AA6B3C,MAAa,iBAAkB,SAAQ,gBAAS;IAC9C,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,8CAIC;AAED,SAAgB,UAAU,CAAC,CAAM;IAC/B,IAAI,CAAC,YAAY,gBAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,CAAC,KAAK,KAAK,cAAc;YAAE,OAAO,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAA;IACjE,CAAC;IAED,OAAO,CAAC,CAAA;AACV,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap } from '@atproto/xrpc';
5
+ import { type ValidationResult } from '@atproto/lexicon';
6
+ import type * as ComAtprotoSyncDefs from './defs.js';
7
+ export interface QueryParams {
8
+ limit?: number;
9
+ cursor?: string;
10
+ }
11
+ export type InputSchema = undefined;
12
+ export interface OutputSchema {
13
+ cursor?: string;
14
+ /** Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first. */
15
+ hosts: Host[];
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
+ export interface Host {
28
+ $type?: 'com.atproto.sync.listHosts#host';
29
+ /** hostname of server; not a URL (no scheme) */
30
+ hostname: string;
31
+ /** Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). */
32
+ seq?: number;
33
+ accountCount?: number;
34
+ status?: ComAtprotoSyncDefs.HostStatus;
35
+ }
36
+ export declare function isHost<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.sync.listHosts", "host">;
37
+ export declare function validateHost<V>(v: V): ValidationResult<Host & V>;
38
+ //# sourceMappingURL=listHosts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listHosts.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/listHosts.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAQjE,OAAO,KAAK,KAAK,kBAAkB,MAAM,WAAW,CAAA;AAMpD,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+HAA+H;IAC/H,KAAK,EAAE,IAAI,EAAE,CAAA;CACd;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;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,CAAC,EAAE,iCAAiC,CAAA;IACzC,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAA;IAChB,0IAA0I;IAC1I,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAA;CACvC;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,yFAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toKnownErr = toKnownErr;
4
+ exports.isHost = isHost;
5
+ exports.validateHost = validateHost;
6
+ const lexicons_1 = require("../../../../lexicons");
7
+ const util_1 = require("../../../../util");
8
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
9
+ const id = 'com.atproto.sync.listHosts';
10
+ function toKnownErr(e) {
11
+ return e;
12
+ }
13
+ const hashHost = 'host';
14
+ function isHost(v) {
15
+ return is$typed(v, id, hashHost);
16
+ }
17
+ function validateHost(v) {
18
+ return validate(v, id, hashHost);
19
+ }
20
+ //# sourceMappingURL=listHosts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listHosts.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/listHosts.ts"],"names":[],"mappings":";;AA0CA,gCAEC;AAcD,wBAEC;AAED,oCAEC;AA1DD,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,4BAA4B,CAAA;AA0BvC,SAAgB,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC;AAYD,MAAM,QAAQ,GAAG,MAAM,CAAA;AAEvB,SAAgB,MAAM,CAAI,CAAI;IAC5B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;AAClC,CAAC;AAED,SAAgB,YAAY,CAAI,CAAI;IAClC,OAAO,QAAQ,CAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;AAC5C,CAAC"}
@@ -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
  }
7
7
  export interface InputSchema {
@@ -18,5 +18,8 @@ export interface Response {
18
18
  success: boolean;
19
19
  headers: HeadersMap;
20
20
  }
21
+ export declare class HostBannedError extends XRPCError {
22
+ constructor(src: XRPCError);
23
+ }
21
24
  export declare function toKnownErr(e: any): any;
22
25
  //# sourceMappingURL=requestCrawl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"requestCrawl.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/requestCrawl.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AAcrD,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAEhC"}
1
+ {"version":3,"file":"requestCrawl.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/requestCrawl.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAcrD,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;CACpB;AAED,qBAAa,eAAgB,SAAQ,SAAS;gBAChC,GAAG,EAAE,SAAS;CAG3B;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAMhC"}
@@ -1,11 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HostBannedError = void 0;
3
4
  exports.toKnownErr = toKnownErr;
5
+ /**
6
+ * GENERATED CODE - DO NOT MODIFY
7
+ */
8
+ const xrpc_1 = require("@atproto/xrpc");
4
9
  const lexicons_1 = require("../../../../lexicons");
5
10
  const util_1 = require("../../../../util");
6
11
  const is$typed = util_1.is$typed, validate = lexicons_1.validate;
7
12
  const id = 'com.atproto.sync.requestCrawl';
13
+ class HostBannedError extends xrpc_1.XRPCError {
14
+ constructor(src) {
15
+ super(src.status, src.error, src.message, src.headers, { cause: src });
16
+ }
17
+ }
18
+ exports.HostBannedError = HostBannedError;
8
19
  function toKnownErr(e) {
20
+ if (e instanceof xrpc_1.XRPCError) {
21
+ if (e.error === 'HostBanned')
22
+ return new HostBannedError(e);
23
+ }
9
24
  return e;
10
25
  }
11
26
  //# sourceMappingURL=requestCrawl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"requestCrawl.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/requestCrawl.ts"],"names":[],"mappings":";;AAoCA,gCAEC;AAhCD,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,+BAA+B,CAAA;AAqB1C,SAAgB,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC"}
1
+ {"version":3,"file":"requestCrawl.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/requestCrawl.ts"],"names":[],"mappings":";;;AA0CA,gCAMC;AAhDD;;GAEG;AACH,wCAAqD;AAGrD,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,+BAA+B,CAAA;AAqB1C,MAAa,eAAgB,SAAQ,gBAAS;IAC5C,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,0CAIC;AAED,SAAgB,UAAU,CAAC,CAAM;IAC/B,IAAI,CAAC,YAAY,gBAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,CAAC,KAAK,KAAK,YAAY;YAAE,OAAO,IAAI,eAAe,CAAC,CAAC,CAAC,CAAA;IAC7D,CAAC;IAED,OAAO,CAAC,CAAA;AACV,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.14.20",
3
+ "version": "0.14.22",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -79,15 +79,18 @@ import * as ComAtprotoServerReserveSigningKey from './types/com/atproto/server/r
79
79
  import * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword.js'
80
80
  import * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword.js'
81
81
  import * as ComAtprotoServerUpdateEmail from './types/com/atproto/server/updateEmail.js'
82
+ import * as ComAtprotoSyncDefs from './types/com/atproto/sync/defs.js'
82
83
  import * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob.js'
83
84
  import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks.js'
84
85
  import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout.js'
85
86
  import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead.js'
87
+ import * as ComAtprotoSyncGetHostStatus from './types/com/atproto/sync/getHostStatus.js'
86
88
  import * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit.js'
87
89
  import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord.js'
88
90
  import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo.js'
89
91
  import * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus.js'
90
92
  import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs.js'
93
+ import * as ComAtprotoSyncListHosts from './types/com/atproto/sync/listHosts.js'
91
94
  import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos.js'
92
95
  import * as ComAtprotoSyncListReposByCollection from './types/com/atproto/sync/listReposByCollection.js'
93
96
  import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate.js'
@@ -329,15 +332,18 @@ export * as ComAtprotoServerReserveSigningKey from './types/com/atproto/server/r
329
332
  export * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword.js'
330
333
  export * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword.js'
331
334
  export * as ComAtprotoServerUpdateEmail from './types/com/atproto/server/updateEmail.js'
335
+ export * as ComAtprotoSyncDefs from './types/com/atproto/sync/defs.js'
332
336
  export * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob.js'
333
337
  export * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks.js'
334
338
  export * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout.js'
335
339
  export * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead.js'
340
+ export * as ComAtprotoSyncGetHostStatus from './types/com/atproto/sync/getHostStatus.js'
336
341
  export * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit.js'
337
342
  export * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord.js'
338
343
  export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo.js'
339
344
  export * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus.js'
340
345
  export * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs.js'
346
+ export * as ComAtprotoSyncListHosts from './types/com/atproto/sync/listHosts.js'
341
347
  export * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos.js'
342
348
  export * as ComAtprotoSyncListReposByCollection from './types/com/atproto/sync/listReposByCollection.js'
343
349
  export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate.js'
@@ -1494,6 +1500,17 @@ export class ComAtprotoSyncNS {
1494
1500
  })
1495
1501
  }
1496
1502
 
1503
+ getHostStatus(
1504
+ params?: ComAtprotoSyncGetHostStatus.QueryParams,
1505
+ opts?: ComAtprotoSyncGetHostStatus.CallOptions,
1506
+ ): Promise<ComAtprotoSyncGetHostStatus.Response> {
1507
+ return this._client
1508
+ .call('com.atproto.sync.getHostStatus', params, undefined, opts)
1509
+ .catch((e) => {
1510
+ throw ComAtprotoSyncGetHostStatus.toKnownErr(e)
1511
+ })
1512
+ }
1513
+
1497
1514
  getLatestCommit(
1498
1515
  params?: ComAtprotoSyncGetLatestCommit.QueryParams,
1499
1516
  opts?: ComAtprotoSyncGetLatestCommit.CallOptions,
@@ -1549,6 +1566,18 @@ export class ComAtprotoSyncNS {
1549
1566
  })
1550
1567
  }
1551
1568
 
1569
+ listHosts(
1570
+ params?: ComAtprotoSyncListHosts.QueryParams,
1571
+ opts?: ComAtprotoSyncListHosts.CallOptions,
1572
+ ): Promise<ComAtprotoSyncListHosts.Response> {
1573
+ return this._client.call(
1574
+ 'com.atproto.sync.listHosts',
1575
+ params,
1576
+ undefined,
1577
+ opts,
1578
+ )
1579
+ }
1580
+
1552
1581
  listRepos(
1553
1582
  params?: ComAtprotoSyncListRepos.QueryParams,
1554
1583
  opts?: ComAtprotoSyncListRepos.CallOptions,
@@ -1589,12 +1618,11 @@ export class ComAtprotoSyncNS {
1589
1618
  data?: ComAtprotoSyncRequestCrawl.InputSchema,
1590
1619
  opts?: ComAtprotoSyncRequestCrawl.CallOptions,
1591
1620
  ): Promise<ComAtprotoSyncRequestCrawl.Response> {
1592
- return this._client.call(
1593
- 'com.atproto.sync.requestCrawl',
1594
- opts?.qp,
1595
- data,
1596
- opts,
1597
- )
1621
+ return this._client
1622
+ .call('com.atproto.sync.requestCrawl', opts?.qp, data, opts)
1623
+ .catch((e) => {
1624
+ throw ComAtprotoSyncRequestCrawl.toKnownErr(e)
1625
+ })
1598
1626
  }
1599
1627
  }
1600
1628
 
@@ -3365,6 +3365,16 @@ export const schemaDict = {
3365
3365
  },
3366
3366
  },
3367
3367
  },
3368
+ ComAtprotoSyncDefs: {
3369
+ lexicon: 1,
3370
+ id: 'com.atproto.sync.defs',
3371
+ defs: {
3372
+ hostStatus: {
3373
+ type: 'string',
3374
+ knownValues: ['active', 'idle', 'offline', 'throttled', 'banned'],
3375
+ },
3376
+ },
3377
+ },
3368
3378
  ComAtprotoSyncGetBlob: {
3369
3379
  lexicon: 1,
3370
3380
  id: 'com.atproto.sync.getBlob',
@@ -3525,6 +3535,59 @@ export const schemaDict = {
3525
3535
  },
3526
3536
  },
3527
3537
  },
3538
+ ComAtprotoSyncGetHostStatus: {
3539
+ lexicon: 1,
3540
+ id: 'com.atproto.sync.getHostStatus',
3541
+ defs: {
3542
+ main: {
3543
+ type: 'query',
3544
+ description:
3545
+ 'Returns information about a specified upstream host, as consumed by the server. Implemented by relays.',
3546
+ parameters: {
3547
+ type: 'params',
3548
+ required: ['hostname'],
3549
+ properties: {
3550
+ hostname: {
3551
+ type: 'string',
3552
+ description:
3553
+ 'Hostname of the host (eg, PDS or relay) being queried.',
3554
+ },
3555
+ },
3556
+ },
3557
+ output: {
3558
+ encoding: 'application/json',
3559
+ schema: {
3560
+ type: 'object',
3561
+ required: ['hostname'],
3562
+ properties: {
3563
+ hostname: {
3564
+ type: 'string',
3565
+ },
3566
+ seq: {
3567
+ type: 'integer',
3568
+ description:
3569
+ 'Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).',
3570
+ },
3571
+ accountCount: {
3572
+ type: 'integer',
3573
+ description:
3574
+ 'Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts.',
3575
+ },
3576
+ status: {
3577
+ type: 'ref',
3578
+ ref: 'lex:com.atproto.sync.defs#hostStatus',
3579
+ },
3580
+ },
3581
+ },
3582
+ },
3583
+ errors: [
3584
+ {
3585
+ name: 'HostNotFound',
3586
+ },
3587
+ ],
3588
+ },
3589
+ },
3590
+ },
3528
3591
  ComAtprotoSyncGetLatestCommit: {
3529
3592
  lexicon: 1,
3530
3593
  id: 'com.atproto.sync.getLatestCommit',
@@ -3805,6 +3868,74 @@ export const schemaDict = {
3805
3868
  },
3806
3869
  },
3807
3870
  },
3871
+ ComAtprotoSyncListHosts: {
3872
+ lexicon: 1,
3873
+ id: 'com.atproto.sync.listHosts',
3874
+ defs: {
3875
+ main: {
3876
+ type: 'query',
3877
+ description:
3878
+ 'Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.',
3879
+ parameters: {
3880
+ type: 'params',
3881
+ properties: {
3882
+ limit: {
3883
+ type: 'integer',
3884
+ minimum: 1,
3885
+ maximum: 1000,
3886
+ default: 200,
3887
+ },
3888
+ cursor: {
3889
+ type: 'string',
3890
+ },
3891
+ },
3892
+ },
3893
+ output: {
3894
+ encoding: 'application/json',
3895
+ schema: {
3896
+ type: 'object',
3897
+ required: ['hosts'],
3898
+ properties: {
3899
+ cursor: {
3900
+ type: 'string',
3901
+ },
3902
+ hosts: {
3903
+ type: 'array',
3904
+ items: {
3905
+ type: 'ref',
3906
+ ref: 'lex:com.atproto.sync.listHosts#host',
3907
+ },
3908
+ description:
3909
+ 'Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first.',
3910
+ },
3911
+ },
3912
+ },
3913
+ },
3914
+ },
3915
+ host: {
3916
+ type: 'object',
3917
+ required: ['hostname'],
3918
+ properties: {
3919
+ hostname: {
3920
+ type: 'string',
3921
+ description: 'hostname of server; not a URL (no scheme)',
3922
+ },
3923
+ seq: {
3924
+ type: 'integer',
3925
+ description:
3926
+ 'Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).',
3927
+ },
3928
+ accountCount: {
3929
+ type: 'integer',
3930
+ },
3931
+ status: {
3932
+ type: 'ref',
3933
+ ref: 'lex:com.atproto.sync.defs#hostStatus',
3934
+ },
3935
+ },
3936
+ },
3937
+ },
3938
+ },
3808
3939
  ComAtprotoSyncListRepos: {
3809
3940
  lexicon: 1,
3810
3941
  id: 'com.atproto.sync.listRepos',
@@ -3992,6 +4123,11 @@ export const schemaDict = {
3992
4123
  },
3993
4124
  },
3994
4125
  },
4126
+ errors: [
4127
+ {
4128
+ name: 'HostBanned',
4129
+ },
4130
+ ],
3995
4131
  },
3996
4132
  },
3997
4133
  },
@@ -10078,7 +10214,7 @@ export const schemaDict = {
10078
10214
  type: 'array',
10079
10215
  items: {
10080
10216
  type: 'ref',
10081
- ref: 'lex:app.bsky.actor.defs#profileViewBasic',
10217
+ ref: 'lex:app.bsky.actor.defs#profileView',
10082
10218
  },
10083
10219
  },
10084
10220
  },
@@ -10928,7 +11064,7 @@ export const schemaDict = {
10928
11064
  value: {
10929
11065
  type: 'string',
10930
11066
  minLength: 1,
10931
- maxLength: 32,
11067
+ maxLength: 64,
10932
11068
  minGraphemes: 1,
10933
11069
  maxGraphemes: 1,
10934
11070
  },
@@ -11714,7 +11850,7 @@ export const schemaDict = {
11714
11850
  value: {
11715
11851
  type: 'string',
11716
11852
  minLength: 1,
11717
- maxLength: 32,
11853
+ maxLength: 64,
11718
11854
  minGraphemes: 1,
11719
11855
  maxGraphemes: 1,
11720
11856
  },
@@ -15315,15 +15451,18 @@ export const ids = {
15315
15451
  ComAtprotoServerResetPassword: 'com.atproto.server.resetPassword',
15316
15452
  ComAtprotoServerRevokeAppPassword: 'com.atproto.server.revokeAppPassword',
15317
15453
  ComAtprotoServerUpdateEmail: 'com.atproto.server.updateEmail',
15454
+ ComAtprotoSyncDefs: 'com.atproto.sync.defs',
15318
15455
  ComAtprotoSyncGetBlob: 'com.atproto.sync.getBlob',
15319
15456
  ComAtprotoSyncGetBlocks: 'com.atproto.sync.getBlocks',
15320
15457
  ComAtprotoSyncGetCheckout: 'com.atproto.sync.getCheckout',
15321
15458
  ComAtprotoSyncGetHead: 'com.atproto.sync.getHead',
15459
+ ComAtprotoSyncGetHostStatus: 'com.atproto.sync.getHostStatus',
15322
15460
  ComAtprotoSyncGetLatestCommit: 'com.atproto.sync.getLatestCommit',
15323
15461
  ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
15324
15462
  ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
15325
15463
  ComAtprotoSyncGetRepoStatus: 'com.atproto.sync.getRepoStatus',
15326
15464
  ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs',
15465
+ ComAtprotoSyncListHosts: 'com.atproto.sync.listHosts',
15327
15466
  ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos',
15328
15467
  ComAtprotoSyncListReposByCollection: 'com.atproto.sync.listReposByCollection',
15329
15468
  ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
@@ -25,7 +25,7 @@ export interface QueryParams {
25
25
  export type InputSchema = undefined
26
26
 
27
27
  export interface OutputSchema {
28
- actors: AppBskyActorDefs.ProfileViewBasic[]
28
+ actors: AppBskyActorDefs.ProfileView[]
29
29
  }
30
30
 
31
31
  export interface CallOptions {
@@ -0,0 +1,23 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'com.atproto.sync.defs'
16
+
17
+ export type HostStatus =
18
+ | 'active'
19
+ | 'idle'
20
+ | 'offline'
21
+ | 'throttled'
22
+ | 'banned'
23
+ | (string & {})
@@ -0,0 +1,58 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import type * as ComAtprotoSyncDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'com.atproto.sync.getHostStatus'
18
+
19
+ export interface QueryParams {
20
+ /** Hostname of the host (eg, PDS or relay) being queried. */
21
+ hostname: string
22
+ }
23
+
24
+ export type InputSchema = undefined
25
+
26
+ export interface OutputSchema {
27
+ hostname: string
28
+ /** Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). */
29
+ seq?: number
30
+ /** Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts. */
31
+ accountCount?: number
32
+ status?: ComAtprotoSyncDefs.HostStatus
33
+ }
34
+
35
+ export interface CallOptions {
36
+ signal?: AbortSignal
37
+ headers?: HeadersMap
38
+ }
39
+
40
+ export interface Response {
41
+ success: boolean
42
+ headers: HeadersMap
43
+ data: OutputSchema
44
+ }
45
+
46
+ export class HostNotFoundError extends XRPCError {
47
+ constructor(src: XRPCError) {
48
+ super(src.status, src.error, src.message, src.headers, { cause: src })
49
+ }
50
+ }
51
+
52
+ export function toKnownErr(e: any) {
53
+ if (e instanceof XRPCError) {
54
+ if (e.error === 'HostNotFound') return new HostNotFoundError(e)
55
+ }
56
+
57
+ return e
58
+ }