{
"id": "tools.ozone.safelink.defs",
"defs": {
"event": {
"type": "object",
"required": [
"id",
"eventType",
"url",
"pattern",
"action",
"reason",
"createdBy",
"createdAt"
],
"properties": {
"id": {
"type": "integer",
"description": "Auto-incrementing row ID"
},
"url": {
"type": "string",
"description": "The URL that this rule applies to"
},
"action": {
"ref": "#actionType",
"type": "ref"
},
"reason": {
"ref": "#reasonType",
"type": "ref"
},
"comment": {
"type": "string",
"description": "Optional comment about the decision"
},
"pattern": {
"ref": "#patternType",
"type": "ref"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"createdBy": {
"type": "string",
"format": "did",
"description": "DID of the user who created this rule"
},
"eventType": {
"ref": "#eventType",
"type": "ref"
}
},
"description": "An event for URL safety decisions"
},
"urlRule": {
"type": "object",
"required": [
"url",
"pattern",
"action",
"reason",
"createdBy",
"createdAt",
"updatedAt"
],
"properties": {
"url": {
"type": "string",
"description": "The URL or domain to apply the rule to"
},
"action": {
"ref": "#actionType",
"type": "ref"
},
"reason": {
"ref": "#reasonType",
"type": "ref"
},
"comment": {
"type": "string",
"description": "Optional comment about the decision"
},
"pattern": {
"ref": "#patternType",
"type": "ref"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Timestamp when the rule was created"
},
"createdBy": {
"type": "string",
"format": "did",
"description": "DID of the user added the rule."
},
"updatedAt": {
"type": "string",
"format": "datetime",
"description": "Timestamp when the rule was last updated"
}
},
"description": "Input for creating a URL safety rule"
},
"eventType": {
"type": "string",
"knownValues": [
"addRule",
"updateRule",
"removeRule"
]
},
"actionType": {
"type": "string",
"knownValues": [
"block",
"warn",
"whitelist"
]
},
"reasonType": {
"type": "string",
"knownValues": [
"csam",
"spam",
"phishing",
"none"
]
},
"patternType": {
"type": "string",
"knownValues": [
"domain",
"url"
]
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}