{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alphaai/json-schema/alphaai-calendar-events-schema.json",
  "title": "CalendarEvents",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alphaai-calendar-api-openapi.yml#/components/schemas/CalendarEvents",
  "type": "object",
  "properties": {
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CalendarEvent"
      }
    }
  },
  "$defs": {
    "CalendarEvent": {
      "type": "object",
      "description": "One scheduled occurrence of a US macro release. `uid` is a stable, opaque occurrence id — reschedules update the row in place, so the uid is safe to store and link. `phase` is computed against request time and only says whether the scheduled moment passed; check `schedule_status` first (a `cancelled` row's phase is meaningless).",
      "properties": {
        "uid": {
          "type": "string"
        },
        "event_key": {
          "type": "string",
          "enum": [
            "fomc_decision",
            "fomc_minutes",
            "cpi",
            "ppi",
            "nfp",
            "gdp",
            "pce",
            "retail_sales",
            "jobless_claims",
            "jolts"
          ]
        },
        "title": {
          "type": "string"
        },
        "reference_period": {
          "type": "string",
          "description": "What the release covers, machine-readable: a month (`2026-07`), a quarter (`2026-Q2`), or — for weekly claims — the reference week-ending Saturday (`2026-07-25`)."
        },
        "release_stage": {
          "type": [
            "string",
            "null"
          ],
          "description": "GDP only — `advance`, `second` or `third`; null elsewhere."
        },
        "scheduled_at": {
          "type": "string",
          "format": "date-time",
          "description": "Official release moment (UTC; 08:30 / 10:00 / 14:00 ET converted)."
        },
        "phase": {
          "type": "string",
          "enum": [
            "upcoming",
            "elapsed"
          ]
        },
        "schedule_status": {
          "type": "string",
          "enum": [
            "scheduled",
            "postponed",
            "cancelled"
          ]
        },
        "schedule_basis": {
          "type": "string",
          "enum": [
            "official",
            "inferred"
          ],
          "description": "`official`: the date is printed on the agency's own schedule page. `inferred`: derived from the documented publication cadence — weekly jobless claims (DOL publishes no forward schedule) and FOMC minutes dates the Fed has not printed yet (three weeks after the meeting). Inferred dates flip to official once the agency lists them."
        },
        "importance": {
          "type": "string",
          "enum": [
            "high",
            "medium",
            "low"
          ]
        },
        "category": {
          "$ref": "#/$defs/NewsCategory"
        },
        "country": {
          "type": "string"
        },
        "source_url": {
          "type": "string",
          "format": "uri",
          "description": "The agency's own schedule page for the series."
        },
        "press_conference_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "FOMC decisions only — the 14:30 ET press conference; null elsewhere."
        },
        "has_sep": {
          "type": "boolean",
          "description": "FOMC decisions only — true when the meeting carries a Summary of Economic Projections (the \"dot plot\")."
        }
      }
    },
    "NewsCategory": {
      "type": "string",
      "description": "`market_movers` is for articles whose subject IS a notable price move (\"AMD up 5% today\"); `sector_analysis` is genuine sector-level analysis; `insider` covers SEC Form 4 insider transactions only. SEC 8-K filings categorize by their primary item: an earnings release (Item 2.02) is `earnings`, a completed acquisition or disposition (Item 2.01) is `mergers_acquisitions`, and the remaining events (material agreements, debt, executive changes, annual-meeting results, and since 2026-09-17 securities offerings, Regulation FD disclosures and other events under Items 7.01/8.01) are `corporate_actions`. A foreign private issuer's SEC 6-K appears only when it is an earnings release (`source` \"SEC EDGAR 6-K\") and is always `earnings`.",
      "enum": [
        "earnings",
        "mergers_acquisitions",
        "regulation",
        "macro_economy",
        "sector_analysis",
        "market_movers",
        "technology",
        "commodities",
        "crypto",
        "ipo",
        "geopolitics",
        "insider",
        "corporate_actions",
        "other"
      ]
    }
  }
}