{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Pipeline",
  "title": "Pipeline",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique pipeline identifier"
    },
    "name": {
      "type": "string",
      "description": "Pipeline name"
    },
    "type": {
      "type": "string",
      "enum": [
        "bigquery",
        "snowflake",
        "s3",
        "gcs",
        "azure-blob"
      ],
      "description": "Destination type"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused",
        "error"
      ],
      "description": "Current pipeline status"
    },
    "fromDate": {
      "type": "string",
      "format": "date",
      "description": "Start date for data export"
    },
    "dataTypes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "event",
          "people",
          "group"
        ]
      },
      "description": "Types of data to export"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the pipeline was created"
    },
    "lastRunAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the pipeline last ran"
    },
    "schemaType": {
      "type": "string",
      "enum": [
        "monoschema",
        "multischema"
      ],
      "description": "Schema type for the export"
    },
    "frequency": {
      "type": "string",
      "enum": [
        "hourly",
        "daily"
      ],
      "description": "How often the pipeline runs"
    }
  }
}