{
  "lexicon": 1,
  "id": "org.tangled.temp.repo.getSiteConfig",
  "defs": {
    "main": {
      "type": "query",
      "description": "Get the site configuration for a repository, if one exists.",
      "parameters": {
        "type": "params",
        "required": ["repoDid"],
        "properties": {
          "repoDid": {
            "type": "string",
            "format": "did",
            "description": "DID of the repository as minted by the knot."
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "properties": {
            "config": {
              "type": "ref",
              "ref": "#siteConfig",
              "description": "Site config for the repository. Absent if no site is configured."
            }
          }
        }
      }
    },
    "siteConfig": {
      "type": "object",
      "required": ["branch", "dir", "isIndex"],
      "properties": {
        "branch": {
          "type": "string",
          "description": "Branch to deploy from."
        },
        "dir": {
          "type": "string",
          "description": "Directory within the repository to deploy (e.g. '/' or '/docs')."
        },
        "isIndex": {
          "type": "boolean",
          "description": "Whether this repo serves as the index (root) for the domain."
        }
      }
    }
  }
}
