{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/SyncRun",
  "title": "SyncRun",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "pipeId": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "running",
        "completed",
        "failed",
        "cancelled"
      ]
    },
    "rowsSynced": {
      "type": "integer"
    },
    "rowsFailed": {
      "type": "integer"
    },
    "startedAt": {
      "type": "string",
      "format": "date-time"
    },
    "completedAt": {
      "type": "string",
      "format": "date-time"
    },
    "duration": {
      "type": "integer",
      "description": "Duration in milliseconds"
    },
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "code": {
          "type": "string"
        }
      }
    }
  }
}