@atproto/api 0.12.13 → 0.12.14

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 (58) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/client/index.d.ts +3 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +13 -4
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +105 -0
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +185 -4
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/chat/bsky/convo/defs.d.ts +1 -1
  11. package/dist/client/types/com/atproto/sync/getBlob.d.ts +16 -1
  12. package/dist/client/types/com/atproto/sync/getBlob.d.ts.map +1 -1
  13. package/dist/client/types/com/atproto/sync/getBlob.js +41 -1
  14. package/dist/client/types/com/atproto/sync/getBlob.js.map +1 -1
  15. package/dist/client/types/com/atproto/sync/getBlocks.d.ts +16 -1
  16. package/dist/client/types/com/atproto/sync/getBlocks.d.ts.map +1 -1
  17. package/dist/client/types/com/atproto/sync/getBlocks.js +41 -1
  18. package/dist/client/types/com/atproto/sync/getBlocks.js.map +1 -1
  19. package/dist/client/types/com/atproto/sync/getLatestCommit.d.ts +9 -0
  20. package/dist/client/types/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
  21. package/dist/client/types/com/atproto/sync/getLatestCommit.js +25 -1
  22. package/dist/client/types/com/atproto/sync/getLatestCommit.js.map +1 -1
  23. package/dist/client/types/com/atproto/sync/getRecord.d.ts +16 -1
  24. package/dist/client/types/com/atproto/sync/getRecord.d.ts.map +1 -1
  25. package/dist/client/types/com/atproto/sync/getRecord.js +41 -1
  26. package/dist/client/types/com/atproto/sync/getRecord.js.map +1 -1
  27. package/dist/client/types/com/atproto/sync/getRepo.d.ts +13 -1
  28. package/dist/client/types/com/atproto/sync/getRepo.d.ts.map +1 -1
  29. package/dist/client/types/com/atproto/sync/getRepo.js +33 -1
  30. package/dist/client/types/com/atproto/sync/getRepo.js.map +1 -1
  31. package/dist/client/types/com/atproto/sync/getRepoStatus.d.ts +31 -0
  32. package/dist/client/types/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
  33. package/dist/client/types/com/atproto/sync/getRepoStatus.js +22 -0
  34. package/dist/client/types/com/atproto/sync/getRepoStatus.js.map +1 -0
  35. package/dist/client/types/com/atproto/sync/listBlobs.d.ts +13 -1
  36. package/dist/client/types/com/atproto/sync/listBlobs.d.ts.map +1 -1
  37. package/dist/client/types/com/atproto/sync/listBlobs.js +33 -1
  38. package/dist/client/types/com/atproto/sync/listBlobs.js.map +1 -1
  39. package/dist/client/types/com/atproto/sync/listRepos.d.ts +3 -0
  40. package/dist/client/types/com/atproto/sync/listRepos.d.ts.map +1 -1
  41. package/dist/client/types/com/atproto/sync/listRepos.js.map +1 -1
  42. package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +18 -3
  43. package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
  44. package/dist/client/types/com/atproto/sync/subscribeRepos.js +11 -1
  45. package/dist/client/types/com/atproto/sync/subscribeRepos.js.map +1 -1
  46. package/package.json +1 -1
  47. package/src/client/index.ts +13 -0
  48. package/src/client/lexicons.ts +193 -7
  49. package/src/client/types/chat/bsky/convo/defs.ts +1 -1
  50. package/src/client/types/com/atproto/sync/getBlob.ts +35 -0
  51. package/src/client/types/com/atproto/sync/getBlocks.ts +35 -0
  52. package/src/client/types/com/atproto/sync/getLatestCommit.ts +21 -0
  53. package/src/client/types/com/atproto/sync/getRecord.ts +35 -0
  54. package/src/client/types/com/atproto/sync/getRepo.ts +28 -0
  55. package/src/client/types/com/atproto/sync/getRepoStatus.ts +48 -0
  56. package/src/client/types/com/atproto/sync/listBlobs.ts +28 -0
  57. package/src/client/types/com/atproto/sync/listRepos.ts +3 -0
  58. package/src/client/types/com/atproto/sync/subscribeRepos.ts +29 -3
