Foysal Ahamed d6f33b4742
Add events for account and record update/delete/deactivation (#2661)
*  Add events for account and record update/delete/deactivation

*  Add handle change event

*  Reduce account events to 2 types and record events to 1

*  Store metadata from account, identity and record events

*  Add created event for record

*  Add ndd the new events to allowed types in emitEvent

*  Use string value for record op and add tombstone flag to identity event

*  Add active flag on account events

*  Change accountStatus -> status to match with firehose event

*  Make active flag required

* 🚨 fix prettier style issue

*  Track record/account delete and update data in subject status (#2804)

*  Store deleted/updated event data in subject_status

* 🐛 Fix query for recordDeletedAt and recordUpdatedAt

*  Add tombstoned status

*  Move from record to hosting term

*  Add tests for hosting params

*  Update lexicons for hostingStatuses

*  Update snapshots

*  Update snapshots

*  Update snapshots

*  Adjust hosting statuses

* 📝 Add changeset
2024-11-07 22:51:44 +01:00

62 lines
2.2 KiB
JSON

{
"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#modEventTag",
"tools.ozone.moderation.defs#accountEvent",
"tools.ozone.moderation.defs#identityEvent",
"tools.ozone.moderation.defs#recordEvent"
]
},
"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" }
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "tools.ozone.moderation.defs#modEventView"
}
},
"errors": [{ "name": "SubjectHasAction" }]
}
}
}