{
  "$defs": {
    "JsonValue": {}
  },
  "$id": "https://schemas.mapi.dev/v1/api-WorkflowSchedule.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "examples": [
    {
      "active": true,
      "created_at": "2026-10-15T09:30:00Z",
      "cron": "0 6 * * 1",
      "id": "sch_01jaf3f1g2h3j4k5m6n7p8q9r0",
      "next_run_at": "2026-10-19T04:00:00Z",
      "timezone": "Europe/Berlin",
      "workflow_id": "wf_01jaf3e1f2g3h4j5k6m7n8p9q0"
    }
  ],
  "properties": {
    "active": {
      "title": "Active",
      "type": "boolean"
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "created_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Created By"
    },
    "cron": {
      "title": "Cron",
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Description"
    },
    "id": {
      "examples": [
        "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
      ],
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
      "title": "Id",
      "type": "string"
    },
    "inputs": {
      "additionalProperties": {
        "type": "string"
      },
      "title": "Inputs",
      "type": "object"
    },
    "last_run_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Last Run At"
    },
    "last_run_id": {
      "anyOf": [
        {
          "examples": [
            "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
          ],
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Last Run Id"
    },
    "next_run_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Next Run At"
    },
    "params": {
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      },
      "title": "Params",
      "type": "object"
    },
    "revision": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Revision"
    },
    "timezone": {
      "title": "Timezone",
      "type": "string"
    },
    "workflow_id": {
      "examples": [
        "run_01jaf3q2x8m9v7k5h4g3f2e1d0"
      ],
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
      "title": "Workflow Id",
      "type": "string"
    }
  },
  "required": [
    "id",
    "workflow_id",
    "cron",
    "timezone",
    "active",
    "created_at"
  ],
  "title": "WorkflowSchedule",
  "type": "object",
  "x-mapi-contract-version": "0.2"
}