@@ -1 +1 @@
1
- {"version":3,"file":"listRepos.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,wCAAkD;AAElD,2CAAiD;AACjD,mDAA+C;AA0B/C,SAAgB,UAAU,CAAC,CAAM;IAC/B,IAAI,CAAC,YAAY,gBAAS,EAAE,CAAC;IAC7B,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC;AAJD,gCAIC;AAUD,SAAgB,MAAM,CAAC,CAAU;IAC/B,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,iCAAiC,CAC9C,CAAA;AACH,CAAC;AAND,wBAMC;AAED,SAAgB,YAAY,CAAC,CAAU;IACrC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,iCAAiC,EAAE,CAAC,CAAC,CAAA;AAChE,CAAC;AAFD,oCAEC"}
1
+ {"version":3,"file":"listRepos.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,wCAAkD;AAElD,2CAAiD;AACjD,mDAA+C;AA0B/C,SAAgB,UAAU,CAAC,CAAM;IAC/B,IAAI,CAAC,YAAY,gBAAS,EAAE,CAAC;IAC7B,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC;AAJD,gCAIC;AAaD,SAAgB,MAAM,CAAC,CAAU;IAC/B,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,iCAAiC,CAC9C,CAAA;AACH,CAAC;AAND,wBAMC;AAED,SAAgB,YAAY,CAAC,CAAU;IACrC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,iCAAiC,EAAE,CAAC,CAAC,CAAA;AAChE,CAAC;AAFD,oCAEC"}
@@ -33,11 +33,26 @@ export interface Identity {
33
33
  seq: number;
34
34
  did: string;
35
35
  time: string;
36
+ /** The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. */
37
+ handle?: string;
36
38
  [k: string]: unknown;
37
39
  }
38
40
  export declare function isIdentity(v: unknown): v is Identity;
39
41
  export declare function validateIdentity(v: unknown): ValidationResult;
