{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/neuron-ng/json-schema/neuron-ng-lead-source-schema.json",
  "title": "LeadSource",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/neuron-ng-openapi.json#/components/schemas/LeadSource",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "orgId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "csv",
        "text_paste",
        "document",
        "web_scrape",
        "tool_output",
        "instagram",
        "x",
        "facebook",
        "tiktok",
        "stream"
      ]
    },
    "config": {
      "type": "object",
      "description": "type-specific: text_paste {text}; web_scrape {url|urls[]}; document {mediaUrl,mimeType}; tool_output {toolId,args?}; instagram/x/facebook/tiktok {channelId?, query?|hashtag?, limit?}; csv {rows[]}; stream {triggerTaskId?}"
    },
    "scheduleKind": {
      "type": "string",
      "enum": [
        "cron",
        "interval",
        "once",
        "manual"
      ]
    },
    "schedule": {
      "type": "object"
    },
    "timezone": {
      "type": "string"
    },
    "enabled": {
      "type": "boolean"
    },
    "lastRunAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "nextRunAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "runCount": {
      "type": "integer"
    },
    "leadCount": {
      "type": "integer"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}