{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The workflows under .knotless/workflows at a ref of a repository, in file name order, each with what runs it there, as `knotless workflow list` lists them: which its owner may ask for by name, with variables, through dev.knotless.requestRerun. No authentication; responses are not personalized.",
      "errors": [
        {
          "description": "No such repository, or no such ref.",
          "name": "NotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "ref": {
              "description": "The ref, in full.",
              "type": "string"
            },
            "workflows": {
              "items": {
                "ref": "#workflowView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "ref",
            "workflows"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "ref": {
            "description": "A branch or a tag, by name or in full; the default branch if none.",
            "maxLength": 1024,
            "type": "string"
          },
          "repo": {
            "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "repo"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "scheduleView": {
      "description": "One schedule a workflow runs on, at the default branch's tip.",
      "properties": {
        "cron": {
          "description": "A cron expression, in UTC: minute hour day month weekday, or @hourly, @daily, @weekly, @monthly or @yearly.",
          "type": "string"
        }
      },
      "required": [
        "cron"
      ],
      "type": "object"
    },
    "workflowView": {
      "description": "A workflow at the ref, and what runs it there.",
      "properties": {
        "asked": {
          "description": "Its owner may ask for it at the ref by name: it runs on a push there, its asked trigger names the ref, or the ref is the default branch and it has a schedule.",
          "type": "boolean"
        },
        "error": {
          "description": "Why it does not load: nothing runs it then.",
          "type": "string"
        },
        "name": {
          "description": "What its checks are filed as.",
          "type": "string"
        },
        "pull": {
          "description": "A pull into the ref, a branch, runs it.",
          "type": "boolean"
        },
        "push": {
          "description": "A push to the ref runs it.",
          "type": "boolean"
        },
        "schedule": {
          "description": "The schedules it runs on at the ref, the default branch; none at any other ref.",
          "items": {
            "ref": "#scheduleView",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "name",
        "push",
        "pull",
        "asked"
      ],
      "type": "object"
    }
  },
  "description": "A repository's workflows at a ref, and what runs each there.",
  "id": "dev.knotless.listWorkflows",
  "lexicon": 1
}
