~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
594 lines · 16.9 KB Raw History
{
  "lexicon": 1,
  "id": "org.atgrp.internal.defs",
  "defs": {
    "inviteView": {
      "type": "object",
      "required": [
        "uri",
        "invitee",
        "createdAt"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "invitee": {
          "type": "string",
          "format": "did"
        },
        "message": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "datetime"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "actor": {
          "type": "ref",
          "ref": "#actorView",
          "description": "Whom it invites, with their handle where it can be read: on listInvites."
        }
      }
    },
    "joinPolicy": {
      "type": "string",
      "knownValues": [
        "open",
        "approval",
        "invite"
      ],
      "description": "open admits anyone; approval queues a join request; invite requires an invitation. An invitation admits its recipient under any policy."
    },
    "groupView": {
      "type": "object",
      "description": "A group as a list shows it. To a caller not signed in, only its did and handle.",
      "required": [
        "did",
        "handle"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "handle": {
          "type": "string",
          "format": "handle"
        },
        "address": {
          "type": "string",
          "description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own."
        },
        "domain": {
          "type": "string",
          "description": "The domain of its own the group is served at rather than its address, when it is: its handle (putGroupDomain)."
        },
        "meta": {
          "type": "string",
          "format": "space-ref"
        },
        "members": {
          "type": "string",
          "format": "space-ref"
        },
        "displayName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "website": {
          "type": "string",
          "format": "uri",
          "description": "The group's website, from its about record, if it gives one."
        },
        "joinPolicy": {
          "type": "string",
          "description": "How new members get in, as its config record states it."
        },
        "avatar": {
          "type": "string",
          "description": "CID of the avatar blob; the host serves it at /img/{did}/{cid}, to whoever may read the meta space."
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "ref",
            "ref": "#groupRule"
          }
        },
        "deactivated": {
          "type": "boolean",
          "description": "Set while a steward has the group switched off. Its spaces cannot be read until one of the stewards who could switch it off switches it back on."
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the group was started on this host."
        }
      }
    },
    "groupViewDetailed": {
      "type": "object",
      "description": "A group in full, as the viewer may see it. Its about and config fields are present only when the viewer may read the meta space; its rules and labels only when the viewer may read the members space.",
      "required": [
        "did",
        "handle"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "handle": {
          "type": "string",
          "format": "handle"
        },
        "address": {
          "type": "string",
          "description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own."
        },
        "domain": {
          "type": "string",
          "description": "The domain of its own the group is served at rather than its address, when it is: its handle (putGroupDomain)."
        },
        "meta": {
          "type": "string",
          "format": "space-ref"
        },
        "members": {
          "type": "string",
          "format": "space-ref"
        },
        "displayName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "website": {
          "type": "string",
          "format": "uri",
          "description": "The group's website, from its about record, if it gives one."
        },
        "joinPolicy": {
          "type": "string",
          "description": "How new members get in, as its config record states it."
        },
        "avatar": {
          "type": "string",
          "description": "CID of the avatar blob; the host serves it at /img/{did}/{cid}, to whoever may read the meta space."
        },
        "deactivated": {
          "type": "boolean",
          "description": "Set while a steward has the group switched off. Its spaces cannot be read until one of the stewards who could switch it off switches it back on."
        },
        "rules": {
          "type": "array",
          "description": "In the order they are presented. Absent when the members space is closed to the viewer.",
          "items": {
            "type": "ref",
            "ref": "#groupRule"
          }
        },
        "labels": {
          "type": "array",
          "description": "The labels it defines, each with what it means and how apps should show it. Absent when the members space is closed to the viewer.",
          "items": {
            "type": "ref",
            "ref": "com.atproto.label.defs#labelValueDefinition"
          }
        },
        "memberCount": {
          "type": "integer",
          "minimum": 0,
          "description": "How many are in it. Present only when the viewer may read the members space, whose members listMembers gives a page at a time."
        },
        "viewer": {
          "type": "ref",
          "ref": "#viewerState"
        }
      }
    },
    "viewerState": {
      "type": "object",
      "description": "The requesting account's standing in the group. Only present for authed requests. For a group switched off, nothing of their standing is read: member is false, roles and actions empty, and steward says whether they may switch it back on.",
      "required": [
        "member",
        "roles",
        "actions"
      ],
      "properties": {
        "member": {
          "type": "boolean"
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "ref",
            "ref": "#roleRef"
          }
        },
        "actions": {
          "type": "array",
          "description": "The union of actions across the viewer's roles: what the host would let them do.",
          "items": {
            "type": "ref",
            "ref": "org.atgrp.internal.defs#action"
          }
        },
        "accepted": {
          "type": "boolean",
          "description": "For a member: whether their own acceptance is in the members space."
        },
        "request": {
          "type": "ref",
          "ref": "org.atgrp.defs#joinRequest",
          "description": "The viewer's own pending request to join, when they are not a member and have one."
        },
        "steward": {
          "type": "boolean",
          "description": "For a group switched off, whose membership cannot be read: whether the viewer held group.configure when it was switched off, and so may switch it back on or delete it. Absent while the group is on."
        },
        "labelSpaces": {
          "type": "array",
          "description": "For a member: the group's spaces where their roles let them write labels as the group, by the scopes their roles hold across it or a space's policy grants them there.",
          "items": {
            "type": "ref",
            "ref": "#spaceRef"
          }
        },
        "grantable": {
          "type": "array",
          "description": "For a member: of each action's permission and the group's authManageBasic, authManageMembers and authModerate permission sets, those the viewer's roles hold enough of to add to a role. Adding any other is refused with ScopeNotHeld.",
          "items": {
            "type": "ref",
            "ref": "#scopeRef"
          }
        }
      }
    },
    "groupRule": {
      "type": "object",
      "required": [
        "rkey",
        "title"
      ],
      "properties": {
        "rkey": {
          "type": "string",
          "format": "record-key"
        },
        "title": {
          "type": "string",
          "maxLength": 1000,
          "maxGraphemes": 100
        },
        "text": {
          "type": "string",
          "maxLength": 20000,
          "maxGraphemes": 2000
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        }
      }
    },
    "actorView": {
      "type": "object",
      "required": [
        "did"
      ],
      "description": "A person, as a view names them: their DID, and the handle their DID document names, when it can be read.",
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "handle": {
          "type": "string",
          "format": "handle",
          "description": "The handle their DID document names; missing when it names none or cannot be read."
        },
        "canCreateGroup": {
          "type": "boolean",
          "description": "Only on the caller's own view, from getActor: whether this host lets them start a group (createGroup)."
        }
      }
    },
    "memberView": {
      "type": "object",
      "required": [
        "actor",
        "roles"
      ],
      "properties": {
        "actor": {
          "type": "ref",
          "ref": "#actorView"
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "ref",
            "ref": "#roleRef"
          }
        }
      }
    },
    "roleView": {
      "type": "object",
      "required": [
        "key"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "The role id: its record key."
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "bot": {
          "type": "boolean",
          "description": "People with this role are bots."
        },
        "default": {
          "type": "boolean",
          "description": "Granted to members who join through requestJoin."
        }
      }
    },
    "spaceView": {
      "type": "object",
      "description": "One of the group's spaces: those in its index, and those left out of it (unlisted) to whoever may read them.",
      "required": [
        "uri",
        "spaceType"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "space-ref"
        },
        "spaceType": {
          "type": "string",
          "format": "nsid"
        },
        "policy": {
          "type": "ref",
          "ref": "org.atgrp.policy",
          "description": "Its policy, when the viewer may read the space."
        }
      }
    },
    "groupViewBasic": {
      "type": "object",
      "required": [
        "did",
        "handle"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "handle": {
          "type": "string",
          "format": "handle"
        },
        "address": {
          "type": "string",
          "description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own."
        },
        "displayName": {
          "type": "string"
        },
        "avatar": {
          "type": "string",
          "description": "CID of the group's picture."
        },
        "website": {
          "type": "string",
          "format": "uri",
          "description": "The group's website, from its about record, if it gives one."
        },
        "memberCount": {
          "type": "integer",
          "minimum": 0,
          "description": "How many people are in it. Only to its members."
        },
        "sampleMembers": {
          "type": "array",
          "maxLength": 5,
          "items": {
            "type": "ref",
            "ref": "#actorView"
          },
          "description": "A few of its members, each as they are in the group, to show their faces. Only to its members."
        }
      }
    },
    "action": {
      "type": "string",
      "knownValues": [
        "mod.read",
        "mod.resolve",
        "label",
        "invite",
        "admit",
        "eject",
        "role.assign",
        "space.create",
        "space.configure",
        "space.delete",
        "group.configure"
      ],
      "maxLength": 64,
      "description": "What a holder of a role may do, as the host's methods ask: each is answered by the scope that grants it in the role's grant."
    },
    "roleBinding": {
      "type": "object",
      "description": "What one role may do, as the host reads its grant.",
      "required": [
        "role",
        "actions",
        "canAssign"
      ],
      "properties": {
        "role": {
          "type": "string",
          "maxLength": 64
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "ref",
            "ref": "#action"
          }
        },
        "canAssign": {
          "type": "array",
          "items": {
            "type": "ref",
            "ref": "#roleRef"
          }
        },
        "repoCollections": {
          "type": "array",
          "description": "The public-repo collections holders may write as the group; `*` for any.",
          "items": {
            "type": "ref",
            "ref": "#collectionRef"
          }
        },
        "permissions": {
          "type": "array",
          "description": "The role's permissions, as its role record has them.",
          "items": {
            "type": "ref",
            "ref": "#scopeRef"
          }
        }
      }
    },
    "roleRef": {
      "type": "object",
      "description": "A role, by its id: the record key of a org.atgrp.role record.",
      "required": [
        "role"
      ],
      "properties": {
        "role": {
          "type": "string",
          "maxLength": 64
        }
      }
    },
    "spaceRef": {
      "type": "object",
      "description": "A space, by its URI.",
      "required": [
        "space"
      ],
      "properties": {
        "space": {
          "type": "string",
          "format": "space-ref"
        }
      }
    },
    "scopeRef": {
      "type": "object",
      "description": "An OAuth scope, as a permission or permission set is written.",
      "required": [
        "scope"
      ],
      "properties": {
        "scope": {
          "type": "string",
          "maxLength": 400
        },
        "actions": {
          "type": "array",
          "description": "In a role's scopes: the actions the host reads this scope as granting.",
          "items": {
            "type": "ref",
            "ref": "#action"
          }
        }
      }
    },
    "collectionRef": {
      "type": "object",
      "description": "A collection of records, by its NSID, or * for any.",
      "required": [
        "collection"
      ],
      "properties": {
        "collection": {
          "type": "string",
          "maxLength": 317
        }
      }
    },
    "accountRef": {
      "type": "object",
      "description": "An account, by its DID.",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        }
      }
    },
    "modRecordView": {
      "type": "object",
      "description": "A record subject as the host's index of its space holds it, shown to a moderator whom the space lets read it, even when the group has taken it down.",
      "required": [
        "uri",
        "cid",
        "value",
        "createdAt",
        "takenDown"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri",
          "description": "The record's URI, in its space."
        },
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "The version the index holds, which may be newer than the one a report names."
        },
        "value": {
          "type": "unknown"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the index read this version."
        },
        "takenDown": {
          "type": "boolean",
          "description": "Whether a !takedown label of the group's, in force, keeps this version from everyone reading the space. Its files are then served only through getModSubjectBlob."
        }
      }
    }
  }
}