{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tascan-io/json-schema/tascan-io-zone-schema.json",
  "title": "Zone",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tascan-io-openapi.json#/components/schemas/Zone",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "lat": {
      "type": "number"
    },
    "lng": {
      "type": "number"
    },
    "radius_m": {
      "type": "integer",
      "minimum": 10,
      "maximum": 100000,
      "default": 150
    },
    "project_id": {
      "type": "string",
      "format": "uuid"
    },
    "task_list_id": {
      "type": "string",
      "format": "uuid",
      "description": "List the Site Gate routes workers to inside this zone"
    },
    "enforce_on_list": {
      "type": "boolean",
      "description": "Zone-lock: the list cannot be started outside the radius"
    },
    "notify_on_enter": {
      "type": "boolean",
      "description": "Email the manager when a worker enters (danger areas)"
    },
    "notify_on_exit": {
      "type": "boolean",
      "description": "Email the manager when a worker leaves (accountability)"
    },
    "auto_clock_in": {
      "type": "boolean",
      "description": "Entering writes a shift_start event"
    },
    "auto_clock_out": {
      "type": "boolean",
      "description": "Leaving writes a shift_end event"
    },
    "notify_email": {
      "type": "string",
      "description": "Alert recipient override; defaults to all org admins"
    }
  },
  "required": [
    "name",
    "lat",
    "lng"
  ]
}