toolsOzoneModerationEmitEvent top-level constant
tools.ozone.moderation.emitEvent
Implementation
const toolsOzoneModerationEmitEvent = <String, dynamic>{
"lexicon": 1,
"id": "tools.ozone.moderation.emitEvent",
"defs": {
"main": {
"type": "procedure",
"description": "Take a moderation action on an actor.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["event", "subject", "createdBy"],
"properties": {
"event": {
"type": "union",
"refs": [
"tools.ozone.moderation.defs#modEventTakedown",
"tools.ozone.moderation.defs#modEventAcknowledge",
"tools.ozone.moderation.defs#modEventEscalate",
"tools.ozone.moderation.defs#modEventComment",
"tools.ozone.moderation.defs#modEventLabel",
"tools.ozone.moderation.defs#modEventReport",
"tools.ozone.moderation.defs#modEventMute",
"tools.ozone.moderation.defs#modEventUnmute",
"tools.ozone.moderation.defs#modEventMuteReporter",
"tools.ozone.moderation.defs#modEventUnmuteReporter",
"tools.ozone.moderation.defs#modEventReverseTakedown",
"tools.ozone.moderation.defs#modEventResolveAppeal",
"tools.ozone.moderation.defs#modEventEmail",
"tools.ozone.moderation.defs#modEventDivert",
"tools.ozone.moderation.defs#modEventTag",
"tools.ozone.moderation.defs#accountEvent",
"tools.ozone.moderation.defs#identityEvent",
"tools.ozone.moderation.defs#recordEvent",
"tools.ozone.moderation.defs#modEventPriorityScore",
"tools.ozone.moderation.defs#ageAssuranceEvent",
"tools.ozone.moderation.defs#ageAssuranceOverrideEvent",
"tools.ozone.moderation.defs#ageAssurancePurgeEvent",
"tools.ozone.moderation.defs#revokeAccountCredentialsEvent",
"tools.ozone.moderation.defs#scheduleTakedownEvent",
"tools.ozone.moderation.defs#cancelScheduledTakedownEvent",
],
},
"subject": {
"type": "union",
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef",
],
},
"subjectBlobCids": {
"type": "array",
"items": {"type": "string", "format": "cid"},
},
"createdBy": {"type": "string", "format": "did"},
"modTool": {
"type": "ref",
"ref": "tools.ozone.moderation.defs#modTool",
},
"externalId": {
"type": "string",
"description":
"An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject.",
},
"reportAction": {
"type": "ref",
"description":
"Optional report-level targeting. If provided, this event will be linked to specific reports and reporters may be notified.",
"ref": "#reportAction",
},
},
},
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "tools.ozone.moderation.defs#modEventView",
},
},
"errors": [
{"name": "SubjectHasAction"},
{
"name": "DuplicateExternalId",
"description":
"An event with the same external ID already exists for the subject.",
},
],
},
"reportAction": {
"type": "object",
"description": "Target specific reports when emitting a moderation event",
"properties": {
"ids": {
"type": "array",
"description": "Target specific report IDs",
"items": {"type": "integer"},
},
"types": {
"type": "array",
"description":
"Target reports matching these report types on the subject (fully qualified NSIDs). Excludes assigned and escalated reports.",
"items": {"type": "string"},
},
"all": {
"type": "boolean",
"description":
"Target ALL reports on the subject. Excludes assigned and escalated reports.",
},
"allOwned": {
"type": "boolean",
"description":
"Target all eligible reports on the account and its owned subjects, including records, messages, and conversations. Only valid for account subjects and events that close reports. Excludes assigned, escalated, and actively assigned reports unless explicitly targeted by ID.",
},
"subjects": {
"type": "array",
"description":
"Expands report targeting to include additional subjects. Requires event subject to be an account. Mutually exclusive with `subjectTypes`.",
"items": {
"type": "union",
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef",
],
},
"maxLength": 100,
},
"subjectTypes": {
"type": "array",
"description":
"Expands report targeting to include owned subjects of these types. Requires event subject to be an account. Mutually exclusive with `subjects`.",
"items": {
"type": "string",
"enum": ["account", "record", "message", "conversation"],
},
"maxLength": 4,
},
"note": {
"type": "string",
"description":
"Note to send to reporter(s) when actioning their report",
},
"isAutomated": {
"type": "boolean",
"description":
"Set true when the report activities are created by an automated process.",
},
},
},
},
};