{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Names, in the repository's dev.knotless.repo record, the account and name it is offered to, as `knotless repo transfer` does, or with no `to` takes the offer back. It moves when that account takes it up (dev.knotless.acceptTransfer). A private repository cannot move. Only its owner, logged in to this appview's web pages, can: the appview writes with the session it keeps for that account, which the pages' session cookie names.",
      "errors": [
        {
          "description": "No such repository.",
          "name": "NotFound"
        },
        {
          "description": "The account is the owner's own, there is no such account, or the repository is private.",
          "name": "InvalidRequest"
        },
        {
          "description": "No account is logged in to the pages, or its session has ended.",
          "name": "AuthenticationRequired"
        },
        {
          "description": "The account logged in is not the repository's owner.",
          "name": "Forbidden"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "name": {
              "description": "The name it would have there: its own when absent.",
              "maxLength": 100,
              "type": "string"
            },
            "repo": {
              "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
              "format": "at-uri",
              "type": "string"
            },
            "to": {
              "description": "The account to offer it to, by handle or DID. Absent, the offer is withdrawn.",
              "format": "at-identifier",
              "type": "string"
            }
          },
          "required": [
            "repo"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "transfer": {
              "description": "Where it is offered now; absent once withdrawn.",
              "ref": "dev.knotless.defs#repoViewBasic",
              "type": "ref"
            }
          },
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Offers a repository to another account, or withdraws the offer.",
  "id": "dev.knotless.transferRepo",
  "lexicon": 1
}
