{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.forgeling.io/schemas/events/budget.warning.json",
  "title": "budget.warning",
  "description": "A run has spent 80% of its budget.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "max_cost_usd",
    "spent_usd",
    "threshold"
  ],
  "properties": {
    "max_cost_usd": {
      "type": "number",
      "minimum": 0
    },
    "spent_usd": {
      "type": "number",
      "minimum": 0
    },
    "threshold": {
      "const": 0.8
    }
  }
}
