{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alert-camp/json-schema/alert-camp-alert-create-schema.json",
  "title": "AlertCreate",
  "description": "Schema for creating an alert with multiple campground selections.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alert-camp-openapi.json#/components/schemas/AlertCreate",
  "properties": {
    "park_id": {
      "type": "string",
      "maxLength": 64,
      "minLength": 1,
      "title": "Park Id"
    },
    "park_name": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Park Name"
    },
    "campground_selections": {
      "items": {
        "$ref": "#/$defs/CampgroundSelectionCreate"
      },
      "type": "array",
      "maxItems": 200,
      "minItems": 1,
      "title": "Campground Selections",
      "description": "At least one campground must be selected"
    },
    "date_start": {
      "type": "string",
      "format": "date",
      "title": "Date Start",
      "description": "Arrival date start"
    },
    "date_end": {
      "type": "string",
      "format": "date",
      "title": "Date End",
      "description": "Arrival date end (date_start + window)"
    },
    "days_filter": {
      "type": "string",
      "pattern": "^(all|weekends|weekdays)$",
      "title": "Days Filter",
      "default": "all"
    },
    "nights_min": {
      "type": "integer",
      "maximum": 14.0,
      "minimum": 1.0,
      "title": "Nights Min",
      "default": 1
    },
    "notify_push": {
      "type": "boolean",
      "title": "Notify Push",
      "default": true
    },
    "notify_email": {
      "type": "boolean",
      "title": "Notify Email",
      "default": true
    },
    "notify_sms": {
      "type": "boolean",
      "title": "Notify Sms",
      "default": false
    },
    "split_stay": {
      "type": "boolean",
      "title": "Split Stay",
      "default": false
    },
    "activity_type": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(camping|chalet|canoe_camping|backcountry|fishing|boat|equestrian|day_use)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Activity Type"
    },
    "equipment_filter_mode": {
      "type": "string",
      "pattern": "^(any|tent|rv)$",
      "title": "Equipment Filter Mode",
      "default": "any"
    },
    "sub_equipment_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sub Equipment Id"
    },
    "party_size": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 99.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Party Size"
    },
    "tent_pads": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 50.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Tent Pads"
    },
    "day_use_cells": {
      "anyOf": [
        {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Day Use Cells"
    },
    "entry_dates": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "format": "date"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Entry Dates"
    },
    "webhook_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 512
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Url"
    },
    "has_electricity": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Has Electricity"
    },
    "is_accessible": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Is Accessible"
    },
    "pets_only": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pets Only"
    },
    "is_pull_through": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Is Pull Through"
    },
    "is_tent_only": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Is Tent Only"
    },
    "shade_only": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Shade Only"
    },
    "waterfront_only": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Waterfront Only"
    }
  },
  "type": "object",
  "required": [
    "park_id",
    "park_name",
    "campground_selections",
    "date_start",
    "date_end"
  ],
  "$defs": {
    "CampgroundSelectionCreate": {
      "properties": {
        "campground_id": {
          "type": "string",
          "maxLength": 128,
          "minLength": 1,
          "title": "Campground Id"
        },
        "zone_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 200,
          "title": "Zone Ids",
          "description": "Zone IDs to monitor. ['all'] = all zones."
        },
        "site_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 5000,
          "title": "Site Ids",
          "description": "Site IDs to monitor. ['all'] = all sites."
        }
      },
      "type": "object",
      "required": [
        "campground_id"
      ],
      "title": "CampgroundSelectionCreate",
      "description": "Schema for creating a campground selection within an alert."
    }
  }
}