@atproto/bsky 0.0.121 → 0.0.123
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/index.d.ts +2 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +4 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +164 -28
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +104 -13
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/updateAllRead.d.ts +40 -0
- package/dist/lexicon/types/chat/bsky/convo/updateAllRead.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/updateAllRead.js +7 -0
- package/dist/lexicon/types/chat/bsky/convo/updateAllRead.js.map +1 -0
- 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/index.ts +12 -0
- package/src/lexicon/lexicons.ts +112 -14
- package/src/lexicon/types/chat/bsky/convo/updateAllRead.ts +53 -0
- 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
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express';
|
|
5
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
|
|
6
|
+
export interface QueryParams {
|
|
7
|
+
}
|
|
8
|
+
export interface InputSchema {
|
|
9
|
+
status?: 'request' | 'accepted' | (string & {});
|
|
10
|
+
}
|
|
11
|
+
export interface OutputSchema {
|
|
12
|
+
/** The count of updated convos. */
|
|
13
|
+
updatedCount: number;
|
|
14
|
+
}
|
|
15
|
+
export interface HandlerInput {
|
|
16
|
+
encoding: 'application/json';
|
|
17
|
+
body: InputSchema;
|
|
18
|
+
}
|
|
19
|
+
export interface HandlerSuccess {
|
|
20
|
+
encoding: 'application/json';
|
|
21
|
+
body: OutputSchema;
|
|
22
|
+
headers?: {
|
|
23
|
+
[key: string]: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface HandlerError {
|
|
27
|
+
status: number;
|
|
28
|
+
message?: string;
|
|
29
|
+
}
|
|
30
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
|
31
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
32
|
+
auth: HA;
|
|
33
|
+
params: QueryParams;
|
|
34
|
+
input: HandlerInput;
|
|
35
|
+
req: express.Request;
|
|
36
|
+
res: express.Response;
|
|
37
|
+
resetRouteRateLimits: () => Promise<void>;
|
|
38
|
+
};
|
|
39
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
40
|
+
//# sourceMappingURL=updateAllRead.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateAllRead.d.ts","sourceRoot":"","sources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a,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'chat.bsky.convo.updateAllRead';
|
|
7
|
+
//# sourceMappingURL=updateAllRead.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateAllRead.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/chat/bsky/convo/updateAllRead.ts"],"names":[],"mappings":";;AAMA,mDAA4D;AAC5D,2CAAyE;AAGzE,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,+BAA+B,CAAA"}
|
|
@@ -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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AAE,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,OAA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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;AAYD,kCAEC;AAED,8CAEC;AAUD,wBAEC;AAED,oCAEC;AAeD,4BAEC;AAED,wCAEC;AA9OD,mDAA4D;AAC5D,2CAAyE;AAIzE,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,iCAAiC,CAAA;AAwD5C,MAAM,UAAU,GAAG,QAAQ,CAAA;AAE3B,SAAgB,QAAQ,CAAI,CAAI;IAC9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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.6",
|
|
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.6",
|
|
77
77
|
"@atproto/lex-cli": "^0.6.1",
|
|
78
|
-
"@atproto/pds": "^0.4.
|
|
78
|
+
"@atproto/pds": "^0.4.102",
|
|
79
79
|
"@atproto/xrpc": "^0.6.9"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
package/src/lexicon/index.ts
CHANGED
|
@@ -163,6 +163,7 @@ import * as ChatBskyConvoMuteConvo from './types/chat/bsky/convo/muteConvo.js'
|
|
|
163
163
|
import * as ChatBskyConvoSendMessage from './types/chat/bsky/convo/sendMessage.js'
|
|
164
164
|
import * as ChatBskyConvoSendMessageBatch from './types/chat/bsky/convo/sendMessageBatch.js'
|
|
165
165
|
import * as ChatBskyConvoUnmuteConvo from './types/chat/bsky/convo/unmuteConvo.js'
|
|
166
|
+
import * as ChatBskyConvoUpdateAllRead from './types/chat/bsky/convo/updateAllRead.js'
|
|
166
167
|
import * as ChatBskyConvoUpdateRead from './types/chat/bsky/convo/updateRead.js'
|
|
167
168
|
import * as ChatBskyModerationGetActorMetadata from './types/chat/bsky/moderation/getActorMetadata.js'
|
|
168
169
|
import * as ChatBskyModerationGetMessageContext from './types/chat/bsky/moderation/getMessageContext.js'
|
|
@@ -2170,6 +2171,17 @@ export class ChatBskyConvoNS {
|
|
|
2170
2171
|
return this._server.xrpc.method(nsid, cfg)
|
|
2171
2172
|
}
|
|
2172
2173
|
|
|
2174
|
+
updateAllRead<AV extends AuthVerifier>(
|
|
2175
|
+
cfg: ConfigOf<
|
|
2176
|
+
AV,
|
|
2177
|
+
ChatBskyConvoUpdateAllRead.Handler<ExtractAuth<AV>>,
|
|
2178
|
+
ChatBskyConvoUpdateAllRead.HandlerReqCtx<ExtractAuth<AV>>
|
|
2179
|
+
>,
|
|
2180
|
+
) {
|
|
2181
|
+
const nsid = 'chat.bsky.convo.updateAllRead' // @ts-ignore
|
|
2182
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2173
2185
|
updateRead<AV extends AuthVerifier>(
|
|
2174
2186
|
cfg: ConfigOf<
|
|
2175
2187
|
AV,
|
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
|
},
|
|
@@ -10979,6 +11042,40 @@ export const schemaDict = {
|
|
|
10979
11042
|
},
|
|
10980
11043
|
},
|
|
10981
11044
|
},
|
|
11045
|
+
ChatBskyConvoUpdateAllRead: {
|
|
11046
|
+
lexicon: 1,
|
|
11047
|
+
id: 'chat.bsky.convo.updateAllRead',
|
|
11048
|
+
defs: {
|
|
11049
|
+
main: {
|
|
11050
|
+
type: 'procedure',
|
|
11051
|
+
input: {
|
|
11052
|
+
encoding: 'application/json',
|
|
11053
|
+
schema: {
|
|
11054
|
+
type: 'object',
|
|
11055
|
+
properties: {
|
|
11056
|
+
status: {
|
|
11057
|
+
type: 'string',
|
|
11058
|
+
knownValues: ['request', 'accepted'],
|
|
11059
|
+
},
|
|
11060
|
+
},
|
|
11061
|
+
},
|
|
11062
|
+
},
|
|
11063
|
+
output: {
|
|
11064
|
+
encoding: 'application/json',
|
|
11065
|
+
schema: {
|
|
11066
|
+
type: 'object',
|
|
11067
|
+
required: ['updatedCount'],
|
|
11068
|
+
properties: {
|
|
11069
|
+
updatedCount: {
|
|
11070
|
+
description: 'The count of updated convos.',
|
|
11071
|
+
type: 'integer',
|
|
11072
|
+
},
|
|
11073
|
+
},
|
|
11074
|
+
},
|
|
11075
|
+
},
|
|
11076
|
+
},
|
|
11077
|
+
},
|
|
11078
|
+
},
|
|
10982
11079
|
ChatBskyConvoUpdateRead: {
|
|
10983
11080
|
lexicon: 1,
|
|
10984
11081
|
id: 'chat.bsky.convo.updateRead',
|
|
@@ -11399,6 +11496,7 @@ export const ids = {
|
|
|
11399
11496
|
ChatBskyConvoSendMessage: 'chat.bsky.convo.sendMessage',
|
|
11400
11497
|
ChatBskyConvoSendMessageBatch: 'chat.bsky.convo.sendMessageBatch',
|
|
11401
11498
|
ChatBskyConvoUnmuteConvo: 'chat.bsky.convo.unmuteConvo',
|
|
11499
|
+
ChatBskyConvoUpdateAllRead: 'chat.bsky.convo.updateAllRead',
|
|
11402
11500
|
ChatBskyConvoUpdateRead: 'chat.bsky.convo.updateRead',
|
|
11403
11501
|
ChatBskyModerationGetActorMetadata: 'chat.bsky.moderation.getActorMetadata',
|
|
11404
11502
|
ChatBskyModerationGetMessageContext: 'chat.bsky.moderation.getMessageContext',
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { CID } from 'multiformats/cid'
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
8
|
+
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
const is$typed = _is$typed,
|
|
12
|
+
validate = _validate
|
|
13
|
+
const id = 'chat.bsky.convo.updateAllRead'
|
|
14
|
+
|
|
15
|
+
export interface QueryParams {}
|
|
16
|
+
|
|
17
|
+
export interface InputSchema {
|
|
18
|
+
status?: 'request' | 'accepted' | (string & {})
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface OutputSchema {
|
|
22
|
+
/** The count of updated convos. */
|
|
23
|
+
updatedCount: number
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface HandlerInput {
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
body: InputSchema
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface HandlerSuccess {
|
|
32
|
+
encoding: 'application/json'
|
|
33
|
+
body: OutputSchema
|
|
34
|
+
headers?: { [key: string]: string }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface HandlerError {
|
|
38
|
+
status: number
|
|
39
|
+
message?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
43
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
44
|
+
auth: HA
|
|
45
|
+
params: QueryParams
|
|
46
|
+
input: HandlerInput
|
|
47
|
+
req: express.Request
|
|
48
|
+
res: express.Response
|
|
49
|
+
resetRouteRateLimits: () => Promise<void>
|
|
50
|
+
}
|
|
51
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
52
|
+
ctx: HandlerReqCtx<HA>,
|
|
53
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -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'
|