@atproto/bsky 0.0.120 → 0.0.122
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 +16 -0
- package/dist/lexicon/lexicons.d.ts +96 -28
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +69 -13
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRepoStatus.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +25 -7
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js +9 -0
- package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/package.json +6 -6
- package/src/lexicon/lexicons.ts +77 -14
- package/src/lexicon/types/com/atproto/sync/getRepoStatus.ts +8 -1
- package/src/lexicon/types/com/atproto/sync/listRepos.ts +8 -1
- package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +41 -6
- package/tests/data-plane/indexing.test.ts +1 -5
- package/tests/data-plane/subscription.test.ts +3 -5
|
@@ -12,7 +12,7 @@ export interface OutputSchema {
|
|
|
12
12
|
did: string;
|
|
13
13
|
active: boolean;
|
|
14
14
|
/** 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. */
|
|
15
|
-
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
|
15
|
+
status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | 'desynchronized' | 'throttled' | (string & {});
|
|
16
16
|
/** Optional field, the current rev of the repo, if active=true */
|
|
17
17
|
rev?: string;
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRepoStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,OAAO,CAAA;IACf,oOAAoO;IACpO,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"getRepoStatus.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,OAAO,CAAA;IACf,oOAAoO;IACpO,MAAM,CAAC,EACH,WAAW,GACX,WAAW,GACX,SAAS,GACT,aAAa,GACb,gBAAgB,GAChB,WAAW,GACX,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACjB,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,cAAc,CAAA;CACvB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
|
@@ -43,7 +43,7 @@ export interface Repo {
|
|
|
43
43
|
rev: string;
|
|
44
44
|
active?: boolean;
|
|
45
45
|
/** 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. */
|
|
46
|
-
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
|
46
|
+
status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | 'desynchronized' | 'throttled' | (string & {});
|
|
47
47
|
}
|
|
48
48
|
export declare function isRepo<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.sync.listRepos", "repo">;
|
|
49
49
|
export declare function validateRepo<V>(v: V): ValidationResult<Repo & V>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAI5D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,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;CACd;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,C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AA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA;AAE3C,MAAM,WAAW,IAAI;IACnB,KAAK,CAAC,EAAE,iCAAiC,CAAA;IACzC,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,EACH,WAAW,GACX,WAAW,GACX,SAAS,GACT,aAAa,GACb,gBAAgB,GAChB,WAAW,GACX,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CAClB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,yFAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRepos.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"listRepos.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/listRepos.ts"],"names":[],"mappings":";;AAwEA,wBAEC;AAED,oCAEC;AAxED,mDAA4D;AAC5D,2CAAyE;AAGzE,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,4BAA4B,CAAA;AA0DvC,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"}
|
|
@@ -10,7 +10,7 @@ export interface QueryParams {
|
|
|
10
10
|
/** The last known event seq number to backfill from. */
|
|
11
11
|
cursor?: number;
|
|
12
12
|
}
|
|
13
|
-
export type OutputSchema = $Typed<Commit> | $Typed<Identity> | $Typed<Account> | $Typed<Handle> | $Typed<Migrate> | $Typed<Tombstone> | $Typed<Info> | {
|
|
13
|
+
export type OutputSchema = $Typed<Commit> | $Typed<Sync> | $Typed<Identity> | $Typed<Account> | $Typed<Handle> | $Typed<Migrate> | $Typed<Tombstone> | $Typed<Info> | {
|
|
14
14
|
$type: string;
|
|
15
15
|
};
|
|
16
16
|
export type HandlerError = ErrorFrame<'FutureCursor' | 'ConsumerTooSlow'>;
|
|
@@ -29,27 +29,43 @@ export interface Commit {
|
|
|
29
29
|
seq: number;
|
|
30
30
|
/** DEPRECATED -- unused */
|
|
31
31
|
rebase: boolean;
|
|
32
|
-
/** Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */
|
|
32
|
+
/** DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */
|
|
33
33
|
tooBig: boolean;
|
|
34
|
-
/** The repo this event comes from. */
|
|
34
|
+
/** The repo this event comes from. Note that all other message types name this field 'did'. */
|
|
35
35
|
repo: string;
|
|
36
36
|
/** Repo commit object CID. */
|
|
37
37
|
commit: CID;
|
|
38
|
-
/** DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability. */
|
|
39
|
-
prev?: CID | null;
|
|
40
38
|
/** The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. */
|
|
41
39
|
rev: string;
|
|
42
40
|
/** The rev of the last emitted commit from this repo (if any). */
|
|
43
41
|
since: string | null;
|
|
44
|
-
/** CAR file containing relevant blocks, as a diff since the previous repo state. */
|
|
42
|
+
/** CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. */
|
|
45
43
|
blocks: Uint8Array;
|
|
46
44
|
ops: RepoOp[];
|
|
47
45
|
blobs: CID[];
|
|
46
|
+
/** The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. */
|
|
47
|
+
prevData?: CID;
|
|
48
48
|
/** Timestamp of when this message was originally broadcast. */
|
|
49
49
|
time: string;
|
|
50
50
|
}
|
|
51
51
|
export declare function isCommit<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.sync.subscribeRepos", "commit">;
|
|
52
52
|
export declare function validateCommit<V>(v: V): ValidationResult<Commit & V>;
|
|
53
|
+
/** Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. */
|
|
54
|
+
export interface Sync {
|
|
55
|
+
$type?: 'com.atproto.sync.subscribeRepos#sync';
|
|
56
|
+
/** The stream sequence number of this message. */
|
|
57
|
+
seq: number;
|
|
58
|
+
/** The account this repo event corresponds to. Must match that in the commit object. */
|
|
59
|
+
did: string;
|
|
60
|
+
/** CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. */
|
|
61
|
+
blocks: Uint8Array;
|
|
62
|
+
/** The rev of the commit. This value must match that in the commit object. */
|
|
63
|
+
rev: string;
|
|
64
|
+
/** Timestamp of when this message was originally broadcast. */
|
|
65
|
+
time: string;
|
|
66
|
+
}
|
|
67
|
+
export declare function isSync<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.sync.subscribeRepos", "sync">;
|
|
68
|
+
export declare function validateSync<V>(v: V): ValidationResult<Sync & V>;
|
|
53
69
|
/** Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. */
|
|
54
70
|
export interface Identity {
|
|
55
71
|
$type?: 'com.atproto.sync.subscribeRepos#identity';
|
|
@@ -70,7 +86,7 @@ export interface Account {
|
|
|
70
86
|
/** Indicates that the account has a repository which can be fetched from the host that emitted this event. */
|
|
71
87
|
active: boolean;
|
|
72
88
|
/** If active=false, this optional field indicates a reason for why the account is not active. */
|
|
73
|
-
status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | (string & {});
|
|
89
|
+
status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | 'desynchronized' | 'throttled' | (string & {});
|
|
74
90
|
}
|
|
75
91
|
export declare function isAccount<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.sync.subscribeRepos", "account">;
|
|
76
92
|
export declare function validateAccount<V>(v: V): ValidationResult<Account & V>;
|
|
@@ -117,6 +133,8 @@ export interface RepoOp {
|
|
|
117
133
|
path: string;
|
|
118
134
|
/** For creates and updates, the new record CID. For deletions, null. */
|
|
119
135
|
cid: CID | null;
|
|
136
|
+
/** For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. */
|
|
137
|
+
prev?: CID;
|
|
120
138
|
}
|
|
121
139
|
export declare function isRepoOp<V>(v: V): v is import("../../../../util").$TypedObject<V, "com.atproto.sync.subscribeRepos", "repoOp">;
|
|
122
140
|
export declare function validateRepoOp<V>(v: V): ValidationResult<RepoOp & V>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribeRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,MAAM,EAAkC,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAM3C,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,YAAY,GACpB,MAAM,CAAC,MAAM,CAAC,GACd,MAAM,CAAC,QAAQ,CAAC,GAChB,MAAM,CAAC,OAAO,CAAC,GACf,MAAM,CAAC,MAAM,CAAC,GACd,MAAM,CAAC,OAAO,CAAC,GACf,MAAM,CAAC,SAAS,CAAC,GACjB,MAAM,CAAC,IAAI,CAAC,GACZ;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AACrB,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,cAAc,GAAG,iBAAiB,CAAC,CAAA;AACzE,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,YAAY,CAAA;AACvD,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,GAAG,EAAE,eAAe,CAAA;IACpB,MAAM,EAAE,WAAW,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,aAAa,CAAC,aAAa,CAAC,CAAA;AAEjC,6JAA6J;AAC7J,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,EAAE,wCAAwC,CAAA;IAChD,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAA;IACX,2BAA2B;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,
|
|
1
|
+
{"version":3,"file":"subscribeRepos.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,MAAM,EAAkC,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAM3C,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,YAAY,GACpB,MAAM,CAAC,MAAM,CAAC,GACd,MAAM,CAAC,IAAI,CAAC,GACZ,MAAM,CAAC,QAAQ,CAAC,GAChB,MAAM,CAAC,OAAO,CAAC,GACf,MAAM,CAAC,MAAM,CAAC,GACd,MAAM,CAAC,OAAO,CAAC,GACf,MAAM,CAAC,SAAS,CAAC,GACjB,MAAM,CAAC,IAAI,CAAC,GACZ;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AACrB,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,cAAc,GAAG,iBAAiB,CAAC,CAAA;AACzE,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,YAAY,CAAA;AACvD,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,GAAG,EAAE,eAAe,CAAA;IACpB,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AAG,IAAI,CAAA;IACf,sIAAsI;IACtI,IAAI,CAAC,EAAE,GAAG,CAAA;CACX;AAID,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,gGAE/B;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,gCAErC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isCommit = isCommit;
|
|
4
4
|
exports.validateCommit = validateCommit;
|
|
5
|
+
exports.isSync = isSync;
|
|
6
|
+
exports.validateSync = validateSync;
|
|
5
7
|
exports.isIdentity = isIdentity;
|
|
6
8
|
exports.validateIdentity = validateIdentity;
|
|
7
9
|
exports.isAccount = isAccount;
|
|
@@ -27,6 +29,13 @@ function isCommit(v) {
|
|
|
27
29
|
function validateCommit(v) {
|
|
28
30
|
return validate(v, id, hashCommit);
|
|
29
31
|
}
|
|
32
|
+
const hashSync = 'sync';
|
|
33
|
+
function isSync(v) {
|
|
34
|
+
return is$typed(v, id, hashSync);
|
|
35
|
+
}
|
|
36
|
+
function validateSync(v) {
|
|
37
|
+
return validate(v, id, hashSync);
|
|
38
|
+
}
|
|
30
39
|
const hashIdentity = 'identity';
|
|
31
40
|
function isIdentity(v) {
|
|
32
41
|
return is$typed(v, id, hashIdentity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":";;AAsEA,4BAEC;AAED,wCAEC;AAmBD,wBAEC;AAED,oCAEC;AAcD,gCAEC;AAED,4CAEC;AAuBD,8BAEC;AAED,0CAEC;AAaD,4BAEC;AAED,wCAEC;AAaD,8BAEC;AAED,0CAEC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gB,cAAc,CAAI,CAAI;IACpC,OAAO,QAAQ,CAAa,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/bsky",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.122",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Reference implementation of app.bsky App View (Bluesky API)",
|
|
6
6
|
"keywords": [
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"undici": "^6.19.8",
|
|
50
50
|
"@atproto-labs/fetch-node": "0.1.7",
|
|
51
51
|
"@atproto-labs/xrpc-utils": "0.0.7",
|
|
52
|
-
"@atproto/api": "^0.14.
|
|
52
|
+
"@atproto/api": "^0.14.5",
|
|
53
53
|
"@atproto/common": "^0.4.8",
|
|
54
54
|
"@atproto/crypto": "^0.4.4",
|
|
55
55
|
"@atproto/did": "^0.1.5",
|
|
56
56
|
"@atproto/identity": "^0.4.6",
|
|
57
57
|
"@atproto/lexicon": "^0.4.7",
|
|
58
|
-
"@atproto/repo": "^0.
|
|
59
|
-
"@atproto/sync": "^0.1.
|
|
58
|
+
"@atproto/repo": "^0.7.0",
|
|
59
|
+
"@atproto/sync": "^0.1.15",
|
|
60
60
|
"@atproto/syntax": "^0.3.3",
|
|
61
61
|
"@atproto/xrpc-server": "^0.7.11"
|
|
62
62
|
},
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"jest": "^28.1.2",
|
|
74
74
|
"ts-node": "^10.8.2",
|
|
75
75
|
"typescript": "^5.6.3",
|
|
76
|
-
"@atproto/api": "^0.14.
|
|
76
|
+
"@atproto/api": "^0.14.5",
|
|
77
77
|
"@atproto/lex-cli": "^0.6.1",
|
|
78
|
-
"@atproto/pds": "^0.4.
|
|
78
|
+
"@atproto/pds": "^0.4.101",
|
|
79
79
|
"@atproto/xrpc": "^0.6.9"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -3517,7 +3517,14 @@ export const schemaDict = {
|
|
|
3517
3517
|
type: 'string',
|
|
3518
3518
|
description:
|
|
3519
3519
|
'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.',
|
|
3520
|
-
knownValues: [
|
|
3520
|
+
knownValues: [
|
|
3521
|
+
'takendown',
|
|
3522
|
+
'suspended',
|
|
3523
|
+
'deleted',
|
|
3524
|
+
'deactivated',
|
|
3525
|
+
'desynchronized',
|
|
3526
|
+
'throttled',
|
|
3527
|
+
],
|
|
3521
3528
|
},
|
|
3522
3529
|
rev: {
|
|
3523
3530
|
type: 'string',
|
|
@@ -3671,7 +3678,14 @@ export const schemaDict = {
|
|
|
3671
3678
|
type: 'string',
|
|
3672
3679
|
description:
|
|
3673
3680
|
'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.',
|
|
3674
|
-
knownValues: [
|
|
3681
|
+
knownValues: [
|
|
3682
|
+
'takendown',
|
|
3683
|
+
'suspended',
|
|
3684
|
+
'deleted',
|
|
3685
|
+
'deactivated',
|
|
3686
|
+
'desynchronized',
|
|
3687
|
+
'throttled',
|
|
3688
|
+
],
|
|
3675
3689
|
},
|
|
3676
3690
|
},
|
|
3677
3691
|
},
|
|
@@ -3810,6 +3824,7 @@ export const schemaDict = {
|
|
|
3810
3824
|
type: 'union',
|
|
3811
3825
|
refs: [
|
|
3812
3826
|
'lex:com.atproto.sync.subscribeRepos#commit',
|
|
3827
|
+
'lex:com.atproto.sync.subscribeRepos#sync',
|
|
3813
3828
|
'lex:com.atproto.sync.subscribeRepos#identity',
|
|
3814
3829
|
'lex:com.atproto.sync.subscribeRepos#account',
|
|
3815
3830
|
'lex:com.atproto.sync.subscribeRepos#handle',
|
|
@@ -3847,7 +3862,7 @@ export const schemaDict = {
|
|
|
3847
3862
|
'blobs',
|
|
3848
3863
|
'time',
|
|
3849
3864
|
],
|
|
3850
|
-
nullable: ['
|
|
3865
|
+
nullable: ['since'],
|
|
3851
3866
|
properties: {
|
|
3852
3867
|
seq: {
|
|
3853
3868
|
type: 'integer',
|
|
@@ -3860,22 +3875,18 @@ export const schemaDict = {
|
|
|
3860
3875
|
tooBig: {
|
|
3861
3876
|
type: 'boolean',
|
|
3862
3877
|
description:
|
|
3863
|
-
'Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.',
|
|
3878
|
+
'DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.',
|
|
3864
3879
|
},
|
|
3865
3880
|
repo: {
|
|
3866
3881
|
type: 'string',
|
|
3867
3882
|
format: 'did',
|
|
3868
|
-
description:
|
|
3883
|
+
description:
|
|
3884
|
+
"The repo this event comes from. Note that all other message types name this field 'did'.",
|
|
3869
3885
|
},
|
|
3870
3886
|
commit: {
|
|
3871
3887
|
type: 'cid-link',
|
|
3872
3888
|
description: 'Repo commit object CID.',
|
|
3873
3889
|
},
|
|
3874
|
-
prev: {
|
|
3875
|
-
type: 'cid-link',
|
|
3876
|
-
description:
|
|
3877
|
-
'DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability.',
|
|
3878
|
-
},
|
|
3879
3890
|
rev: {
|
|
3880
3891
|
type: 'string',
|
|
3881
3892
|
format: 'tid',
|
|
@@ -3891,8 +3902,8 @@ export const schemaDict = {
|
|
|
3891
3902
|
blocks: {
|
|
3892
3903
|
type: 'bytes',
|
|
3893
3904
|
description:
|
|
3894
|
-
|
|
3895
|
-
maxLength:
|
|
3905
|
+
"CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.",
|
|
3906
|
+
maxLength: 2000000,
|
|
3896
3907
|
},
|
|
3897
3908
|
ops: {
|
|
3898
3909
|
type: 'array',
|
|
@@ -3909,9 +3920,49 @@ export const schemaDict = {
|
|
|
3909
3920
|
items: {
|
|
3910
3921
|
type: 'cid-link',
|
|
3911
3922
|
description:
|
|
3912
|
-
'List of new blobs (by CID) referenced by records in this commit.',
|
|
3923
|
+
'DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit.',
|
|
3913
3924
|
},
|
|
3914
3925
|
},
|
|
3926
|
+
prevData: {
|
|
3927
|
+
type: 'cid-link',
|
|
3928
|
+
description:
|
|
3929
|
+
"The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose.",
|
|
3930
|
+
},
|
|
3931
|
+
time: {
|
|
3932
|
+
type: 'string',
|
|
3933
|
+
format: 'datetime',
|
|
3934
|
+
description:
|
|
3935
|
+
'Timestamp of when this message was originally broadcast.',
|
|
3936
|
+
},
|
|
3937
|
+
},
|
|
3938
|
+
},
|
|
3939
|
+
sync: {
|
|
3940
|
+
type: 'object',
|
|
3941
|
+
description:
|
|
3942
|
+
'Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.',
|
|
3943
|
+
required: ['seq', 'did', 'blocks', 'rev', 'time'],
|
|
3944
|
+
properties: {
|
|
3945
|
+
seq: {
|
|
3946
|
+
type: 'integer',
|
|
3947
|
+
description: 'The stream sequence number of this message.',
|
|
3948
|
+
},
|
|
3949
|
+
did: {
|
|
3950
|
+
type: 'string',
|
|
3951
|
+
format: 'did',
|
|
3952
|
+
description:
|
|
3953
|
+
'The account this repo event corresponds to. Must match that in the commit object.',
|
|
3954
|
+
},
|
|
3955
|
+
blocks: {
|
|
3956
|
+
type: 'bytes',
|
|
3957
|
+
description:
|
|
3958
|
+
"CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.",
|
|
3959
|
+
maxLength: 10000,
|
|
3960
|
+
},
|
|
3961
|
+
rev: {
|
|
3962
|
+
type: 'string',
|
|
3963
|
+
description:
|
|
3964
|
+
'The rev of the commit. This value must match that in the commit object.',
|
|
3965
|
+
},
|
|
3915
3966
|
time: {
|
|
3916
3967
|
type: 'string',
|
|
3917
3968
|
format: 'datetime',
|
|
@@ -3971,7 +4022,14 @@ export const schemaDict = {
|
|
|
3971
4022
|
type: 'string',
|
|
3972
4023
|
description:
|
|
3973
4024
|
'If active=false, this optional field indicates a reason for why the account is not active.',
|
|
3974
|
-
knownValues: [
|
|
4025
|
+
knownValues: [
|
|
4026
|
+
'takendown',
|
|
4027
|
+
'suspended',
|
|
4028
|
+
'deleted',
|
|
4029
|
+
'deactivated',
|
|
4030
|
+
'desynchronized',
|
|
4031
|
+
'throttled',
|
|
4032
|
+
],
|
|
3975
4033
|
},
|
|
3976
4034
|
},
|
|
3977
4035
|
},
|
|
@@ -4068,6 +4126,11 @@ export const schemaDict = {
|
|
|
4068
4126
|
description:
|
|
4069
4127
|
'For creates and updates, the new record CID. For deletions, null.',
|
|
4070
4128
|
},
|
|
4129
|
+
prev: {
|
|
4130
|
+
type: 'cid-link',
|
|
4131
|
+
description:
|
|
4132
|
+
'For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined.',
|
|
4133
|
+
},
|
|
4071
4134
|
},
|
|
4072
4135
|
},
|
|
4073
4136
|
},
|
|
@@ -23,7 +23,14 @@ export interface OutputSchema {
|
|
|
23
23
|
did: string
|
|
24
24
|
active: boolean
|
|
25
25
|
/** 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. */
|
|
26
|
-
status?:
|
|
26
|
+
status?:
|
|
27
|
+
| 'takendown'
|
|
28
|
+
| 'suspended'
|
|
29
|
+
| 'deleted'
|
|
30
|
+
| 'deactivated'
|
|
31
|
+
| 'desynchronized'
|
|
32
|
+
| 'throttled'
|
|
33
|
+
| (string & {})
|
|
27
34
|
/** Optional field, the current rev of the repo, if active=true */
|
|
28
35
|
rev?: string
|
|
29
36
|
}
|
|
@@ -58,7 +58,14 @@ export interface Repo {
|
|
|
58
58
|
rev: string
|
|
59
59
|
active?: boolean
|
|
60
60
|
/** 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. */
|
|
61
|
-
status?:
|
|
61
|
+
status?:
|
|
62
|
+
| 'takendown'
|
|
63
|
+
| 'suspended'
|
|
64
|
+
| 'deleted'
|
|
65
|
+
| 'deactivated'
|
|
66
|
+
| 'desynchronized'
|
|
67
|
+
| 'throttled'
|
|
68
|
+
| (string & {})
|
|
62
69
|
}
|
|
63
70
|
|
|
64
71
|
const hashRepo = 'repo'
|
|
@@ -19,6 +19,7 @@ export interface QueryParams {
|
|
|
19
19
|
|
|
20
20
|
export type OutputSchema =
|
|
21
21
|
| $Typed<Commit>
|
|
22
|
+
| $Typed<Sync>
|
|
22
23
|
| $Typed<Identity>
|
|
23
24
|
| $Typed<Account>
|
|
24
25
|
| $Typed<Handle>
|
|
@@ -45,22 +46,22 @@ export interface Commit {
|
|
|
45
46
|
seq: number
|
|
46
47
|
/** DEPRECATED -- unused */
|
|
47
48
|
rebase: boolean
|
|
48
|
-
/** Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */
|
|
49
|
+
/** DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */
|
|
49
50
|
tooBig: boolean
|
|
50
|
-
/** The repo this event comes from. */
|
|
51
|
+
/** The repo this event comes from. Note that all other message types name this field 'did'. */
|
|
51
52
|
repo: string
|
|
52
53
|
/** Repo commit object CID. */
|
|
53
54
|
commit: CID
|
|
54
|
-
/** DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability. */
|
|
55
|
-
prev?: CID | null
|
|
56
55
|
/** The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. */
|
|
57
56
|
rev: string
|
|
58
57
|
/** The rev of the last emitted commit from this repo (if any). */
|
|
59
58
|
since: string | null
|
|
60
|
-
/** CAR file containing relevant blocks, as a diff since the previous repo state. */
|
|
59
|
+
/** CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. */
|
|
61
60
|
blocks: Uint8Array
|
|
62
61
|
ops: RepoOp[]
|
|
63
62
|
blobs: CID[]
|
|
63
|
+
/** The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. */
|
|
64
|
+
prevData?: CID
|
|
64
65
|
/** Timestamp of when this message was originally broadcast. */
|
|
65
66
|
time: string
|
|
66
67
|
}
|
|
@@ -75,6 +76,31 @@ export function validateCommit<V>(v: V) {
|
|
|
75
76
|
return validate<Commit & V>(v, id, hashCommit)
|
|
76
77
|
}
|
|
77
78
|
|
|
79
|
+
/** Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. */
|
|
80
|
+
export interface Sync {
|
|
81
|
+
$type?: 'com.atproto.sync.subscribeRepos#sync'
|
|
82
|
+
/** The stream sequence number of this message. */
|
|
83
|
+
seq: number
|
|
84
|
+
/** The account this repo event corresponds to. Must match that in the commit object. */
|
|
85
|
+
did: string
|
|
86
|
+
/** CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. */
|
|
87
|
+
blocks: Uint8Array
|
|
88
|
+
/** The rev of the commit. This value must match that in the commit object. */
|
|
89
|
+
rev: string
|
|
90
|
+
/** Timestamp of when this message was originally broadcast. */
|
|
91
|
+
time: string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const hashSync = 'sync'
|
|
95
|
+
|
|
96
|
+
export function isSync<V>(v: V) {
|
|
97
|
+
return is$typed(v, id, hashSync)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function validateSync<V>(v: V) {
|
|
101
|
+
return validate<Sync & V>(v, id, hashSync)
|
|
102
|
+
}
|
|
103
|
+
|
|
78
104
|
/** Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. */
|
|
79
105
|
export interface Identity {
|
|
80
106
|
$type?: 'com.atproto.sync.subscribeRepos#identity'
|
|
@@ -104,7 +130,14 @@ export interface Account {
|
|
|
104
130
|
/** Indicates that the account has a repository which can be fetched from the host that emitted this event. */
|
|
105
131
|
active: boolean
|
|
106
132
|
/** If active=false, this optional field indicates a reason for why the account is not active. */
|
|
107
|
-
status?:
|
|
133
|
+
status?:
|
|
134
|
+
| 'takendown'
|
|
135
|
+
| 'suspended'
|
|
136
|
+
| 'deleted'
|
|
137
|
+
| 'deactivated'
|
|
138
|
+
| 'desynchronized'
|
|
139
|
+
| 'throttled'
|
|
140
|
+
| (string & {})
|
|
108
141
|
}
|
|
109
142
|
|
|
110
143
|
const hashAccount = 'account'
|
|
@@ -196,6 +229,8 @@ export interface RepoOp {
|
|
|
196
229
|
path: string
|
|
197
230
|
/** For creates and updates, the new record CID. For deletions, null. */
|
|
198
231
|
cid: CID | null
|
|
232
|
+
/** For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. */
|
|
233
|
+
prev?: CID
|
|
199
234
|
}
|
|
200
235
|
|
|
201
236
|
const hashRepoOp = 'repoOp'
|
|
@@ -592,11 +592,7 @@ describe('indexing', () => {
|
|
|
592
592
|
writeCommit.cid,
|
|
593
593
|
writeCommit.rev,
|
|
594
594
|
)
|
|
595
|
-
await network.pds.ctx.sequencer.sequenceCommit(
|
|
596
|
-
sc.dids.alice,
|
|
597
|
-
writeCommit,
|
|
598
|
-
writes,
|
|
599
|
-
)
|
|
595
|
+
await network.pds.ctx.sequencer.sequenceCommit(sc.dids.alice, writeCommit)
|
|
600
596
|
// Index
|
|
601
597
|
const { data: commit } =
|
|
602
598
|
await pdsAgent.api.com.atproto.sync.getLatestCommit({
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { AtpAgent } from '@atproto/api'
|
|
2
2
|
import { cborDecode, cborEncode } from '@atproto/common'
|
|
3
3
|
import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
4
|
-
import {
|
|
5
|
-
import { CommitData } from '@atproto/repo'
|
|
4
|
+
import { CommitDataWithOps, sequencer } from '@atproto/pds'
|
|
6
5
|
import { DatabaseSchemaType } from '../../src/data-plane/server/db/database-schema'
|
|
7
6
|
import { ids } from '../../src/lexicon/lexicons'
|
|
8
7
|
import { forSnapshot } from '../_util'
|
|
@@ -74,10 +73,9 @@ describe('sync', () => {
|
|
|
74
73
|
const sequenceCommitOrig = network.pds.ctx.sequencer.sequenceCommit
|
|
75
74
|
network.pds.ctx.sequencer.sequenceCommit = async function (
|
|
76
75
|
did: string,
|
|
77
|
-
commitData:
|
|
78
|
-
writes: PreparedWrite[],
|
|
76
|
+
commitData: CommitDataWithOps,
|
|
79
77
|
) {
|
|
80
|
-
const seqEvt = await sequencer.formatSeqCommit(did, commitData
|
|
78
|
+
const seqEvt = await sequencer.formatSeqCommit(did, commitData)
|
|
81
79
|
const evt = cborDecode(seqEvt.event) as sequencer.CommitEvt
|
|
82
80
|
evt.blocks = new Uint8Array() // bad blocks
|
|
83
81
|
seqEvt.event = cborEncode(evt)
|