@atproto/pds 0.4.92 → 0.4.94
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/db/tables/moderation.d.ts +1 -1
- package/dist/db/tables/moderation.d.ts.map +1 -1
- package/dist/lexicon/lexicons.d.ts +76 -12
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +38 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts +7 -1
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/threadgate.js +10 -0
- package/dist/lexicon/types/app/bsky/feed/threadgate.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +12 -2
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.js +10 -0
- package/dist/lexicon/types/tools/ozone/moderation/defs.js.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/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts +3 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/db/tables/moderation.ts +4 -0
- package/src/lexicon/lexicons.ts +41 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +1 -0
- package/src/lexicon/types/app/bsky/feed/threadgate.ts +18 -0
- package/src/lexicon/types/tools/ozone/moderation/defs.ts +28 -0
- package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +1 -0
- package/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts +3 -0
- package/tests/__snapshots__/takedown-appeal.test.ts.snap +1 -0
- package/tests/proxied/__snapshots__/admin.test.ts.snap +3 -0
@@ -33,6 +33,7 @@ export interface ModEventView {
|
|
33
33
|
| AccountEvent
|
34
34
|
| IdentityEvent
|
35
35
|
| RecordEvent
|
36
|
+
| ModEventPriorityScore
|
36
37
|
| { $type: string; [k: string]: unknown }
|
37
38
|
subject:
|
38
39
|
| ComAtprotoAdminDefs.RepoRef
|
@@ -80,6 +81,7 @@ export interface ModEventViewDetail {
|
|
80
81
|
| AccountEvent
|
81
82
|
| IdentityEvent
|
82
83
|
| RecordEvent
|
84
|
+
| ModEventPriorityScore
|
83
85
|
| { $type: string; [k: string]: unknown }
|
84
86
|
subject:
|
85
87
|
| RepoView
|
@@ -124,6 +126,8 @@ export interface SubjectStatusView {
|
|
124
126
|
reviewState: SubjectReviewState
|
125
127
|
/** Sticky comment on the subject. */
|
126
128
|
comment?: string
|
129
|
+
/** Numeric value representing the level of priority. Higher score means higher priority. */
|
130
|
+
priorityScore?: number
|
127
131
|
muteUntil?: string
|
128
132
|
muteReportingUntil?: string
|
129
133
|
lastReviewedBy?: string
|
@@ -364,6 +368,30 @@ export function validateModEventLabel(v: unknown): ValidationResult {
|
|
364
368
|
return lexicons.validate('tools.ozone.moderation.defs#modEventLabel', v)
|
365
369
|
}
|
366
370
|
|
371
|
+
/** Set priority score of the subject. Higher score means higher priority. */
|
372
|
+
export interface ModEventPriorityScore {
|
373
|
+
comment?: string
|
374
|
+
score: number
|
375
|
+
[k: string]: unknown
|
376
|
+
}
|
377
|
+
|
378
|
+
export function isModEventPriorityScore(
|
379
|
+
v: unknown,
|
380
|
+
): v is ModEventPriorityScore {
|
381
|
+
return (
|
382
|
+
isObj(v) &&
|
383
|
+
hasProp(v, '$type') &&
|
384
|
+
v.$type === 'tools.ozone.moderation.defs#modEventPriorityScore'
|
385
|
+
)
|
386
|
+
}
|
387
|
+
|
388
|
+
export function validateModEventPriorityScore(v: unknown): ValidationResult {
|
389
|
+
return lexicons.validate(
|
390
|
+
'tools.ozone.moderation.defs#modEventPriorityScore',
|
391
|
+
v,
|
392
|
+
)
|
393
|
+
}
|
394
|
+
|
367
395
|
export interface ModEventAcknowledge {
|
368
396
|
comment?: string
|
369
397
|
/** If true, all other reports on content authored by this account will be resolved (acknowledged). */
|
@@ -32,6 +32,7 @@ export interface InputSchema {
|
|
32
32
|
| ToolsOzoneModerationDefs.AccountEvent
|
33
33
|
| ToolsOzoneModerationDefs.IdentityEvent
|
34
34
|
| ToolsOzoneModerationDefs.RecordEvent
|
35
|
+
| ToolsOzoneModerationDefs.ModEventPriorityScore
|
35
36
|
| { $type: string; [k: string]: unknown }
|
36
37
|
subject:
|
37
38
|
| ComAtprotoAdminDefs.RepoRef
|
@@ -54,6 +54,7 @@ export interface QueryParams {
|
|
54
54
|
| 'lastReportedAt'
|
55
55
|
| 'reportedRecordsCount'
|
56
56
|
| 'takendownRecordsCount'
|
57
|
+
| 'priorityScore'
|
57
58
|
sortDirection: 'asc' | 'desc'
|
58
59
|
/** Get subjects that were taken down */
|
59
60
|
takendown?: boolean
|
@@ -73,6 +74,8 @@ export interface QueryParams {
|
|
73
74
|
minReportedRecordsCount?: number
|
74
75
|
/** If specified, only subjects that belong to an account that has at least this many taken down records will be returned. */
|
75
76
|
minTakendownRecordsCount?: number
|
77
|
+
/** If specified, only subjects that have priority score value above the given value will be returned. */
|
78
|
+
minPriorityScore?: number
|
76
79
|
}
|
77
80
|
|
78
81
|
export type InputSchema = undefined
|
@@ -159,6 +159,7 @@ Object {
|
|
159
159
|
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
160
160
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
161
161
|
"lastReviewedBy": "user(1)",
|
162
|
+
"priorityScore": 0,
|
162
163
|
"recordsStats": Object {
|
163
164
|
"$type": "tools.ozone.moderation.defs#recordsStats",
|
164
165
|
"appealedCount": 0,
|
@@ -275,6 +276,7 @@ Object {
|
|
275
276
|
"id": 5,
|
276
277
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
277
278
|
"lastReviewedBy": "user(1)",
|
279
|
+
"priorityScore": 0,
|
278
280
|
"recordsStats": Object {
|
279
281
|
"$type": "tools.ozone.moderation.defs#recordsStats",
|
280
282
|
"appealedCount": 0,
|
@@ -356,6 +358,7 @@ Object {
|
|
356
358
|
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
357
359
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
358
360
|
"lastReviewedBy": "user(1)",
|
361
|
+
"priorityScore": 0,
|
359
362
|
"recordsStats": Object {
|
360
363
|
"$type": "tools.ozone.moderation.defs#recordsStats",
|
361
364
|
"appealedCount": 0,
|