Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into multi-pds-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed Nov 30, 2023
2 parents fa406b5 + 1f9040a commit c3b1805
Show file tree
Hide file tree
Showing 119 changed files with 6,882 additions and 7,513 deletions.
319 changes: 234 additions & 85 deletions lexicons/com/atproto/admin/defs.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.admin.takeModerationAction",
"id": "com.atproto.admin.emitModerationEvent",
"defs": {
"main": {
"type": "procedure",
Expand All @@ -9,14 +9,21 @@
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["action", "subject", "reason", "createdBy"],
"required": ["event", "subject", "createdBy"],
"properties": {
"action": {
"type": "string",
"knownValues": [
"com.atproto.admin.defs#takedown",
"com.atproto.admin.defs#flag",
"com.atproto.admin.defs#acknowledge"
"event": {
"type": "union",
"refs": [
"com.atproto.admin.defs#modEventTakedown",
"com.atproto.admin.defs#modEventAcknowledge",
"com.atproto.admin.defs#modEventEscalate",
"com.atproto.admin.defs#modEventComment",
"com.atproto.admin.defs#modEventLabel",
"com.atproto.admin.defs#modEventReport",
"com.atproto.admin.defs#modEventMute",
"com.atproto.admin.defs#modEventReverseTakedown",
"com.atproto.admin.defs#modEventUnmute",
"com.atproto.admin.defs#modEventEmail"
]
},
"subject": {
Expand All @@ -30,19 +37,6 @@
"type": "array",
"items": { "type": "string", "format": "cid" }
},
"createLabelVals": {
"type": "array",
"items": { "type": "string" }
},
"negateLabelVals": {
"type": "array",
"items": { "type": "string" }
},
"reason": { "type": "string" },
"durationInHours": {
"type": "integer",
"description": "Indicates how long this action is meant to be in effect before automatically expiring."
},
"createdBy": { "type": "string", "format": "did" }
}
}
Expand All @@ -51,7 +45,7 @@
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "com.atproto.admin.defs#actionView"
"ref": "com.atproto.admin.defs#modEventView"
}
},
"errors": [{ "name": "SubjectHasAction" }]
Expand Down
40 changes: 0 additions & 40 deletions lexicons/com/atproto/admin/getModerationActions.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"lexicon": 1,
"id": "com.atproto.admin.getModerationAction",
"id": "com.atproto.admin.getModerationEvent",
"defs": {
"main": {
"type": "query",
"description": "Get details about a moderation action.",
"description": "Get details about a moderation event.",
"parameters": {
"type": "params",
"required": ["id"],
Expand All @@ -16,7 +16,7 @@
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "com.atproto.admin.defs#actionViewDetail"
"ref": "com.atproto.admin.defs#modEventViewDetail"
}
}
}
Expand Down
24 changes: 0 additions & 24 deletions lexicons/com/atproto/admin/getModerationReport.json

This file was deleted.

65 changes: 0 additions & 65 deletions lexicons/com/atproto/admin/getModerationReports.json

This file was deleted.

60 changes: 60 additions & 0 deletions lexicons/com/atproto/admin/queryModerationEvents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"lexicon": 1,
"id": "com.atproto.admin.queryModerationEvents",
"defs": {
"main": {
"type": "query",
"description": "List moderation events related to a subject.",
"parameters": {
"type": "params",
"properties": {
"types": {
"type": "array",
"items": { "type": "string" },
"description": "The types of events (fully qualified string in the format of com.atproto.admin#modEvent<name>) to filter by. If not specified, all events are returned."
},
"createdBy": {
"type": "string",
"format": "did"
},
"sortDirection": {
"type": "string",
"default": "desc",
"enum": ["asc", "desc"],
"description": "Sort direction for the events. Defaults to descending order of created at timestamp."
},
"subject": { "type": "string", "format": "uri" },
"includeAllUserRecords": {
"type": "boolean",
"default": false,
"description": "If true, events on all record types (posts, lists, profile etc.) owned by the did are returned"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": { "type": "string" }
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["events"],
"properties": {
"cursor": { "type": "string" },
"events": {
"type": "array",
"items": {
"type": "ref",
"ref": "com.atproto.admin.defs#modEventView"
}
}
}
}
}
}
}
}
95 changes: 95 additions & 0 deletions lexicons/com/atproto/admin/queryModerationStatuses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"lexicon": 1,
"id": "com.atproto.admin.queryModerationStatuses",
"defs": {
"main": {
"type": "query",
"description": "View moderation statuses of subjects (record or repo).",
"parameters": {
"type": "params",
"properties": {
"subject": { "type": "string", "format": "uri" },
"comment": {
"type": "string",
"description": "Search subjects by keyword from comments"
},
"reportedAfter": {
"type": "string",
"format": "datetime",
"description": "Search subjects reported after a given timestamp"
},
"reportedBefore": {
"type": "string",
"format": "datetime",
"description": "Search subjects reported before a given timestamp"
},
"reviewedAfter": {
"type": "string",
"format": "datetime",
"description": "Search subjects reviewed after a given timestamp"
},
"reviewedBefore": {
"type": "string",
"format": "datetime",
"description": "Search subjects reviewed before a given timestamp"
},
"includeMuted": {
"type": "boolean",
"description": "By default, we don't include muted subjects in the results. Set this to true to include them."
},
"reviewState": {
"type": "string",
"description": "Specify when fetching subjects in a certain state"
},
"ignoreSubjects": {
"type": "array",
"items": { "type": "string", "format": "uri" }
},
"lastReviewedBy": {
"type": "string",
"format": "did",
"description": "Get all subject statuses that were reviewed by a specific moderator"
},
"sortField": {
"type": "string",
"default": "lastReportedAt",
"enum": ["lastReviewedAt", "lastReportedAt"]
},
"sortDirection": {
"type": "string",
"default": "desc",
"enum": ["asc", "desc"]
},
"takendown": {
"type": "boolean",
"description": "Get subjects that were taken down"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": { "type": "string" }
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["subjectStatuses"],
"properties": {
"cursor": { "type": "string" },
"subjectStatuses": {
"type": "array",
"items": {
"type": "ref",
"ref": "com.atproto.admin.defs#subjectStatusView"
}
}
}
}
}
}
}
}
Loading

0 comments on commit c3b1805

Please sign in to comment.