@atproto/api 0.12.12 → 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.
- package/CHANGELOG.md +12 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +13 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +115 -0
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +195 -4
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/defs.d.ts +1 -1
- package/dist/client/types/com/atproto/server/createAppPassword.d.ts +3 -0
- package/dist/client/types/com/atproto/server/createAppPassword.d.ts.map +1 -1
- package/dist/client/types/com/atproto/server/createAppPassword.js.map +1 -1
- package/dist/client/types/com/atproto/server/listAppPasswords.d.ts +1 -0
- package/dist/client/types/com/atproto/server/listAppPasswords.d.ts.map +1 -1
- package/dist/client/types/com/atproto/server/listAppPasswords.js.map +1 -1
- package/dist/client/types/com/atproto/sync/getBlob.d.ts +16 -1
- package/dist/client/types/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/client/types/com/atproto/sync/getBlob.js +41 -1
- package/dist/client/types/com/atproto/sync/getBlob.js.map +1 -1
- package/dist/client/types/com/atproto/sync/getBlocks.d.ts +16 -1
- package/dist/client/types/com/atproto/sync/getBlocks.d.ts.map +1 -1
- package/dist/client/types/com/atproto/sync/getBlocks.js +41 -1
- package/dist/client/types/com/atproto/sync/getBlocks.js.map +1 -1
- package/dist/client/types/com/atproto/sync/getLatestCommit.d.ts +9 -0
- package/dist/client/types/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
- package/dist/client/types/com/atproto/sync/getLatestCommit.js +25 -1
- package/dist/client/types/com/atproto/sync/getLatestCommit.js.map +1 -1
- package/dist/client/types/com/atproto/sync/getRecord.d.ts +16 -1
- package/dist/client/types/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/client/types/com/atproto/sync/getRecord.js +41 -1
- package/dist/client/types/com/atproto/sync/getRecord.js.map +1 -1
- package/dist/client/types/com/atproto/sync/getRepo.d.ts +13 -1
- package/dist/client/types/com/atproto/sync/getRepo.d.ts.map +1 -1
- package/dist/client/types/com/atproto/sync/getRepo.js +33 -1
- package/dist/client/types/com/atproto/sync/getRepo.js.map +1 -1
- package/dist/client/types/com/atproto/sync/getRepoStatus.d.ts +31 -0
- package/dist/client/types/com/atproto/sync/getRepoStatus.d.ts.map +1 -0
- package/dist/client/types/com/atproto/sync/getRepoStatus.js +22 -0
- package/dist/client/types/com/atproto/sync/getRepoStatus.js.map +1 -0
- package/dist/client/types/com/atproto/sync/listBlobs.d.ts +13 -1
- package/dist/client/types/com/atproto/sync/listBlobs.d.ts.map +1 -1
- package/dist/client/types/com/atproto/sync/listBlobs.js +33 -1
- package/dist/client/types/com/atproto/sync/listBlobs.js.map +1 -1
- package/dist/client/types/com/atproto/sync/listRepos.d.ts +3 -0
- package/dist/client/types/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/client/types/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +18 -3
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/client/types/com/atproto/sync/subscribeRepos.js +11 -1
- package/dist/client/types/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +13 -0
- package/src/client/lexicons.ts +204 -7
- package/src/client/types/chat/bsky/convo/defs.ts +1 -1
- package/src/client/types/com/atproto/server/createAppPassword.ts +3 -0
- package/src/client/types/com/atproto/server/listAppPasswords.ts +1 -0
- package/src/client/types/com/atproto/sync/getBlob.ts +35 -0
- package/src/client/types/com/atproto/sync/getBlocks.ts +35 -0
- package/src/client/types/com/atproto/sync/getLatestCommit.ts +21 -0
- package/src/client/types/com/atproto/sync/getRecord.ts +35 -0
- package/src/client/types/com/atproto/sync/getRepo.ts +28 -0
- package/src/client/types/com/atproto/sync/getRepoStatus.ts +48 -0
- package/src/client/types/com/atproto/sync/listBlobs.ts +28 -0
- package/src/client/types/com/atproto/sync/listRepos.ts +3 -0
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +29 -3
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toKnownErr = void 0;
|
|
3
|
+
exports.toKnownErr = exports.RepoDeactivatedError = exports.RepoSuspendedError = exports.RepoTakendownError = exports.RepoNotFoundError = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* GENERATED CODE - DO NOT MODIFY
|
|
6
6
|
*/
|
|
7
7
|
const xrpc_1 = require("@atproto/xrpc");
|
|
8
|
+
class RepoNotFoundError extends xrpc_1.XRPCError {
|
|
9
|
+
constructor(src) {
|
|
10
|
+
super(src.status, src.error, src.message, src.headers);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.RepoNotFoundError = RepoNotFoundError;
|
|
14
|
+
class RepoTakendownError extends xrpc_1.XRPCError {
|
|
15
|
+
constructor(src) {
|
|
16
|
+
super(src.status, src.error, src.message, src.headers);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.RepoTakendownError = RepoTakendownError;
|
|
20
|
+
class RepoSuspendedError extends xrpc_1.XRPCError {
|
|
21
|
+
constructor(src) {
|
|
22
|
+
super(src.status, src.error, src.message, src.headers);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.RepoSuspendedError = RepoSuspendedError;
|
|
26
|
+
class RepoDeactivatedError extends xrpc_1.XRPCError {
|
|
27
|
+
constructor(src) {
|
|
28
|
+
super(src.status, src.error, src.message, src.headers);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.RepoDeactivatedError = RepoDeactivatedError;
|
|
8
32
|
function toKnownErr(e) {
|
|
9
33
|
if (e instanceof xrpc_1.XRPCError) {
|
|
34
|
+
if (e.error === 'RepoNotFound')
|
|
35
|
+
return new RepoNotFoundError(e);
|
|
36
|
+
if (e.error === 'RepoTakendown')
|
|
37
|
+
return new RepoTakendownError(e);
|
|
38
|
+
if (e.error === 'RepoSuspended')
|
|
39
|
+
return new RepoSuspendedError(e);
|
|
40
|
+
if (e.error === 'RepoDeactivated')
|
|
41
|
+
return new RepoDeactivatedError(e);
|
|
10
42
|
}
|
|
11
43
|
return e;
|
|
12
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listBlobs.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,wCAAkD;AAiClD,SAAgB,UAAU,CAAC,CAAM;IAC/B,IAAI,CAAC,YAAY,gBAAS,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"listBlobs.js","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,wCAAkD;AAiClD,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,CAAC,CAAA;IACxD,CAAC;CACF;AAJD,8CAIC;AAED,MAAa,kBAAmB,SAAQ,gBAAS;IAC/C,YAAY,GAAc;QACxB,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACxD,CAAC;CACF;AAJD,gDAIC;AAED,MAAa,kBAAmB,SAAQ,gBAAS;IAC/C,YAAY,GAAc;QACxB,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACxD,CAAC;CACF;AAJD,gDAIC;AAED,MAAa,oBAAqB,SAAQ,gBAAS;IACjD,YAAY,GAAc;QACxB,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACxD,CAAC;CACF;AAJD,oDAIC;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;QAC/D,IAAI,CAAC,CAAC,KAAK,KAAK,eAAe;YAAE,OAAO,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAA;QACjE,IAAI,CAAC,CAAC,KAAK,KAAK,eAAe;YAAE,OAAO,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAA;QACjE,IAAI,CAAC,CAAC,KAAK,KAAK,iBAAiB;YAAE,OAAO,IAAI,oBAAoB,CAAC,CAAC,CAAC,CAAA;IACvE,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC;AARD,gCAQC"}
|
|
@@ -27,6 +27,9 @@ export interface Repo {
|
|
|
27
27
|
/** Current repo commit CID */
|
|
28
28
|
head: string;
|
|
29
29
|
rev: string;
|
|
30
|
+
active?: boolean;
|
|
31
|
+
/** 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. */
|
|
32
|
+
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
|
30
33
|
[k: string]: unknown;
|
|
31
34
|
}
|
|
32
35
|
export declare function isRepo(v: unknown): v is Repo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,EAAa,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,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,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAIhC;AAED,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,CAAC,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"}
|
|
1
|
+
{"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,EAAa,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,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,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAIhC;AAED,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oOAAoO;IACpO,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAClE,CAAC,CAAC,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"}
|
|
@@ -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;
|
|
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
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,QAAQ,CAMpD;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE7D;AAED,
|
|
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,G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AA;CACrB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,SAAS,CAMtD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE9D;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,gBAAgB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,CAAC,CAAC,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;
|
|
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,CAAA;AACH,CAAC;AAND,8BAMC;AAED,SAAgB,eAAe,CAAC,CAAU;IACxC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,yCAAyC,EAAE,CAAC,CAAC,CAAA;AACxE,CAAC;AAFD,0CAEC;AAWD,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO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AQ,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
package/src/client/index.ts
CHANGED
|
@@ -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,
|
package/src/client/lexicons.ts
CHANGED
|
@@ -2052,6 +2052,11 @@ export const schemaDict = {
|
|
|
2052
2052
|
description:
|
|
2053
2053
|
'A short name for the App Password, to help distinguish them.',
|
|
2054
2054
|
},
|
|
2055
|
+
privileged: {
|
|
2056
|
+
type: 'boolean',
|
|
2057
|
+
description:
|
|
2058
|
+
"If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients.",
|
|
2059
|
+
},
|
|
2055
2060
|
},
|
|
2056
2061
|
},
|
|
2057
2062
|
},
|
|
@@ -2082,6 +2087,9 @@ export const schemaDict = {
|
|
|
2082
2087
|
type: 'string',
|
|
2083
2088
|
format: 'datetime',
|
|
2084
2089
|
},
|
|
2090
|
+
privileged: {
|
|
2091
|
+
type: 'boolean',
|
|
2092
|
+
},
|
|
2085
2093
|
},
|
|
2086
2094
|
},
|
|
2087
2095
|
},
|
|
@@ -2629,6 +2637,9 @@ export const schemaDict = {
|
|
|
2629
2637
|
type: 'string',
|
|
2630
2638
|
format: 'datetime',
|
|
2631
2639
|
},
|
|
2640
|
+
privileged: {
|
|
2641
|
+
type: 'boolean',
|
|
2642
|
+
},
|
|
2632
2643
|
},
|
|
2633
2644
|
},
|
|
2634
2645
|
},
|
|
@@ -2901,6 +2912,23 @@ export const schemaDict = {
|
|
|
2901
2912
|
output: {
|
|
2902
2913
|
encoding: '*/*',
|
|
2903
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
|
+
],
|
|
2904
2932
|
},
|
|
2905
2933
|
},
|
|
2906
2934
|
},
|
|
@@ -2933,6 +2961,23 @@ export const schemaDict = {
|
|
|
2933
2961
|
output: {
|
|
2934
2962
|
encoding: 'application/vnd.ipld.car',
|
|
2935
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
|
+
],
|
|
2936
2981
|
},
|
|
2937
2982
|
},
|
|
2938
2983
|
},
|
|
@@ -3039,6 +3084,15 @@ export const schemaDict = {
|
|
|
3039
3084
|
{
|
|
3040
3085
|
name: 'RepoNotFound',
|
|
3041
3086
|
},
|
|
3087
|
+
{
|
|
3088
|
+
name: 'RepoTakendown',
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
name: 'RepoSuspended',
|
|
3092
|
+
},
|
|
3093
|
+
{
|
|
3094
|
+
name: 'RepoDeactivated',
|
|
3095
|
+
},
|
|
3042
3096
|
],
|
|
3043
3097
|
},
|
|
3044
3098
|
},
|
|
@@ -3079,6 +3133,23 @@ export const schemaDict = {
|
|
|
3079
3133
|
output: {
|
|
3080
3134
|
encoding: 'application/vnd.ipld.car',
|
|
3081
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
|
+
],
|
|
3082
3153
|
},
|
|
3083
3154
|
},
|
|
3084
3155
|
},
|
|
@@ -3109,6 +3180,74 @@ export const schemaDict = {
|
|
|
3109
3180
|
output: {
|
|
3110
3181
|
encoding: 'application/vnd.ipld.car',
|
|
3111
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
|
+
],
|
|
3112
3251
|
},
|
|
3113
3252
|
},
|
|
3114
3253
|
},
|
|
@@ -3163,6 +3302,20 @@ export const schemaDict = {
|
|
|
3163
3302
|
},
|
|
3164
3303
|
},
|
|
3165
3304
|
},
|
|
3305
|
+
errors: [
|
|
3306
|
+
{
|
|
3307
|
+
name: 'RepoNotFound',
|
|
3308
|
+
},
|
|
3309
|
+
{
|
|
3310
|
+
name: 'RepoTakendown',
|
|
3311
|
+
},
|
|
3312
|
+
{
|
|
3313
|
+
name: 'RepoSuspended',
|
|
3314
|
+
},
|
|
3315
|
+
{
|
|
3316
|
+
name: 'RepoDeactivated',
|
|
3317
|
+
},
|
|
3318
|
+
],
|
|
3166
3319
|
},
|
|
3167
3320
|
},
|
|
3168
3321
|
},
|
|
@@ -3224,6 +3377,15 @@ export const schemaDict = {
|
|
|
3224
3377
|
rev: {
|
|
3225
3378
|
type: 'string',
|
|
3226
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
|
+
},
|
|
3227
3389
|
},
|
|
3228
3390
|
},
|
|
3229
3391
|
},
|
|
@@ -3301,6 +3463,7 @@ export const schemaDict = {
|
|
|
3301
3463
|
refs: [
|
|
3302
3464
|
'lex:com.atproto.sync.subscribeRepos#commit',
|
|
3303
3465
|
'lex:com.atproto.sync.subscribeRepos#identity',
|
|
3466
|
+
'lex:com.atproto.sync.subscribeRepos#account',
|
|
3304
3467
|
'lex:com.atproto.sync.subscribeRepos#handle',
|
|
3305
3468
|
'lex:com.atproto.sync.subscribeRepos#migrate',
|
|
3306
3469
|
'lex:com.atproto.sync.subscribeRepos#tombstone',
|
|
@@ -3424,12 +3587,47 @@ export const schemaDict = {
|
|
|
3424
3587
|
type: 'string',
|
|
3425
3588
|
format: 'datetime',
|
|
3426
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
|
+
},
|
|
3427
3596
|
},
|
|
3428
3597
|
},
|
|
3429
|
-
|
|
3598
|
+
account: {
|
|
3430
3599
|
type: 'object',
|
|
3431
3600
|
description:
|
|
3432
|
-
"Represents
|
|
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',
|
|
3433
3631
|
required: ['seq', 'did', 'handle', 'time'],
|
|
3434
3632
|
properties: {
|
|
3435
3633
|
seq: {
|
|
@@ -3451,8 +3649,7 @@ export const schemaDict = {
|
|
|
3451
3649
|
},
|
|
3452
3650
|
migrate: {
|
|
3453
3651
|
type: 'object',
|
|
3454
|
-
description:
|
|
3455
|
-
'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',
|
|
3456
3653
|
required: ['seq', 'did', 'migrateTo', 'time'],
|
|
3457
3654
|
nullable: ['migrateTo'],
|
|
3458
3655
|
properties: {
|
|
@@ -3474,8 +3671,7 @@ export const schemaDict = {
|
|
|
3474
3671
|
},
|
|
3475
3672
|
tombstone: {
|
|
3476
3673
|
type: 'object',
|
|
3477
|
-
description:
|
|
3478
|
-
'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',
|
|
3479
3675
|
required: ['seq', 'did', 'time'],
|
|
3480
3676
|
properties: {
|
|
3481
3677
|
seq: {
|
|
@@ -8368,7 +8564,7 @@ export const schemaDict = {
|
|
|
8368
8564
|
},
|
|
8369
8565
|
embed: {
|
|
8370
8566
|
type: 'union',
|
|
8371
|
-
refs: ['lex:app.bsky.embed.record'],
|
|
8567
|
+
refs: ['lex:app.bsky.embed.record#view'],
|
|
8372
8568
|
},
|
|
8373
8569
|
sender: {
|
|
8374
8570
|
type: 'ref',
|
|
@@ -10613,6 +10809,7 @@ export const ids = {
|
|
|
10613
10809
|
ComAtprotoSyncGetLatestCommit: 'com.atproto.sync.getLatestCommit',
|
|
10614
10810
|
ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
|
|
10615
10811
|
ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
|
|
10812
|
+
ComAtprotoSyncGetRepoStatus: 'com.atproto.sync.getRepoStatus',
|
|
10616
10813
|
ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs',
|
|
10617
10814
|
ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos',
|
|
10618
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.
|
|
57
|
+
embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown }
|
|
58
58
|
sender: MessageViewSender
|
|
59
59
|
sentAt: string
|
|
60
60
|
[k: string]: unknown
|
|
@@ -12,6 +12,8 @@ export interface QueryParams {}
|
|
|
12
12
|
export interface InputSchema {
|
|
13
13
|
/** A short name for the App Password, to help distinguish them. */
|
|
14
14
|
name: string
|
|
15
|
+
/** If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. */
|
|
16
|
+
privileged?: boolean
|
|
15
17
|
[k: string]: unknown
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -46,6 +48,7 @@ export interface AppPassword {
|
|
|
46
48
|
name: string
|
|
47
49
|
password: string
|
|
48
50
|
createdAt: string
|
|
51
|
+
privileged?: boolean
|
|
49
52
|
[k: string]: unknown
|
|
50
53
|
}
|
|
51
54
|
|
|
@@ -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
|
}
|