40
- /** Represents an update of the account's handle, or transition to/from invalid state. NOTE: Will be deprecated in favor of #identity. */
42
+ /** Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active. */
43
+ export interface Account {
44
+ seq: number;
45
+ did: string;
46
+ time: string;
47
+ /** Indicates that the account has a repository which can be fetched from the host that emitted this event. */
48
+ active: boolean;
49
+ /** If active=false, this optional field indicates a reason for why the account is not active. */
50
+ status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | (string & {});
51
+ [k: string]: unknown;
52
+ }
53
+ export declare function isAccount(v: unknown): v is Account;
54
+ export declare function validateAccount(v: unknown): ValidationResult;
55
+ /** DEPRECATED -- Use #identity event instead */
41
56
  export interface Handle {
42
57
  seq: number;
43
58
  did: string;
@@ -47,7 +62,7 @@ export interface Handle {
47
62
  }
48
63
  export declare function isHandle(v: unknown): v is Handle;
49
64
  export declare function validateHandle(v: unknown): ValidationResult;
50
- /** Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead */
65
+ /** DEPRECATED -- Use #account event instead */
51
66
  export interface Migrate {
52
67
  seq: number;
53
68
  did: string;
@@ -57,7 +72,7 @@ export interface Migrate {
57
72
  }
58
73
  export declare function isMigrate(v: unknown): v is Migrate;
59
74
  export declare function validateMigrate(v: unknown): ValidationResult;
60
- /** Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event */
75
+ /** DEPRECATED -- Use #account event instead */
61
76
  export interface Tombstone {
62
77
  seq: number;
63
78
  did: string;
@@ -1 +1 @@
1
- {"version":3,"file":"subscribeRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAG5D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,6JAA6J;AAC7J,MAAM,WAAW,MAAM;IACrB,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAA;IACX,2BAA2B;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,yJAAyJ;IACzJ,MAAM,EAAE,OAAO,CAAA;IACf,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,8BAA8B;IAC9B,MAAM,EAAE,GAAG,CAAA;IACX,qHAAqH;IACrH,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACjB,gJAAgJ;IAChJ,GAAG,EAAE,MAAM,CAAA;IACX,kEAAkE;IAClE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,oFAAoF;IACpF,MAAM,EAAE,UAAU,CAAA;IAClB,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,KAAK,EAAE,GAAG,EAAE,CAAA;IACZ,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAMhD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE3D;AAED,mMAAmM;AACnM,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAA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AC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,IAAI,CAM5C;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAEzD;AAED,0DAA0D;AAC1D,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,GAAG,EAAE,GAAG,GAAG,IAAI,CAAA;IACf,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAMhD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE3D"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateRepoOp = exports.isRepoOp = exports.validateInfo = exports.isInfo = exports.validateTombstone = exports.isTombstone = exports.validateMigrate = exports.isMigrate = exports.validateHandle = exports.isHandle = exports.validateIdentity = exports.isIdentity = exports.validateCommit = exports.isCommit = void 0;
3
+ exports.validateRepoOp = exports.isRepoOp = exports.validateInfo = exports.isInfo = exports.validateTombstone = exports.isTombstone = exports.validateMigrate = exports.isMigrate = exports.validateHandle = exports.isHandle = exports.validateAccount = exports.isAccount = exports.validateIdentity = exports.isIdentity = exports.validateCommit = exports.isCommit = void 0;
4
4
  const util_1 = require("../../../../util");
5
5
  const lexicons_1 = require("../../../../lexicons");
6
6
  function isCommit(v) {
@@ -23,6 +23,16 @@ function validateIdentity(v) {
23
23
  return lexicons_1.lexicons.validate('com.atproto.sync.subscribeRepos#identity', v);
24
24
  }
25
25
  exports.validateIdentity = validateIdentity;
26
+ function isAccount(v) {
27
+ return ((0, util_1.isObj)(v) &&
28
+ (0, util_1.hasProp)(v, '$type') &&
29
+ v.$type === 'com.atproto.sync.subscribeRepos#account');
30
+ }
31
+ exports.isAccount = isAccount;
32
+ function validateAccount(v) {
33
+ return lexicons_1.lexicons.validate('com.atproto.sync.subscribeRepos#account', v);
34
+ }
35
+ exports.validateAccount = validateAccount;
26
36
  function isHandle(v) {
27
37
  return ((0, util_1.isObj)(v) &&
28
38
  (0, util_1.hasProp)(v, '$type') &&
@@ -1 +1 @@
1
- {"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":";;;AAKA,2CAAiD;AACjD,mDAA+C;AA8B/C,SAAgB,QAAQ,CAAC,CAAU;IACjC,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;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAA;AACvE,CAAC;AAFD,wCAEC;AAUD,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,0CAA0C,CACvD,CAAA;AACH,CAAC;AAND,gCAMC;AAED,SAAgB,gBAAgB,CAAC,CAAU;IACzC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,0CAA0C,EAAE,CAAC,CAAC,CAAA;AACzE,CAAC;AAFD,4CAEC;AAWD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,C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,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,wCAAwC,CACrD,CAAA;AACH,CAAC;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAA;AACvE,CAAC;AAFD,wCAEC"}
1
+ {"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":";;;AAKA,2CAAiD;AACjD,mDAA+C;AA8B/C,SAAgB,QAAQ,CAAC,CAAU;IACjC,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;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAA;AACvE,CAAC;AAFD,wCAEC;AAYD,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,0CAA0C,CACvD,CAAA;AACH,CAAC;AAND,gCAMC;AAED,SAAgB,gBAAgB,CAAC,CAAU;IACzC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,0CAA0C,EAAE,CAAC,CAAC,CAAA;AACzE,CAAC;AAFD,4CAEC;AAcD,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,yCAAyC,CACtD,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AAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,sCAAsC,CACnD,CAAA;AACH,CAAC;AAND,wBAMC;AAED,SAAgB,YAAY,CAAC,CAAU;IACrC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAA;AACrE,CAAC;AAFD,oCAEC;AAWD,SAAgB,QAAQ,CAAC,CAAU;IACjC,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;AAND,4BAMC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAA;AACvE,CAAC;AAFD,wCAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.12.13",
3
+ "version": "0.12.14",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -76,6 +76,7 @@ import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
76
76
  import * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit'
77
77
  import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
78
78
  import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
79
+ import * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus'
79
80
  import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'
80
81
  import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'
81
82
  import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
@@ -257,6 +258,7 @@ export * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
257
258
  export * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit'
258
259
  export * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
259
260
  export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
261
+ export * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus'
260
262
  export * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'
261
263
  export * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'
262
264
  export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
@@ -1229,6 +1231,17 @@ export class ComAtprotoSyncNS {
1229
1231
  })
1230
1232
  }
1231
1233
 
1234
+ getRepoStatus(
1235
+ params?: ComAtprotoSyncGetRepoStatus.QueryParams,
1236
+ opts?: ComAtprotoSyncGetRepoStatus.CallOptions,
1237
+ ): Promise<ComAtprotoSyncGetRepoStatus.Response> {
1238
+ return this._service.xrpc
1239
+ .call('com.atproto.sync.getRepoStatus', params, undefined, opts)
1240
+ .catch((e) => {
1241
+ throw ComAtprotoSyncGetRepoStatus.toKnownErr(e)
1242
+ })
1243
+ }
1244
+
1232
1245
  listBlobs(
1233
1246
  params?: ComAtprotoSyncListBlobs.QueryParams,
1234
1247
  opts?: ComAtprotoSyncListBlobs.CallOptions,
@@ -2912,6 +2912,23 @@ export const schemaDict = {
2912
2912
  output: {
2913
2913
  encoding: '*/*',
2914
2914
  },
2915
+ errors: [
2916
+ {
2917
+ name: 'BlobNotFound',
2918
+ },
2919
+ {
2920
+ name: 'RepoNotFound',
2921
+ },
2922
+ {
2923
+ name: 'RepoTakendown',
2924
+ },
2925
+ {
2926
+ name: 'RepoSuspended',
2927
+ },
2928
+ {
2929
+ name: 'RepoDeactivated',
2930
+ },
2931
+ ],
2915
2932
  },
2916
2933
  },
2917
2934
  },
@@ -2944,6 +2961,23 @@ export const schemaDict = {
2944
2961
  output: {
2945
2962
  encoding: 'application/vnd.ipld.car',
2946
2963
  },
2964
+ errors: [
2965
+ {
2966
+ name: 'BlockNotFound',
2967
+ },
2968
+ {
2969
+ name: 'RepoNotFound',
2970
+ },
2971
+ {
2972
+ name: 'RepoTakendown',
2973
+ },
2974
+ {
2975
+ name: 'RepoSuspended',
2976
+ },
2977
+ {
2978
+ name: 'RepoDeactivated',
2979
+ },
2980
+ ],
2947
2981
  },
2948
2982
  },
2949
2983
  },
@@ -3050,6 +3084,15 @@ export const schemaDict = {
3050
3084
  {
3051
3085
  name: 'RepoNotFound',
3052
3086
  },
3087
+ {
3088
+ name: 'RepoTakendown',
3089
+ },
3090
+ {
3091
+ name: 'RepoSuspended',
3092
+ },
3093
+ {
3094
+ name: 'RepoDeactivated',
3095
+ },
3053
3096
  ],
3054
3097
  },
3055
3098
  },
@@ -3090,6 +3133,23 @@ export const schemaDict = {
3090
3133
  output: {
3091
3134
  encoding: 'application/vnd.ipld.car',
3092
3135
  },
3136
+ errors: [
3137
+ {
3138
+ name: 'RecordNotFound',
3139
+ },
3140
+ {
3141
+ name: 'RepoNotFound',
3142
+ },
3143
+ {
3144
+ name: 'RepoTakendown',
3145
+ },
3146
+ {
3147
+ name: 'RepoSuspended',
3148
+ },
3149
+ {
3150
+ name: 'RepoDeactivated',
3151
+ },
3152
+ ],
3093
3153
  },
3094
3154
  },
