{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The logins to this appview's pages of the account whose session cookie asks, each a browser or app that logged in, the newest first, while they last. Logging out of one, or revoking it with dev.knotless.revokeSession, ends it alone; the last to end revokes the session the appview keeps at the account's PDS. Requires the session cookie the pages' login sets.",
      "errors": [
        {
          "description": "No account is logged in to the pages, or its login has ended.",
          "name": "AuthenticationRequired"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "sessions": {
              "items": {
                "ref": "#session",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "sessions"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "session": {
      "description": "One login to the pages.",
      "properties": {
        "createdAt": {
          "description": "When it logged in.",
          "format": "datetime",
          "type": "string"
        },
        "current": {
          "description": "Whether it is the login asking.",
          "type": "boolean"
        },
        "sessionId": {
          "description": "What names the login to dev.knotless.revokeSession.",
          "maxLength": 64,
          "type": "string"
        },
        "userAgent": {
          "description": "The user agent it logged in with, as the browser or app named itself, cut to 512 characters.",
          "maxLength": 512,
          "type": "string"
        }
      },
      "required": [
        "sessionId",
        "createdAt",
        "current"
      ],
      "type": "object"
    }
  },
  "description": "Where the account logged in to this appview's pages is logged in.",
  "id": "dev.knotless.listSessions",
  "lexicon": 1
}
