{ "lexicon": 1, "id": "org.atgrp.internal.listGroupTokens", "defs": { "main": { "type": "query", "description": "The OAuth sessions issued by this host for the group DID (apps acting as the group), plus recent activity. Requires group.configure.", "parameters": { "type": "params", "required": [ "group" ], "properties": { "group": { "type": "string", "format": "did" } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "sessions", "activity" ], "properties": { "sessions": { "type": "array", "items": { "type": "ref", "ref": "#sessionView" } }, "activity": { "type": "array", "items": { "type": "ref", "ref": "#activityView" } } } } } }, "sessionView": { "type": "object", "description": "A session an app holds as the group.", "required": [ "tokenId", "clientId", "member", "source", "grantedAt" ], "properties": { "tokenId": { "type": "string" }, "clientId": { "type": "string", "description": "The app's OAuth client id." }, "client": { "type": "ref", "ref": "#clientView", "description": "The app, as its OAuth client metadata names it, when that can be read." }, "member": { "type": "string", "format": "did", "description": "Who let it in." }, "actor": { "type": "ref", "ref": "org.atgrp.internal.defs#actorView", "description": "Who let it in, with their handle where it can be read." }, "role": { "type": "string", "description": "The role it was given, if one." }, "source": { "type": "string", "knownValues": [ "oauth", "getGroupAuth", "appPassword" ] }, "scope": { "type": "string" }, "grantedAt": { "type": "string", "format": "datetime" }, "lastUsedAt": { "type": "string", "format": "datetime" }, "expiresAt": { "type": "string", "format": "datetime" } } }, "activityView": { "type": "object", "description": "Something an app did as the group.", "required": [ "member", "action", "at" ], "properties": { "member": { "type": "string", "format": "did", "description": "Who let the app in." }, "actor": { "type": "ref", "ref": "org.atgrp.internal.defs#actorView", "description": "Who let the app in, with their handle where it can be read." }, "clientId": { "type": "string", "description": "The app's OAuth client id." }, "client": { "type": "ref", "ref": "#clientView", "description": "The app, as its OAuth client metadata names it, when that can be read." }, "action": { "type": "string", "description": "The method it called, the record it wrote, or what it did to a space, as the log says it." }, "write": { "type": "ref", "ref": "#writeView", "description": "The record it wrote, in parts, when it was a write." }, "space": { "type": "ref", "ref": "#spaceView", "description": "The space it made, changed or ended, when it did that." }, "subject": { "type": "ref", "ref": "org.atgrp.internal.defs#actorView", "description": "Whom the write is about, with their handle where it can be read: whose DID keys the record (a membership), or whose inbox it was written in (an invite)." }, "at": { "type": "string", "format": "datetime" } } }, "writeView": { "type": "object", "description": "A record an app wrote as the group.", "required": [ "operation", "collection", "rkey" ], "properties": { "operation": { "type": "string", "knownValues": [ "create", "update", "delete" ] }, "collection": { "type": "string", "format": "nsid" }, "rkey": { "type": "string", "description": "The record's key." }, "space": { "type": "string", "description": "The space it was written in, by its at:space/ URI; none for the group's public repo." }, "description": { "type": "string", "description": "What the kind of record is, as its lexicon describes it, when that lexicon is another app's and can be read." } } }, "clientView": { "type": "object", "description": "An app, as its OAuth client metadata names it.", "required": [ "clientId" ], "properties": { "clientId": { "type": "string", "description": "The app's OAuth client id." }, "name": { "type": "string", "description": "Its name (client_name)." }, "uri": { "type": "string", "format": "uri", "description": "Its home page (client_uri), when on the client id's own origin." }, "logo": { "type": "string", "format": "uri", "description": "Its logo (logo_uri), when the host serves it at /img/app?id=, as a page is to draw it." } } }, "spaceView": { "type": "object", "description": "A change an app made to one of the group's spaces.", "required": [ "space", "operation" ], "properties": { "space": { "type": "string", "description": "The space, by its at:space/ URI." }, "operation": { "type": "string", "knownValues": [ "create", "update", "delete" ] }, "publicRead": { "type": "boolean", "description": "Whether anyone may read the space now, when this change switched it: true, made readable by anyone; false, made readable only by those its policy names." } } } } }