@atproto/api 0.13.28 → 0.13.30
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 +14 -0
- package/dist/client/lexicons.d.ts +204 -4
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +107 -1
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/feed/defs.d.ts +8 -0
- package/dist/client/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/defs.js +10 -0
- package/dist/client/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts +1 -1
- package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/getAuthorFeed.js.map +1 -1
- package/dist/client/types/tools/ozone/moderation/defs.d.ts +40 -0
- package/dist/client/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/moderation/defs.js +20 -0
- package/dist/client/types/tools/ozone/moderation/defs.js.map +1 -1
- package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts +7 -1
- package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/moderation/queryStatuses.js.map +1 -1
- package/package.json +2 -2
- package/src/client/lexicons.ts +116 -1
- package/src/client/types/app/bsky/feed/defs.ts +19 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +1 -0
- package/src/client/types/tools/ozone/moderation/defs.ts +62 -0
- package/src/client/types/tools/ozone/moderation/queryStatuses.ts +11 -1
|
@@ -136,6 +136,8 @@ export interface SubjectStatusView {
|
|
|
136
136
|
appealed?: boolean
|
|
137
137
|
suspendUntil?: string
|
|
138
138
|
tags?: string[]
|
|
139
|
+
accountStats?: AccountStats
|
|
140
|
+
recordsStats?: RecordsStats
|
|
139
141
|
[k: string]: unknown
|
|
140
142
|
}
|
|
141
143
|
|
|
@@ -151,6 +153,66 @@ export function validateSubjectStatusView(v: unknown): ValidationResult {
|
|
|
151
153
|
return lexicons.validate('tools.ozone.moderation.defs#subjectStatusView', v)
|
|
152
154
|
}
|
|
153
155
|
|
|
156
|
+
/** Statistics about a particular account subject */
|
|
157
|
+
export interface AccountStats {
|
|
158
|
+
/** Total number of reports on the account */
|
|
159
|
+
reportCount?: number
|
|
160
|
+
/** Total number of appeals against a moderation action on the account */
|
|
161
|
+
appealCount?: number
|
|
162
|
+
/** Number of times the account was suspended */
|
|
163
|
+
suspendCount?: number
|
|
164
|
+
/** Number of times the account was escalated */
|
|
165
|
+
escalateCount?: number
|
|
166
|
+
/** Number of times the account was taken down */
|
|
167
|
+
takedownCount?: number
|
|
168
|
+
[k: string]: unknown
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function isAccountStats(v: unknown): v is AccountStats {
|
|
172
|
+
return (
|
|
173
|
+
isObj(v) &&
|
|
174
|
+
hasProp(v, '$type') &&
|
|
175
|
+
v.$type === 'tools.ozone.moderation.defs#accountStats'
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function validateAccountStats(v: unknown): ValidationResult {
|
|
180
|
+
return lexicons.validate('tools.ozone.moderation.defs#accountStats', v)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** Statistics about a set of record subject items */
|
|
184
|
+
export interface RecordsStats {
|
|
185
|
+
/** Cumulative sum of the number of reports on the items in the set */
|
|
186
|
+
totalReports?: number
|
|
187
|
+
/** Number of items that were reported at least once */
|
|
188
|
+
reportedCount?: number
|
|
189
|
+
/** Number of items that were escalated at least once */
|
|
190
|
+
escalatedCount?: number
|
|
191
|
+
/** Number of items that were appealed at least once */
|
|
192
|
+
appealedCount?: number
|
|
193
|
+
/** Total number of item in the set */
|
|
194
|
+
subjectCount?: number
|
|
195
|
+
/** Number of item currently in "reviewOpen" or "reviewEscalated" state */
|
|
196
|
+
pendingCount?: number
|
|
197
|
+
/** Number of item currently in "reviewNone" or "reviewClosed" state */
|
|
198
|
+
processedCount?: number
|
|
199
|
+
/** Number of item currently taken down */
|
|
200
|
+
takendownCount?: number
|
|
201
|
+
[k: string]: unknown
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function isRecordsStats(v: unknown): v is RecordsStats {
|
|
205
|
+
return (
|
|
206
|
+
isObj(v) &&
|
|
207
|
+
hasProp(v, '$type') &&
|
|
208
|
+
v.$type === 'tools.ozone.moderation.defs#recordsStats'
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export function validateRecordsStats(v: unknown): ValidationResult {
|
|
213
|
+
return lexicons.validate('tools.ozone.moderation.defs#recordsStats', v)
|
|
214
|
+
}
|
|
215
|
+
|
|
154
216
|
export type SubjectReviewState =
|
|
155
217
|
| 'lex:tools.ozone.moderation.defs#reviewOpen'
|
|
156
218
|
| 'lex:tools.ozone.moderation.defs#reviewEscalated'
|
|
@@ -48,7 +48,11 @@ export interface QueryParams {
|
|
|
48
48
|
ignoreSubjects?: string[]
|
|
49
49
|
/** Get all subject statuses that were reviewed by a specific moderator */
|
|
50
50
|
lastReviewedBy?: string
|
|
51
|
-
sortField?:
|
|
51
|
+
sortField?:
|
|
52
|
+
| 'lastReviewedAt'
|
|
53
|
+
| 'lastReportedAt'
|
|
54
|
+
| 'reportedRecordsCount'
|
|
55
|
+
| 'takendownRecordsCount'
|
|
52
56
|
sortDirection?: 'asc' | 'desc'
|
|
53
57
|
/** Get subjects that were taken down */
|
|
54
58
|
takendown?: boolean
|
|
@@ -62,6 +66,12 @@ export interface QueryParams {
|
|
|
62
66
|
collections?: string[]
|
|
63
67
|
/** If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. */
|
|
64
68
|
subjectType?: 'account' | 'record' | (string & {})
|
|
69
|
+
/** If specified, only subjects that belong to an account that has at least this many suspensions will be returned. */
|
|
70
|
+
minAccountSuspendCount?: number
|
|
71
|
+
/** If specified, only subjects that belong to an account that has at least this many reported records will be returned. */
|
|
72
|
+
minReportedRecordsCount?: number
|
|
73
|
+
/** If specified, only subjects that belong to an account that has at least this many taken down records will be returned. */
|
|
74
|
+
minTakendownRecordsCount?: number
|
|
65
75
|
}
|
|
66
76
|
|
|
67
77
|
export type InputSchema = undefined
|