{
"id": "space.highport.manage.grantSpaceAccess",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"space",
"delegationToken"
],
"properties": {
"space": {
"type": "string",
"format": "at-uri"
},
"delegationToken": {
"type": "string",
"description": "A delegation token the caller minted for this space. Used once and never stored."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "SpaceNotFound",
"description": "Bard is not connected to that space. Call connectSpace first."
},
{
"name": "GrantIssuerMismatch",
"description": "The delegation token was not issued by the caller."
},
{
"name": "GrantExpired",
"description": "The delegation token has expired."
},
{
"name": "GrantRefused",
"description": "The space host refused the exchange."
},
{
"name": "AppNotAllowed",
"description": "The space does not allow bard access."
},
{
"name": "SpacesDisabled",
"description": "Space support is disabled on this deployment."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"accessExpiresAt",
"drained"
],
"properties": {
"drained": {
"type": "integer",
"description": "Queued notifications this grant turned into sync jobs."
},
"accessExpiresAt": {
"type": "string",
"format": "datetime",
"description": "When bard's new credential expires."
},
"registrationExpiresAt": {
"type": "string",
"format": "datetime",
"description": "When bard's notification registration with the space host expires."
}
}
},
"encoding": "application/json"
},
"description": "Give bard a delegation token so it can keep reading a space. Any member can call this with a token they issued. Bard trades it for a credential, renews its notification registration when due, and catches up on anything it missed."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}