3095
3155
  },
@@ -3120,6 +3180,74 @@ export const schemaDict = {
3120
3180
  output: {
3121
3181
  encoding: 'application/vnd.ipld.car',
3122
3182
  },
3183
+ errors: [
3184
+ {
3185
+ name: 'RepoNotFound',
3186
+ },
3187
+ {
3188
+ name: 'RepoTakendown',
3189
+ },
3190
+ {
3191
+ name: 'RepoSuspended',
3192
+ },
3193
+ {
3194
+ name: 'RepoDeactivated',
3195
+ },
3196
+ ],
3197
+ },
3198
+ },
3199
+ },
3200
+ ComAtprotoSyncGetRepoStatus: {
3201
+ lexicon: 1,
3202
+ id: 'com.atproto.sync.getRepoStatus',
3203
+ defs: {
3204
+ main: {
3205
+ type: 'query',
3206
+ description:
3207
+ 'Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.',
3208
+ parameters: {
3209
+ type: 'params',
3210
+ required: ['did'],
3211
+ properties: {
3212
+ did: {
3213
+ type: 'string',
3214
+ format: 'did',
3215
+ description: 'The DID of the repo.',
3216
+ },
3217
+ },
3218
+ },
3219
+ output: {
3220
+ encoding: 'application/json',
3221
+ schema: {
3222
+ type: 'object',
3223
+ required: ['did', 'active'],
3224
+ properties: {
3225
+ did: {
3226
+ type: 'string',
3227
+ format: 'did',
3228
+ },
3229
+ active: {
3230
+ type: 'boolean',
3231
+ },
3232
+ status: {
3233
+ type: 'string',
3234
+ description:
3235
+ 'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
3236
+ knownValues: ['takendown', 'suspended', 'deactivated'],
3237
+ },
3238
+ rev: {
3239
+ type: 'string',
3240
+ description:
3241
+ 'Optional field, the current rev of the repo, if active=true',
3242
+ },
3243
+ },
3244
+ },
3245
+ },
3246
+ errors: [
3247
+ {
3248
+ name: 'RepoNotFound',
3249
+ },
3250
+ ],
3123
3251
  },
3124
3252
  },
3125
3253
  },
