{
  "openapi": "3.1.1",
  "info": {
    "title": "Water Restrictions API",
    "description": "The Water Restrictions API provides up-to-date data on water restrictions across New Zealand. Its goal is to make this data more accessible to everyone and offer a platform for developers to integrate it into their own apps.\n\n**Authentication**\n\nAt the moment, no authentication is needed to use the API. This may be added in the future to support usage limits.\n\n**Errors**\n\nError responses follow [RFC 9457](https://datatracker.ietf.org/doc/html/rfc9457) (Problem Details) and include an `errors` array:\n\n```json\n{\n  \"errors\": [\n    { \"code\": \"Error.Validation\", \"message\": \"Name is required.\", \"pointer\": \"name\" },\n    { \"code\": \"Error.NotFound\", \"message\": \"The requested resource was not found.\" }\n  ]\n}\n```\n\nValidation errors include a `pointer` identifying the invalid field. Domain errors omit `pointer`.\n\n**Note**\n\nThe API is currently in beta, so changes may occur.",
    "termsOfService": "https://waterrestrictions.nz/docs/terms",
    "contact": {
      "name": "Joe Butler",
      "url": "https://waterrestrictions.nz",
      "email": "contact@joebutler.nz"
    },
    "version": "v1",
    "summary": "Provides up-to-date data on water restrictions across New Zealand."
  },
  "servers": [
    {
      "url": "https://api.waterrestrictions.nz/"
    }
  ],
  "paths": {
    "/v1/areas/{areaId}": {
      "get": {
        "tags": [
          "Areas"
        ],
        "summary": "Get Area",
        "description": "Gets an area by its ID. A summary of its scheme and detailed information about its current stage will be provided, if set.",
        "operationId": "GetArea",
        "parameters": [
          {
            "name": "areaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeBoundary",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAreaResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/areas": {
      "get": {
        "tags": [
          "Areas"
        ],
        "summary": "Get Areas",
        "description": "Gets a page of areas, their associated schemes, current stages, and organisations, and pagination metadata.",
        "operationId": "GetAreas",
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseOfGetAreasArea"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/areas/{areaId}/stage-assignments/current": {
      "get": {
        "tags": [
          "Areas"
        ],
        "summary": "Get Current Stage Assignment",
        "description": "Gets the currently active stage assignment for an area.",
        "operationId": "GetCurrentStageAssignment",
        "parameters": [
          {
            "name": "areaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCurrentStageAssignmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/areas/{areaId}/scheduled-changes": {
      "get": {
        "tags": [
          "Areas"
        ],
        "summary": "Get Area Scheduled Changes",
        "description": "Gets all scheduled future stage changes for an area. Includes pending, approved, cancelled, and applied changes.",
        "operationId": "GetAreaScheduledChanges",
        "parameters": [
          {
            "name": "areaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isCancelled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseOfGetAreaScheduledChangesScheduledChange"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/areas/{areaId}/stage-assignments": {
      "get": {
        "tags": [
          "Areas"
        ],
        "summary": "Get Stage Assignments",
        "description": "Gets all stage assignments for an area as a paginated timeline, sorted newest first. Includes the currently active assignment.",
        "operationId": "GetStageAssignments",
        "parameters": [
          {
            "name": "areaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "until",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseOfGetStageAssignmentsItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scheduled-changes": {
      "get": {
        "tags": [
          "Scheduled Changes"
        ],
        "summary": "Get Scheduled Changes",
        "description": "Gets a paginated list of scheduled stage changes across all areas.",
        "operationId": "GetScheduledChanges",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organisationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseOfGetScheduledChangesItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schemes": {
      "get": {
        "tags": [
          "Schemes"
        ],
        "summary": "Get Schemes",
        "description": "Get a page of schemes. Includes detailed information about each scheme, summary information about their stages, and pagination metadata.",
        "operationId": "GetSchemes",
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseOfGetSchemesScheme"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schemes/{schemeId}": {
      "get": {
        "tags": [
          "Schemes"
        ],
        "summary": "Get Scheme",
        "description": "Gets a scheme by its ID. Includes detailed information about its stages.",
        "operationId": "GetScheme",
        "parameters": [
          {
            "name": "schemeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSchemeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schemes/{schemeId}/stages": {
      "get": {
        "tags": [
          "Stages"
        ],
        "summary": "Get Stages in Scheme",
        "description": "Gets all stages that belong to a scheme.",
        "operationId": "GetSchemeStages",
        "parameters": [
          {
            "name": "schemeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GetSchemeStageResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schemes/{schemeId}/stages/{stageId}": {
      "get": {
        "tags": [
          "Stages"
        ],
        "summary": "Get Stage",
        "description": "Gets a stage by its ID.",
        "operationId": "GetStage",
        "parameters": [
          {
            "name": "schemeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetStageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organisations/{organisationId}": {
      "get": {
        "tags": [
          "Organisations"
        ],
        "summary": "Get Organisation",
        "description": "Get an organisation by its ID.",
        "operationId": "GetOrganisation",
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganisationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/organisations": {
      "get": {
        "tags": [
          "Organisations"
        ],
        "summary": "Get Organisations",
        "description": "Get a page of organisations with pagination metadata.",
        "operationId": "GetOrganisations",
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseOfGetOrganisationsOrganisation"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tiles/areas/{z}/{x}/{y}.mvt": {
      "get": {
        "tags": [
          "Tiles"
        ],
        "summary": "Get Area Tile",
        "description": "Returns a Mapbox Vector Tile (MVT) for the given XYZ tile coordinates. Returns 204 when no areas intersect the tile.",
        "operationId": "GetAreaTile",
        "parameters": [
          {
            "name": "z",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "x",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "y",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/tiles/areas/tiles.json": {
      "get": {
        "tags": [
          "Tiles"
        ],
        "summary": "Get Area Tile Metadata",
        "description": "Returns a TileJSON 3.0.0 discovery document for the water restriction areas vector tile source.",
        "operationId": "GetAreaTileJson",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAreaTileJsonResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApprovalStatus": {
        "enum": [
          "pendingApproval",
          "approved",
          "autoApproved"
        ]
      },
      "GetAreaOrganisation": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetAreaResponse": {
        "required": [
          "id",
          "name",
          "organisations",
          "timeZoneId",
          "sources",
          "trackingStatus"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "boundary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "GeoJSON MultiPolygon boundary. Only included when includeBoundary=true is requested.",
                "$ref": "#/components/schemas/MultiPolygon"
              }
            ]
          },
          "scheme": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The restriction scheme defining the available stages for this area. Null if no scheme has been assigned.",
                "$ref": "#/components/schemas/GetAreaScheme"
              }
            ]
          },
          "currentStageAssignment": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The current active restriction stage assignment. Null indicates no restrictions are currently set (base stage).",
                "$ref": "#/components/schemas/GetAreaStageAssignment"
              }
            ]
          },
          "organisations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAreaOrganisation"
            },
            "description": "The councils or water entities responsible for managing this area."
          },
          "timeZoneId": {
            "type": "string",
            "description": "IANA timezone identifier for the area (e.g. Pacific/Auckland)."
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAreaSource"
            },
            "description": "The sources currently being monitored for this area's restriction data."
          },
          "trackingStatus": {
            "description": "Whether this area is being monitored for water restriction changes.",
            "$ref": "#/components/schemas/TrackingStatus"
          }
        }
      },
      "GetAreasArea": {
        "required": [
          "id",
          "name",
          "organisations",
          "timeZoneId",
          "bbox",
          "trackingStatus"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "scheme": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The restriction scheme defining the available stages for this area. Null if no scheme has been assigned.",
                "$ref": "#/components/schemas/GetAreasScheme"
              }
            ]
          },
          "currentStageAssignment": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The current active restriction stage assignment. Null indicates no restrictions are currently set (base stage).",
                "$ref": "#/components/schemas/GetAreasStageAssignment"
              }
            ]
          },
          "organisations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAreasOrganisation"
            },
            "description": "The councils or water entities responsible for managing this area."
          },
          "timeZoneId": {
            "type": "string",
            "description": "IANA timezone identifier for the area (e.g. Pacific/Auckland)."
          },
          "bbox": {
            "description": "Bounding box of the area boundary, for map viewport calculations.",
            "$ref": "#/components/schemas/GetAreasBbox"
          },
          "trackingStatus": {
            "description": "Whether this area is being monitored for water restriction changes.",
            "$ref": "#/components/schemas/TrackingStatus"
          }
        }
      },
      "GetAreasBbox": {
        "required": [
          "west",
          "south",
          "east",
          "north"
        ],
        "type": "object",
        "properties": {
          "west": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Western longitude (minimum X).",
            "format": "double"
          },
          "south": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Southern latitude (minimum Y).",
            "format": "double"
          },
          "east": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Eastern longitude (maximum X).",
            "format": "double"
          },
          "north": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Northern latitude (maximum Y).",
            "format": "double"
          }
        }
      },
      "GetAreaScheduledChangesApproval": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "approvedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GetAreaScheduledChangesScheduledChange": {
        "required": [
          "id",
          "effectiveFrom",
          "approval",
          "isApplied",
          "isCancelled",
          "isAutoDetected",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "targetStage": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The stage this change targets. Null if the stage has since been removed from the scheme.",
                "$ref": "#/components/schemas/GetAreaScheduledChangesTargetStage"
              }
            ]
          },
          "effectiveFrom": {
            "type": "string",
            "description": "When this change should take effect.",
            "format": "date-time"
          },
          "approval": {
            "$ref": "#/components/schemas/GetAreaScheduledChangesApproval"
          },
          "isApplied": {
            "type": "boolean",
            "description": "True if this change has been applied to create a stage assignment."
          },
          "isCancelled": {
            "type": "boolean",
            "description": "True if this change was cancelled before being applied."
          },
          "cancellationReason": {
            "type": [
              "null",
              "string"
            ],
            "description": "Reason for cancellation, if provided."
          },
          "isAutoDetected": {
            "type": "boolean",
            "description": "Indicates whether the change was detected automatically."
          },
          "createdAt": {
            "type": "string",
            "description": "When this scheduled change was created.",
            "format": "date-time"
          },
          "appliedAssignmentDeletedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the stage assignment created by applying this change was subsequently deleted, if applicable.",
            "format": "date-time"
          },
          "appliedAssignmentDeletionReason": {
            "type": [
              "null",
              "string"
            ],
            "description": "Reason the applied stage assignment was deleted, if provided."
          }
        }
      },
      "GetAreaScheduledChangesTargetStage": {
        "required": [
          "id",
          "name",
          "severity"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "GetAreaScheme": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetAreasOrganisation": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetAreaSource": {
        "required": [
          "url",
          "description"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "GetAreasScheme": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetAreasStage": {
        "required": [
          "id",
          "severity",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Non-negative restriction level. 0 is the base stage (no active restrictions); higher values indicate increasing restriction severity.",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetAreasStageAssignment": {
        "required": [
          "id",
          "effectiveFrom",
          "stage",
          "isAutoDetected"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "effectiveFrom": {
            "type": "string",
            "description": "The datetime from which this stage assignment came into effect.",
            "format": "date-time"
          },
          "stage": {
            "$ref": "#/components/schemas/GetAreasStage"
          },
          "isAutoDetected": {
            "type": "boolean",
            "description": "True if this assignment was made automatically by AI; false if entered manually."
          }
        }
      },
      "GetAreaStage": {
        "required": [
          "id",
          "severity",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Non-negative restriction level. 0 is the base stage (no active restrictions); higher values indicate increasing restriction severity.",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetAreaStageAssignment": {
        "required": [
          "id",
          "effectiveFrom",
          "stage",
          "isAutoDetected"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "effectiveFrom": {
            "type": "string",
            "description": "The datetime from which this stage assignment came into effect.",
            "format": "date-time"
          },
          "stage": {
            "$ref": "#/components/schemas/GetAreaStage"
          },
          "isAutoDetected": {
            "type": "boolean",
            "description": "Indicates whether the assignment was detected automatically."
          }
        }
      },
      "GetAreaTileJsonResponse": {
        "required": [
          "tilejson",
          "name",
          "description",
          "attribution",
          "scheme",
          "minzoom",
          "maxzoom",
          "bounds",
          "center",
          "tiles",
          "vector_layers"
        ],
        "type": "object",
        "properties": {
          "tilejson": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          },
          "scheme": {
            "type": "string"
          },
          "minzoom": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxzoom": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "bounds": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          "center": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          "tiles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "vector_layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAreaTileJsonVectorLayerInfo"
            }
          }
        }
      },
      "GetAreaTileJsonVectorLayerInfo": {
        "required": [
          "id",
          "description",
          "minzoom",
          "maxzoom",
          "fields"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "minzoom": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxzoom": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "GetCurrentStageAssignmentResponse": {
        "required": [
          "assignmentId",
          "stage",
          "effectiveFrom",
          "createdBy",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "assignmentId": {
            "type": "string",
            "format": "uuid"
          },
          "stage": {
            "$ref": "#/components/schemas/GetCurrentStageAssignmentStage"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time"
          },
          "effectiveUntil": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "scheduledChangeId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GetCurrentStageAssignmentStage": {
        "required": [
          "id",
          "name",
          "severity"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "GetOrganisationResponse": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ],
            "description": "Website URL of the organisation. May be null if not provided."
          }
        }
      },
      "GetOrganisationsOrganisation": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ],
            "description": "Website URL of the organisation. May be null if not provided."
          }
        }
      },
      "GetScheduledChangesApproval": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "approvedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GetScheduledChangesArea": {
        "required": [
          "id",
          "name",
          "organisationName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "organisationName": {
            "type": "string"
          }
        }
      },
      "GetScheduledChangesItem": {
        "required": [
          "id",
          "area",
          "effectiveFrom",
          "approval",
          "isApplied",
          "isCancelled",
          "isAutoDetected",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "area": {
            "$ref": "#/components/schemas/GetScheduledChangesArea"
          },
          "targetStage": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetScheduledChangesTargetStage"
              }
            ]
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time"
          },
          "approval": {
            "$ref": "#/components/schemas/GetScheduledChangesApproval"
          },
          "isApplied": {
            "type": "boolean"
          },
          "isCancelled": {
            "type": "boolean"
          },
          "cancellationReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "isAutoDetected": {
            "type": "boolean",
            "description": "Indicates whether the change was detected automatically."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "appliedAssignmentDeletedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "appliedAssignmentDeletionReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetScheduledChangesTargetStage": {
        "required": [
          "id",
          "name",
          "severity"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "GetSchemeResponse": {
        "required": [
          "id",
          "name",
          "stages"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetSchemeStage"
            }
          }
        }
      },
      "GetSchemesScheme": {
        "required": [
          "id",
          "name",
          "stages"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetSchemesStage"
            }
          }
        }
      },
      "GetSchemesStage": {
        "required": [
          "id",
          "severity",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetSchemeStage": {
        "required": [
          "id",
          "severity",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetSchemeStageResponse": {
        "required": [
          "id",
          "severity",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetStageAssignmentsItem": {
        "required": [
          "assignmentId",
          "stage",
          "effectiveFrom",
          "createdBy",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "assignmentId": {
            "type": "string",
            "format": "uuid"
          },
          "stage": {
            "$ref": "#/components/schemas/GetStageAssignmentsStage"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time"
          },
          "effectiveUntil": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "scheduledChangeId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GetStageAssignmentsStage": {
        "required": [
          "id",
          "name",
          "severity"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "GetStageResponse": {
        "required": [
          "id",
          "severity",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "severity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MultiPolygon": {
        "type": "object",
        "properties": {
          "type": {
            "const": "MultiPolygon",
            "type": "string"
          },
          "coordinates": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "maxItems": 3,
                  "minItems": 2,
                  "type": "array",
                  "items": {
                    "type": "number",
                    "format": "double"
                  }
                }
              }
            },
            "description": "Array of polygons"
          }
        },
        "description": "A multi-polygon geometry"
      },
      "PaginatedResponseOfGetAreasArea": {
        "required": [
          "items",
          "pageNumber",
          "pageSize",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAreasArea"
            },
            "description": "The items in the current page."
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The current page number (1-based).",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number of items per page.",
            "format": "int32"
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The total number of items across all pages.",
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Gets the total number of pages.",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a previous page."
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a next page."
          }
        },
        "description": "Represents a paginated response containing items and pagination metadata."
      },
      "PaginatedResponseOfGetAreaScheduledChangesScheduledChange": {
        "required": [
          "items",
          "pageNumber",
          "pageSize",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAreaScheduledChangesScheduledChange"
            },
            "description": "The items in the current page."
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The current page number (1-based).",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number of items per page.",
            "format": "int32"
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The total number of items across all pages.",
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Gets the total number of pages.",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a previous page."
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a next page."
          }
        },
        "description": "Represents a paginated response containing items and pagination metadata."
      },
      "PaginatedResponseOfGetOrganisationsOrganisation": {
        "required": [
          "items",
          "pageNumber",
          "pageSize",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetOrganisationsOrganisation"
            },
            "description": "The items in the current page."
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The current page number (1-based).",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number of items per page.",
            "format": "int32"
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The total number of items across all pages.",
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Gets the total number of pages.",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a previous page."
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a next page."
          }
        },
        "description": "Represents a paginated response containing items and pagination metadata."
      },
      "PaginatedResponseOfGetScheduledChangesItem": {
        "required": [
          "items",
          "pageNumber",
          "pageSize",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetScheduledChangesItem"
            },
            "description": "The items in the current page."
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The current page number (1-based).",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number of items per page.",
            "format": "int32"
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The total number of items across all pages.",
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Gets the total number of pages.",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a previous page."
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a next page."
          }
        },
        "description": "Represents a paginated response containing items and pagination metadata."
      },
      "PaginatedResponseOfGetSchemesScheme": {
        "required": [
          "items",
          "pageNumber",
          "pageSize",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetSchemesScheme"
            },
            "description": "The items in the current page."
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The current page number (1-based).",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number of items per page.",
            "format": "int32"
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The total number of items across all pages.",
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Gets the total number of pages.",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a previous page."
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a next page."
          }
        },
        "description": "Represents a paginated response containing items and pagination metadata."
      },
      "PaginatedResponseOfGetStageAssignmentsItem": {
        "required": [
          "items",
          "pageNumber",
          "pageSize",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetStageAssignmentsItem"
            },
            "description": "The items in the current page."
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The current page number (1-based).",
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The number of items per page.",
            "format": "int32"
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "The total number of items across all pages.",
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Gets the total number of pages.",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a previous page."
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Gets a value indicating whether there is a next page."
          }
        },
        "description": "Represents a paginated response containing items and pagination metadata."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TrackingStatus": {
        "enum": [
          "tracked",
          "untracked"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Areas",
      "description": "An area is a geographical location, such as a region, city or town, where water restrictions can apply.\n\nAn area will have a [scheme](#tag/schemes) assigned. If restrictions are currently in effect, the area will also have a current [stage](#tag/stages), representing its current water restrictions.\n\nAn area may have an associated [organisation](#tag/organisations) that manages its water restrictions."
    },
    {
      "name": "Stage Assignments",
      "description": "Stage assignments represent the timeline of water restriction [stages](#tag/stages) applied to an [area](#tag/areas).\n\nThis includes historical assignments (when restrictions were previously in effect) and the current active assignment."
    },
    {
      "name": "Scheduled Changes",
      "description": "Scheduled stage changes represent future changes to water restrictions that are planned or pending approval.\n\nScheduled changes may require approval before they are applied to an [area](#tag/areas)."
    },
    {
      "name": "Schemes",
      "description": "A scheme is a defined set of water restriction [stages](#tag/stages). It can apply to one or more [areas](#tag/areas).\n\nWhile multiple areas may share the same scheme, each area can be at a different stage based on local conditions."
    },
    {
      "name": "Stages",
      "description": "Stages represent levels of water restrictions, typically increasing in severity (eg. Level 1, Level 2, etc.).\n\nAs conditions like droughts worsen - especially during summer - an [area](#tag/areas) may move to a higher stage to conserve water."
    },
    {
      "name": "Organisations",
      "description": "An organisation is the body responsible for the water restrictions of one or more [areas](#tag/areas). Typically, this is a local council or water entity."
    },
    {
      "name": "Tiles",
      "description": "Vector tile endpoints for rendering platform data on interactive maps.\n\nTiles are served in [Mapbox Vector Tile (MVT)](https://docs.mapbox.com/data/tilesets/guides/vector-tiles-standards/) format.\n\nEach tileset exposes a `tiles.json` TileJSON endpoint for use as a MapLibre or Mapbox GL JS map source."
    }
  ]
}