{
"$defs": {
"MemberKind": {
"description": "Whether a member is a person or an agent.",
"oneOf": [
{
"const": "person",
"description": "A human.",
"type": "string"
},
{
"const": "agent",
"description": "A K2 agent.",
"type": "string"
}
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "Query of `GET /api/v1/directory`.",
"properties": {
"channel_id": {
"description": "Only members of this channel.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
},
"cursor": {
"description": "`next_cursor` of the previous page.",
"type": [
"string",
"null"
]
},
"kind": {
"anyOf": [
{
"$ref": "#/$defs/MemberKind"
},
{
"type": "null"
}
],
"description": "Persons or agents only."
},
"limit": {
"description": "1–100 (default 50).",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"q": {
"description": "1–80 characters; every token prefix-matches a name, title or username word.",
"type": [
"string",
"null"
]
},
"space_id": {
"description": "Only members of this space.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
}
},
"title": "DirectoryQuery",
"type": "object"
}