@atproto/ozone 0.1.82 → 0.1.84
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 +18 -0
- package/dist/api/moderation/emitEvent.d.ts.map +1 -1
- package/dist/api/moderation/emitEvent.js +16 -17
- package/dist/api/moderation/emitEvent.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +100 -34
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +71 -15
- 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/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +2 -2
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api/moderation/emitEvent.ts +4 -6
- package/src/lexicon/lexicons.ts +80 -16
- 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/src/lexicon/types/tools/ozone/moderation/defs.ts +2 -2
- package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +1 -0
|
@@ -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'
|
|
@@ -284,10 +284,10 @@ export function validateModEventResolveAppeal<V>(v: V) {
|
|
|
284
284
|
return validate<ModEventResolveAppeal & V>(v, id, hashModEventResolveAppeal)
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
/** Add a comment to a subject */
|
|
287
|
+
/** Add a comment to a subject. An empty comment will clear any previously set sticky comment. */
|
|
288
288
|
export interface ModEventComment {
|
|
289
289
|
$type?: 'tools.ozone.moderation.defs#modEventComment'
|
|
290
|
-
comment
|
|
290
|
+
comment?: string
|
|
291
291
|
/** Make the comment persistent on the subject */
|
|
292
292
|
sticky?: boolean
|
|
293
293
|
}
|
|
@@ -32,6 +32,7 @@ export interface InputSchema {
|
|
|
32
32
|
| $Typed<ToolsOzoneModerationDefs.ModEventReverseTakedown>
|
|
33
33
|
| $Typed<ToolsOzoneModerationDefs.ModEventResolveAppeal>
|
|
34
34
|
| $Typed<ToolsOzoneModerationDefs.ModEventEmail>
|
|
35
|
+
| $Typed<ToolsOzoneModerationDefs.ModEventDivert>
|
|
35
36
|
| $Typed<ToolsOzoneModerationDefs.ModEventTag>
|
|
36
37
|
| $Typed<ToolsOzoneModerationDefs.AccountEvent>
|
|
37
38
|
| $Typed<ToolsOzoneModerationDefs.IdentityEvent>
|