{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "entry": {
      "description": "An entry, as its author's repository holds it.",
      "properties": {
        "author": {
          "ref": "place.hud.defs#actor",
          "type": "ref"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "value": {
          "description": "The place.hud.app.entry record.",
          "type": "unknown"
        }
      },
      "required": [
        "uri",
        "author",
        "value"
      ],
      "type": "object"
    },
    "main": {
      "description": "The place.hud.app.entry records of one kind of a frame app, anyone's, as HUD's index has them, filtered and sorted by fields of their data, each with its author, a page at a time. An app that names its writers answers theirs alone. A collection the index is still taking in answers what it has, and says it is not complete. No auth required; each address asks at most 120 times a minute, with getShared and callSharedTool. With instance, those of a private instance of the app instead, read as the person (requires auth, as one of its members), its writable members' alone, from its members' repos in the space, each checked against its MAC.",
      "errors": [
        {
          "description": "HUD has no frame app of this id, or it has no kind of entry so named.",
          "name": "NotFound"
        },
        {
          "description": "With instance: the person is not one of its members, or there is no such instance.",
          "name": "NotAMember"
        },
        {
          "description": "With instance: the person's PDS gives no delegation token to read it with.",
          "name": "CannotRead"
        },
        {
          "description": "With instance: no live web session or HUD access token, or the person's sign-in at their PDS ended: sign in.",
          "name": "AuthRequired"
        },
        {
          "description": "The input is not what the method takes: a filter or sort not of the entries' data, among others.",
          "name": "InvalidRequest"
        },
        {
          "description": "This address asked too often in the last minute: ask again in a minute.",
          "name": "RateLimitExceeded"
        },
        {
          "description": "This server names no index (HUD_INDEX) to read entries from.",
          "name": "IndexUnavailable"
        },
        {
          "description": "The index refused, or could not be reached.",
          "name": "UpstreamFailure"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "complete": {
              "description": "Whether the index has every repository holding entries in, and every field asked of indexed: else ask again in a while for more.",
              "type": "boolean"
            },
            "cursor": {
              "description": "Where the next page starts, as the index says it; absent on the last. A page of an app that names its writers may hold fewer than limit and still have one.",
              "maxLength": 512,
              "type": "string"
            },
            "entries": {
              "items": {
                "ref": "#entry",
                "type": "ref"
              },
              "type": "array"
            },
            "version": {
              "description": "A mark of what the index read, which changes whenever that could have changed: the same read again with the same version answers the same. Opaque; absent where the index says none.",
              "maxLength": 128,
              "type": "string"
            }
          },
          "required": [
            "entries",
            "complete"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "app": {
            "description": "The app's place.hud.app record.",
            "format": "at-uri",
            "type": "string"
          },
          "cursor": {
            "description": "Where the last page ended, as its answer's cursor said.",
            "maxLength": 512,
            "type": "string"
          },
          "instance": {
            "description": "A private instance of the app (at:space/<authority DID>/place.hud.app.instance/<key>), to read its entries in place of everyone's.",
            "format": "at-uri",
            "type": "string"
          },
          "kind": {
            "description": "Which of its kinds of entry.",
            "maxLength": 64,
            "type": "string"
          },
          "limit": {
            "default": 30,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "order": {
            "default": "desc",
            "description": "Which way sort sorts.",
            "knownValues": [
              "asc",
              "desc"
            ],
            "maxLength": 8,
            "type": "string"
          },
          "sort": {
            "description": "A field of the entries' data to sort by (data.ms): those without it are left out. Newest first where none.",
            "maxLength": 256,
            "type": "string"
          },
          "where": {
            "description": "Filters, as JSON: an array of at most 6 of {path, op: value}, each path a field of the entry's data (data.track), each op one of eq, ne, in, contains, gt, gte, lt, lte or exists.",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "app",
          "kind"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "Everyone's entries of a kind of a frame app.",
  "id": "place.hud.listAppEntries",
  "lexicon": 1
}