@@ -3174,6 +3302,20 @@ export const schemaDict = {
3174
3302
  },
3175
3303
  },
3176
3304
  },
3305
+ errors: [
3306
+ {
3307
+ name: 'RepoNotFound',
3308
+ },
3309
+ {
3310
+ name: 'RepoTakendown',
3311
+ },
3312
+ {
3313
+ name: 'RepoSuspended',
3314
+ },
3315
+ {
3316
+ name: 'RepoDeactivated',
3317
+ },
3318
+ ],
3177
3319
  },
3178
3320
  },
3179
3321
  },
@@ -3235,6 +3377,15 @@ export const schemaDict = {
3235
3377
  rev: {
3236
3378
  type: 'string',
3237
3379
  },
3380
+ active: {
3381
+ type: 'boolean',
3382
+ },
3383
+ status: {
3384
+ type: 'string',
3385
+ description:
3386
+ 'If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.',
3387
+ knownValues: ['takendown', 'suspended', 'deactivated'],
3388
+ },
3238
3389
  },
3239
3390
  },
3240
3391
  },
@@ -3312,6 +3463,7 @@ export const schemaDict = {
3312
3463
  refs: [
3313
3464
  'lex:com.atproto.sync.subscribeRepos#commit',
3314
3465
  'lex:com.atproto.sync.subscribeRepos#identity',
3466
+ 'lex:com.atproto.sync.subscribeRepos#account',
3315
3467
  'lex:com.atproto.sync.subscribeRepos#handle',
3316
3468
  'lex:com.atproto.sync.subscribeRepos#migrate',
3317
3469
  'lex:com.atproto.sync.subscribeRepos#tombstone',
@@ -3435,12 +3587,47 @@ export const schemaDict = {
3435
3587
  type: 'string',
3436
3588
  format: 'datetime',
3437
3589
  },
3590
+ handle: {
3591
+ type: 'string',
3592
+ format: 'handle',
3593
+ description:
3594
+ "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details.",
3595
+ },
3438
3596
  },
3439
3597
  },
