{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaquill-ai/json-schema/vaquill-ai-page-workflow-definition-schema.json",
  "title": "Page[WorkflowDefinition]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaquill-ai-workflows-api-openapi.yml#/components/schemas/Page_WorkflowDefinition_",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/WorkflowDefinition"
      },
      "type": "array",
      "title": "Data",
      "description": "The rows in this window, in the collection's default order."
    },
    "pagination": {
      "$ref": "#/$defs/Pagination",
      "description": "Where this window sits in the full result set."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "$defs": {
    "Pagination": {
      "properties": {
        "limit": {
          "type": "integer",
          "title": "Limit",
          "description": "The `limit` that was applied to this request."
        },
        "offset": {
          "type": "integer",
          "title": "Offset",
          "description": "The `offset` that was applied to this request."
        },
        "total": {
          "type": "integer",
          "title": "Total",
          "description": "Total rows matching the filter, not the number returned in `data`. Use it to size a job before running it."
        },
        "hasMore": {
          "type": "boolean",
          "title": "Hasmore",
          "description": "True when rows remain beyond this window. Derived from `offset + len(data) < total`, so a full final page correctly reports `false` rather than sending you after an empty page."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "limit",
        "offset",
        "total",
        "hasMore"
      ],
      "title": "Pagination",
      "description": "Where the caller is, and whether there is more.\n\n`total` is the count of rows matching the filter, not the count returned,\nso a caller can size a job before running it."
    },
    "WorkflowArtifactSpec": {
      "properties": {
        "key": {
          "type": "string",
          "title": "Key",
          "description": "Stable slug for this artifact. This is the value `workflowRuns.artifact` takes, so a download can be wired up before anything is run."
        },
        "label": {
          "type": "string",
          "title": "Label",
          "description": "Human-readable name for the deliverable."
        },
        "contentType": {
          "type": "string",
          "title": "Contenttype",
          "description": "IANA media type the artifact will be produced in."
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description",
          "description": "What the artifact contains."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "key",
        "label",
        "contentType"
      ],
      "title": "WorkflowArtifactSpec",
      "description": "A deliverable this workflow produces, named before it exists.\n\n`key` is what `workflowRuns.artifact` takes, so a customer can wire up the\ndownload before running anything. `sampleUrl` is not carried over: it points\ninto the web app's static tree and means nothing to a backend."
    },
    "WorkflowDefinition": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Identifier of the workflow definition. Pass it in the path when launching a run."
        },
        "title": {
          "type": "string",
          "title": "Title",
          "description": "The workflow's display name."
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "What the workflow does."
        },
        "category": {
          "type": "string",
          "title": "Category",
          "description": "Broad grouping for the catalogue."
        },
        "practiceAreas": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Practiceareas",
          "description": "Practice areas this workflow suits."
        },
        "estimatedMinutesMin": {
          "type": "integer",
          "title": "Estimatedminutesmin",
          "description": "Low end of the expected run time in minutes. Use it to size your polling interval."
        },
        "estimatedMinutesMax": {
          "type": "integer",
          "title": "Estimatedminutesmax",
          "description": "High end of the expected run time in minutes."
        },
        "documentSlots": {
          "items": {
            "$ref": "#/$defs/WorkflowDocumentSlot"
          },
          "type": "array",
          "title": "Documentslots",
          "description": "What documents the workflow accepts, and in which roles. Validate against this before launching rather than discovering the shape from 422s."
        },
        "inputs": {
          "items": {
            "$ref": "#/$defs/WorkflowInputField"
          },
          "type": "array",
          "title": "Inputs",
          "description": "The questions this workflow asks. Their `key` values are the keys of the run request's `inputs` object."
        },
        "artifacts": {
          "items": {
            "$ref": "#/$defs/WorkflowArtifactSpec"
          },
          "type": "array",
          "title": "Artifacts",
          "description": "The deliverables a finished run produces."
        },
        "bestFor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bestfor",
          "description": "When to reach for this workflow, in plain language."
        },
        "limitations": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Limitations",
          "description": "What this workflow does not do. Worth reading before wiring it into an automated path."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "title",
        "description",
        "category",
        "estimatedMinutesMin",
        "estimatedMinutesMax"
      ],
      "title": "WorkflowDefinition",
      "description": "One catalogue entry.\n\nOnly active definitions are listed. A retired one still resolves in code so\nold runs stay readable, but offering it would be offering something the\nlaunch route refuses."
    },
    "WorkflowDocumentSlot": {
      "properties": {
        "role": {
          "type": "string",
          "title": "Role",
          "description": "The role slug to pass as a document's `role` when launching a run."
        },
        "label": {
          "type": "string",
          "title": "Label",
          "description": "Human-readable name for this slot."
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description",
          "description": "What sort of document belongs in this slot."
        },
        "minCount": {
          "type": "integer",
          "title": "Mincount",
          "description": "Fewest documents accepted in this role."
        },
        "maxCount": {
          "type": "integer",
          "title": "Maxcount",
          "description": "Most documents accepted in this role."
        },
        "required": {
          "type": "boolean",
          "title": "Required",
          "description": "True when a run cannot start without at least one document in this role."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "role",
        "label",
        "minCount",
        "maxCount",
        "required"
      ],
      "title": "WorkflowDocumentSlot",
      "description": "What a definition will accept in one role, so a caller can validate first.\n\nPublished because the alternative is a customer discovering the shape of a\nworkflow by submitting runs and reading 422s."
    },
    "WorkflowInputField": {
      "properties": {
        "key": {
          "type": "string",
          "title": "Key",
          "description": "The key to use for this field inside the run request's `inputs` object."
        },
        "label": {
          "type": "string",
          "title": "Label",
          "description": "Human-readable question text."
        },
        "fieldType": {
          "type": "string",
          "title": "Fieldtype",
          "description": "What sort of value is expected, for example a string, a date or a choice. A plain string, since the internal vocabulary grows whenever the launcher gains a widget."
        },
        "required": {
          "type": "boolean",
          "title": "Required",
          "description": "True when a run is refused without this input.",
          "default": false
        },
        "options": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Options",
          "description": "Allowed values when the field is a choice."
        },
        "placeholder": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Placeholder",
          "description": "Example value, for display."
        },
        "helpText": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Helptext",
          "description": "Extra guidance on what to supply."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "key",
        "label",
        "fieldType"
      ],
      "title": "WorkflowInputField",
      "description": "One question the definition asks, and how it is answered."
    }
  }
}