{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Records in one of a group's content spaces, from the host's index of it: one collection or every collection, newest first, a page at a time. Only for those the space's own access record lets read, checked on every call — anyone, signed in or not, for one open to anyone.",
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "NotAuthorized"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "records": {
              "items": {
                "ref": "#spaceRecord",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "records"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "collection": {
            "format": "nsid",
            "type": "string"
          },
          "cursor": {
            "description": "From the last page: continues with older records.",
            "type": "string"
          },
          "equals": {
            "maxLength": 2048,
            "type": "string"
          },
          "field": {
            "description": "Only records whose field (a name or a dotted path, like subject.uri) equals `equals`.",
            "maxLength": 128,
            "type": "string"
          },
          "group": {
            "format": "did",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "space": {
            "description": "The space's URI.",
            "type": "string"
          },
          "uri": {
            "description": "One record in the space, by its URI.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "group",
          "space"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "spaceRecord": {
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "repo": {
          "format": "did",
          "type": "string"
        },
        "uri": {
          "type": "string"
        },
        "value": {
          "type": "unknown"
        }
      },
      "required": [
        "uri",
        "cid",
        "repo",
        "value",
        "createdAt"
      ],
      "type": "object"
    }
  },
  "id": "fyi.opensocial.listSpaceRecords",
  "lexicon": 1
}
