22d039a229
* ✨ Initial implementation of sets api on ozone * ✨ Introduce sortDirection to querySets * 🧹 Cleanup and refactor * ✨ Align setView for response * ♻️ Rename and add specific error * 🐛 Cleanup unnecessary check that is covered by lexicon * ✨ Rename remove to delete and add set suffix * ✨ Use id and createdAt for values pagination * ✨ Add index on createdAt for query perf and other cleanups * 🐛 Set createdAt when inserting values * 📝 Add changeset * ✨ Add index on setId and createdAt
58 lines
1.3 KiB
JSON
58 lines
1.3 KiB
JSON
{
|
|
"lexicon": 1,
|
|
"id": "tools.ozone.set.querySets",
|
|
"defs": {
|
|
"main": {
|
|
"type": "query",
|
|
"description": "Query available sets",
|
|
"parameters": {
|
|
"type": "params",
|
|
"properties": {
|
|
"limit": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"default": 50
|
|
},
|
|
"cursor": {
|
|
"type": "string"
|
|
},
|
|
"namePrefix": {
|
|
"type": "string"
|
|
},
|
|
"sortBy": {
|
|
"type": "string",
|
|
"enum": ["name", "createdAt", "updatedAt"],
|
|
"default": "name"
|
|
},
|
|
"sortDirection": {
|
|
"type": "string",
|
|
"default": "asc",
|
|
"enum": ["asc", "desc"],
|
|
"description": "Defaults to ascending order of name field."
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"encoding": "application/json",
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["sets"],
|
|
"properties": {
|
|
"sets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "ref",
|
|
"ref": "tools.ozone.set.defs#setView"
|
|
}
|
|
},
|
|
"cursor": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|