3440
- handle: {
3598
+ account: {
3441
3599
  type: 'object',
3442
3600
  description:
3443
- "Represents an update of the account's handle, or transition to/from invalid state. NOTE: Will be deprecated in favor of #identity.",
3601
+ "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",
3602
+ required: ['seq', 'did', 'time', 'active'],
3603
+ properties: {
3604
+ seq: {
3605
+ type: 'integer',
3606
+ },
3607
+ did: {
3608
+ type: 'string',
3609
+ format: 'did',
3610
+ },
3611
+ time: {
3612
+ type: 'string',
3613
+ format: 'datetime',
3614
+ },
3615
+ active: {
3616
+ type: 'boolean',
3617
+ description:
3618
+ 'Indicates that the account has a repository which can be fetched from the host that emitted this event.',
3619
+ },
3620
+ status: {
3621
+ type: 'string',
3622
+ description:
3623
+ 'If active=false, this optional field indicates a reason for why the account is not active.',
3624
+ knownValues: ['takendown', 'suspended', 'deleted', 'deactivated'],
3625
+ },
3626
+ },
3627
+ },
3628
+ handle: {
3629
+ type: 'object',
3630
+ description: 'DEPRECATED -- Use #identity event instead',
3444
3631
  required: ['seq', 'did', 'handle', 'time'],
3445
3632
  properties: {
3446
3633
  seq: {
@@ -3462,8 +3649,7 @@ export const schemaDict = {
3462
3649
  },
3463
3650
  migrate: {
3464
3651
  type: 'object',
3465
- description:
3466
- 'Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead',
3652
+ description: 'DEPRECATED -- Use #account event instead',
3467
3653
  required: ['seq', 'did', 'migrateTo', 'time'],
3468
3654
  nullable: ['migrateTo'],
3469
3655
  properties: {
@@ -3485,8 +3671,7 @@ export const schemaDict = {
3485
3671
  },
3486
3672
  tombstone: {
3487
3673
  type: 'object',
3488
- description:
3489
- 'Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event',
3674
+ description: 'DEPRECATED -- Use #account event instead',
3490
3675
  required: ['seq', 'did', 'time'],
3491
3676
  properties: {
3492
3677
  seq: {
@@ -8379,7 +8564,7 @@ export const schemaDict = {
8379
8564
  },
8380
8565
  embed: {
8381
8566
  type: 'union',
8382
- refs: ['lex:app.bsky.embed.record'],
8567
+ refs: ['lex:app.bsky.embed.record#view'],
8383
8568
  },
8384
8569
  sender: {
8385
8570
  type: 'ref',
@@ -10624,6 +10809,7 @@ export const ids = {
10624
10809
  ComAtprotoSyncGetLatestCommit: 'com.atproto.sync.getLatestCommit',
10625
10810
  ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
10626
10811
  ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
10812
+ ComAtprotoSyncGetRepoStatus: 'com.atproto.sync.getRepoStatus',
10627
10813
  ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs',
10628
10814
  ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos',
10629
10815
  ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
@@ -54,7 +54,7 @@ export interface MessageView {
54
54
  text: string
55
55
  /** Annotations of text (mentions, URLs, hashtags, etc) */
56
56
  facets?: AppBskyRichtextFacet.Main[]
57
- embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown }
57
+ embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown }
58
58
  sender: MessageViewSender
59
59
  sentAt: string
60
60
  [k: string]: unknown
@@ -26,8 +26,43 @@ export interface Response {
26
26
  data: Uint8Array
27
27
  }
28
28
 
29
+ export class BlobNotFoundError extends XRPCError {
30
+ constructor(src: XRPCError) {
31
+ super(src.status, src.error, src.message, src.headers)
32
+ }
33
+ }
34
+
35
+ export class RepoNotFoundError extends XRPCError {
36
+ constructor(src: XRPCError) {
37
+ super(src.status, src.error, src.message, src.headers)
38
+ }
39
+ }
40
+
41
+ export class RepoTakendownError extends XRPCError {
42
+ constructor(src: XRPCError) {
43
+ super(src.status, src.error, src.message, src.headers)
44
+ }
45
+ }
46
+
47
+ export class RepoSuspendedError extends XRPCError {
48
+ constructor(src: XRPCError) {
49
+ super(src.status, src.error, src.message, src.headers)
50
+ }
51
+ }
52
+
53
+ export class RepoDeactivatedError extends XRPCError {
54
+ constructor(src: XRPCError) {
55
+ super(src.status, src.error, src.message, src.headers)
56
+ }
57
+ }
58
+
29
59
  export function toKnownErr(e: any) {
30
60
  if (e instanceof XRPCError) {
61
+ if (e.error === 'BlobNotFound') return new BlobNotFoundError(e)
62
+ if (e.error === 'RepoNotFound') return new RepoNotFoundError(e)
63
+ if (e.error === 'RepoTakendown') return new RepoTakendownError(e)
64
+ if (e.error === 'RepoSuspended') return new RepoSuspendedError(e)
65
+ if (e.error === 'RepoDeactivated') return new RepoDeactivatedError(e)
31
66
  }
32
67
  return e
33
68
  }
@@ -25,8 +25,43 @@ export interface Response {
25
25
  data: Uint8Array
26
26
  }
27
27
 
28
+ export class BlockNotFoundError extends XRPCError {
29
+ constructor(src: XRPCError) {
30
+ super(src.status, src.error, src.message, src.headers)
31
+ }
32
+ }
33
+
34
+ export class RepoNotFoundError extends XRPCError {
35
+ constructor(src: XRPCError) {
36
+ super(src.status, src.error, src.message, src.headers)
37
+ }
38
+ }
39
+
40
+ export class RepoTakendownError extends XRPCError {
41
+ constructor(src: XRPCError) {
42
+ super(src.status, src.error, src.message, src.headers)
43
+ }
44
+ }
45
+
46
+ export class RepoSuspendedError extends XRPCError {
47
+ constructor(src: XRPCError) {
48
+ super(src.status, src.error, src.message, src.headers)
49
+ }
50
+ }
51
+
52
+ export class RepoDeactivatedError extends XRPCError {
53
+ constructor(src: XRPCError) {
54
+ super(src.status, src.error, src.message, src.headers)
55
+ }
56
+ }
57
+
28
58
  export function toKnownErr(e: any) {
29
59
  if (e instanceof XRPCError) {
60
+ if (e.error === 'BlockNotFound') return new BlockNotFoundError(e)
61
+ if (e.error === 'RepoNotFound') return new RepoNotFoundError(e)
62
+ if (e.error === 'RepoTakendown') return new RepoTakendownError(e)
63
+ if (e.error === 'RepoSuspended') return new RepoSuspendedError(e)
64
+ if (e.error === 'RepoDeactivated') return new RepoDeactivatedError(e)
30
65
  }
31
66
  return e
32
67
  }
@@ -36,9 +36,30 @@ export class RepoNotFoundError extends XRPCError {
36
36
  }
37
37
  }
38
38
 
39
+ export class RepoTakendownError extends XRPCError {
40
+ constructor(src: XRPCError) {
41
+ super(src.status, src.error, src.message, src.headers)
42
+ }
43
+ }
44
+
45
+ export class RepoSuspendedError extends XRPCError {
46
+ constructor(src: XRPCError) {
47
+ super(src.status, src.error, src.message, src.headers)
48
+ }
49
+ }
50
+
51
+ export class RepoDeactivatedError extends XRPCError {
52
+ constructor(src: XRPCError) {
53
+ super(src.status, src.error, src.message, src.headers)
54
+ }
55
+ }
56
+
39
57
  export function toKnownErr(e: any) {
40
58
  if (e instanceof XRPCError) {
41
59
  if (e.error === 'RepoNotFound') return new RepoNotFoundError(e)
60
+ if (e.error === 'RepoTakendown') return new RepoTakendownError(e)
61
+ if (e.error === 'RepoSuspended') return new RepoSuspendedError(e)
62
+ if (e.error === 'RepoDeactivated') return new RepoDeactivatedError(e)
42
63
  }
43
64
  return e
44
65
  }
@@ -29,8 +29,43 @@ export interface Response {
29
29
  data: Uint8Array
30
30
  }
31
31
 
32
+ export class RecordNotFoundError extends XRPCError {
33
+ constructor(src: XRPCError) {
34
+ super(src.status, src.error, src.message, src.headers)
35
+ }
36
+ }
37
+
38
+ export class RepoNotFoundError extends XRPCError {
39
+ constructor(src: XRPCError) {
40
+ super(src.status, src.error, src.message, src.headers)
41
+ }
42
+ }
43
+
44
+ export class RepoTakendownError extends XRPCError {
45
+ constructor(src: XRPCError) {
46
+ super(src.status, src.error, src.message, src.headers)
47
+ }
48
+ }
49
+
50
+ export class RepoSuspendedError extends XRPCError {
51
+ constructor(src: XRPCError) {
52
+ super(src.status, src.error, src.message, src.headers)
53
+ }
54
+ }
55
+
56
+ export class RepoDeactivatedError extends XRPCError {
57
+ constructor(src: XRPCError) {
58
+ super(src.status, src.error, src.message, src.headers)
59
+ }
60
+ }
61
+
32
62
  export function toKnownErr(e: any) {
33
63
  if (e instanceof XRPCError) {
64
+ if (e.error === 'RecordNotFound') return new RecordNotFoundError(e)
65
+ if (e.error === 'RepoNotFound') return new RepoNotFoundError(e)
66
+ if (e.error === 'RepoTakendown') return new RepoTakendownError(e)
67
+ if (e.error === 'RepoSuspended') return new RepoSuspendedError(e)
68
+ if (e.error === 'RepoDeactivated') return new RepoDeactivatedError(e)
34
69
  }
35
70
  return e
36
71
  }
@@ -26,8 +26,36 @@ export interface Response {
26
26
  data: Uint8Array
27
27
  }
28
28
 
29
+ export class RepoNotFoundError extends XRPCError {
30
+ constructor(src: XRPCError) {
31
+ super(src.status, src.error, src.message, src.headers)
32
+ }
33
+ }
34
+
35
+ export class RepoTakendownError extends XRPCError {
36
+ constructor(src: XRPCError) {
37
+ super(src.status, src.error, src.message, src.headers)
38
+ }
39
+ }
40
+
41
+ export class RepoSuspendedError extends XRPCError {
42
+ constructor(src: XRPCError) {
43
+ super(src.status, src.error, src.message, src.headers)
44
+ }
45
+ }
46
+
47
+ export class RepoDeactivatedError extends XRPCError {
48
+ constructor(src: XRPCError) {
49
+ super(src.status, src.error, src.message, src.headers)
50
+ }
51
+ }
52
+
29
53
  export function toKnownErr(e: any) {
30
54
  if (e instanceof XRPCError) {
55
+ if (e.error === 'RepoNotFound') return new RepoNotFoundError(e)
56
+ if (e.error === 'RepoTakendown') return new RepoTakendownError(e)
57
+ if (e.error === 'RepoSuspended') return new RepoSuspendedError(e)
58
+ if (e.error === 'RepoDeactivated') return new RepoDeactivatedError(e)
31
59
  }
32
60
  return e
33
61
  }