* ✨ Adds safelink module * ✨ Remove createdAt timestamp bloat * :rotating_lights: Fix lint issue * 🐛 Fix pagination * 🔨 Refactor safelink rule table * 🧹 Add better default * ✨ Better search params * ✨ Remove mod requirement for query rules and events * ✨ Cleanup search for queryEvents * 📝 Add changeset * :rotating_lights: Fix lint issue * 🧹 Adjust as per review feedback * ✨ Add support for sort direction in safelink rules * :rotating_lights: Fix lint issue * ✨ Split input and response object shape * :rotating_lights: Fix lint issue
83 lines
2.2 KiB
JSON
83 lines
2.2 KiB
JSON
{
|
|
"lexicon": 1,
|
|
"id": "tools.ozone.safelink.queryRules",
|
|
"defs": {
|
|
"main": {
|
|
"type": "procedure",
|
|
"description": "Query URL safety rules",
|
|
"input": {
|
|
"encoding": "application/json",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cursor": {
|
|
"type": "string",
|
|
"description": "Cursor for pagination"
|
|
},
|
|
"limit": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"default": 50,
|
|
"description": "Maximum number of results to return"
|
|
},
|
|
"urls": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Filter by specific URLs or domains"
|
|
},
|
|
"patternType": {
|
|
"type": "string",
|
|
"description": "Filter by pattern type"
|
|
},
|
|
"actions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Filter by action types"
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"description": "Filter by reason type"
|
|
},
|
|
"createdBy": {
|
|
"type": "string",
|
|
"format": "did",
|
|
"description": "Filter by rule creator"
|
|
},
|
|
"sortDirection": {
|
|
"type": "string",
|
|
"knownValues": ["asc", "desc"],
|
|
"default": "desc",
|
|
"description": "Sort direction"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"encoding": "application/json",
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["rules"],
|
|
"properties": {
|
|
"cursor": {
|
|
"type": "string",
|
|
"description": "Next cursor for pagination. Only present if there are more results."
|
|
},
|
|
"rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "ref",
|
|
"ref": "tools.ozone.safelink.defs#urlRule"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|