Skip to content

Commit

Permalink
Merge pull request #1795 from myConsciousness/pull-latest-lexicons
Browse files Browse the repository at this point in the history
  • Loading branch information
myConsciousness authored Nov 8, 2024
2 parents ae3bad2 + bf044be commit 07c9617
Show file tree
Hide file tree
Showing 16 changed files with 864 additions and 9 deletions.
128 changes: 126 additions & 2 deletions lexicons/tools/ozone/moderation/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
"#modEventEmail",
"#modEventResolveAppeal",
"#modEventDivert",
"#modEventTag"
"#modEventTag",
"#accountEvent",
"#identityEvent",
"#recordEvent"
]
},
"subject": {
Expand Down Expand Up @@ -78,7 +81,10 @@
"#modEventEmail",
"#modEventResolveAppeal",
"#modEventDivert",
"#modEventTag"
"#modEventTag",
"#accountEvent",
"#identityEvent",
"#recordEvent"
]
},
"subject": {
Expand Down Expand Up @@ -110,6 +116,10 @@
"com.atproto.repo.strongRef"
]
},
"hosting": {
"type": "union",
"refs": ["#accountHosting", "#recordHosting"]
},
"subjectBlobCids": {
"type": "array",
"items": { "type": "string", "format": "cid" }
Expand Down Expand Up @@ -390,6 +400,62 @@
}
}
},
"accountEvent": {
"type": "object",
"description": "Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",
"required": ["timestamp", "active"],
"properties": {
"comment": { "type": "string" },
"active": {
"type": "boolean",
"description": "Indicates that the account has a repository which can be fetched from the host that emitted this event."
},
"status": {
"type": "string",
"knownValues": [
"unknown",
"deactivated",
"deleted",
"takendown",
"suspended",
"tombstoned"
]
},
"timestamp": {
"type": "string",
"format": "datetime"
}
}
},
"identityEvent": {
"type": "object",
"description": "Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",
"required": ["timestamp"],
"properties": {
"comment": { "type": "string" },
"handle": { "type": "string", "format": "handle" },
"pdsHost": { "type": "string", "format": "uri" },
"tombstone": { "type": "boolean" },
"timestamp": {
"type": "string",
"format": "datetime"
}
}
},
"recordEvent": {
"type": "object",
"description": "Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",
"required": ["timestamp", "op"],
"properties": {
"comment": { "type": "string" },
"op": {
"type": "string",
"knownValues": ["create", "update", "delete"]
},
"cid": { "type": "string", "format": "cid" },
"timestamp": { "type": "string", "format": "datetime" }
}
},
"repoView": {
"type": "object",
"required": [
Expand Down Expand Up @@ -578,6 +644,64 @@
"height": { "type": "integer" },
"length": { "type": "integer" }
}
},
"accountHosting": {
"type": "object",
"required": ["status"],
"properties": {
"status": {
"type": "string",
"knownValues": [
"takendown",
"suspended",
"deleted",
"deactivated",
"unknown"
]
},
"updatedAt": {
"type": "string",
"format": "datetime"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"deletedAt": {
"type": "string",
"format": "datetime"
},
"deactivatedAt": {
"type": "string",
"format": "datetime"
},
"reactivatedAt": {
"type": "string",
"format": "datetime"
}
}
},
"recordHosting": {
"type": "object",
"required": ["status"],
"properties": {
"status": {
"type": "string",
"knownValues": ["deleted", "unknown"]
},
"updatedAt": {
"type": "string",
"format": "datetime"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"deletedAt": {
"type": "string",
"format": "datetime"
}
}
}
}
}
5 changes: 4 additions & 1 deletion lexicons/tools/ozone/moderation/emitEvent.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
"tools.ozone.moderation.defs#modEventReverseTakedown",
"tools.ozone.moderation.defs#modEventResolveAppeal",
"tools.ozone.moderation.defs#modEventEmail",
"tools.ozone.moderation.defs#modEventTag"
"tools.ozone.moderation.defs#modEventTag",
"tools.ozone.moderation.defs#accountEvent",
"tools.ozone.moderation.defs#identityEvent",
"tools.ozone.moderation.defs#recordEvent"
]
},
"subject": {
Expand Down
27 changes: 27 additions & 0 deletions lexicons/tools/ozone/moderation/queryStatuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,33 @@
"format": "datetime",
"description": "Search subjects reviewed after a given timestamp"
},
"hostingDeletedAfter": {
"type": "string",
"format": "datetime",
"description": "Search subjects where the associated record/account was deleted after a given timestamp"
},
"hostingDeletedBefore": {
"type": "string",
"format": "datetime",
"description": "Search subjects where the associated record/account was deleted before a given timestamp"
},
"hostingUpdatedAfter": {
"type": "string",
"format": "datetime",
"description": "Search subjects where the associated record/account was updated after a given timestamp"
},
"hostingUpdatedBefore": {
"type": "string",
"format": "datetime",
"description": "Search subjects where the associated record/account was updated before a given timestamp"
},
"hostingStatuses": {
"type": "array",
"items": {
"type": "string"
},
"description": "Search subjects by the status of the associated record/account"
},
"reviewedBefore": {
"type": "string",
"format": "datetime",
Expand Down
63 changes: 63 additions & 0 deletions lexicons/tools/ozone/setting/defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"lexicon": 1,
"id": "tools.ozone.setting.defs",
"defs": {
"option": {
"type": "object",
"required": [
"key",
"value",
"did",
"scope",
"createdBy",
"lastUpdatedBy"
],
"properties": {
"key": {
"type": "string",
"format": "nsid"
},
"did": {
"type": "string",
"format": "did"
},
"value": {
"type": "unknown"
},
"description": {
"type": "string",
"maxGraphemes": 1024,
"maxLength": 10240
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"updatedAt": {
"type": "string",
"format": "datetime"
},
"managerRole": {
"type": "string",
"knownValues": [
"tools.ozone.team.defs#roleModerator",
"tools.ozone.team.defs#roleTriage",
"tools.ozone.team.defs#roleAdmin"
]
},
"scope": {
"type": "string",
"knownValues": ["instance", "personal"]
},
"createdBy": {
"type": "string",
"format": "did"
},
"lastUpdatedBy": {
"type": "string",
"format": "did"
}
}
}
}
}
61 changes: 61 additions & 0 deletions lexicons/tools/ozone/setting/listOptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"lexicon": 1,
"id": "tools.ozone.setting.listOptions",
"defs": {
"main": {
"type": "query",
"description": "List settings with optional filtering",
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": {
"type": "string"
},
"scope": {
"type": "string",
"knownValues": ["instance", "personal"],
"default": "instance"
},
"prefix": {
"type": "string",
"description": "Filter keys by prefix"
},
"keys": {
"type": "array",
"maxLength": 100,
"items": {
"type": "string",
"format": "nsid"
},
"description": "Filter for only the specified keys. Ignored if prefix is provided"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["options"],
"properties": {
"cursor": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "ref",
"ref": "tools.ozone.setting.defs#option"
}
}
}
}
}
}
}
}
39 changes: 39 additions & 0 deletions lexicons/tools/ozone/setting/removeOptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"lexicon": 1,
"id": "tools.ozone.setting.removeOptions",
"defs": {
"main": {
"type": "procedure",
"description": "Delete settings by key",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["keys", "scope"],
"properties": {
"keys": {
"type": "array",
"minLength": 1,
"maxLength": 200,
"items": {
"type": "string",
"format": "nsid"
}
},
"scope": {
"type": "string",
"knownValues": ["instance", "personal"]
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}
Loading

0 comments on commit 07c9617

Please sign in to comment.