{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Change a space: its name in the group's index, and its access record, replaced whole. Requires space.configure.",
      "errors": [
        {
          "description": "The group has no such space, or, to name it, none in its index.",
          "name": "SpaceNotFound"
        },
        {
          "description": "A grant names a role that doesn't exist.",
          "name": "UnknownRole"
        },
        {
          "description": "A grant isn't a space scope.",
          "name": "InvalidScope"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "access": {
              "description": "The access record the space has now. Omitted means unchanged.",
              "ref": "fyi.opensocial.defs#accessConfig",
              "type": "ref"
            },
            "group": {
              "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.",
              "format": "did",
              "type": "string"
            },
            "name": {
              "description": "What the group calls it, kept in its index entry.",
              "maxGraphemes": 64,
              "maxLength": 640,
              "type": "string"
            },
            "space": {
              "format": "space-ref",
              "type": "string"
            }
          },
          "required": [
            "group",
            "space"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {},
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.updateSpace",
  "lexicon": 1
}
