{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.123clearout.com/data/long-island-bulk-pickup-rules.schema.json",
  "title": "Long Island Bulk Pickup and Disposal Rules (rows)",
  "allOf": [
    {
      "$ref": "https://the123.co/schemas/data-asset/v1.json"
    }
  ],
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "row_id",
          "jurisdiction",
          "jurisdiction_name",
          "applies_to",
          "topic",
          "rule_summary",
          "curb_item_limit",
          "curb_limit_period",
          "curb_day",
          "appointment_required",
          "residents_only",
          "source_agency",
          "source_title",
          "source_url",
          "checked_on"
        ],
        "additionalProperties": false,
        "properties": {
          "row_id": {
            "type": "string",
            "description": "Stable row key"
          },
          "jurisdiction": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who made the rule",
            "enum": [
              "town-of-huntington",
              "town-of-oyster-bay",
              "town-of-north-hempstead",
              "city-of-glen-cove",
              "new-york-state",
              "federal",
              null
            ]
          },
          "jurisdiction_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Town, city, state or federal agency level, as a name"
          },
          "applies_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Which homes or people the row covers (a whole town, one garbage district, residents only)"
          },
          "topic": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the rule is about",
            "enum": [
              "curbside_bulk",
              "mattress",
              "refrigerant_appliance",
              "metal_appliance",
              "renovation_debris",
              "electronics",
              "hazardous_waste",
              "drop_off",
              "over_the_limit",
              "who_collects",
              "hauler_permit",
              null
            ]
          },
          "rule_summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "The rule in our words"
          },
          "curb_item_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Bulk items allowed at the curb, as the town states it (curbside_bulk rows only)"
          },
          "curb_limit_period": {
            "type": [
              "string",
              "null"
            ],
            "description": "Whether curb_item_limit counts per week or per collection day",
            "enum": [
              "per_week",
              "per_collection_day",
              null
            ]
          },
          "curb_day": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the item goes out, as the town states it"
          },
          "appointment_required": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "true when you must call or book before setting the item out; empty when the rule doesn't say"
          },
          "residents_only": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "true when a drop-off or program takes residents only; empty when it doesn't say"
          },
          "source_agency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agency that published the source"
          },
          "source_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title of the source page or document"
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Primary source for the row"
          },
          "checked_on": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date we last read this row's source and matched its wording",
            "format": "date"
          }
        }
      }
    }
  }
}
