{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/placestack-com/json-schema/placestack-com-collection-event-schema.json",
  "title": "Collection[Event]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/placestack-com-event-api-openapi.yml#/components/schemas/Collection_Event_",
  "properties": {
    "object": {
      "type": "string",
      "const": "list",
      "title": "Object",
      "description": "The object's type. Always `list`.",
      "default": "list"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/Event"
      },
      "type": "array",
      "title": "Data",
      "description": "The results on this page."
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "description": "Whether there are more results after this page."
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "The cursor for the next page. Send it as `cursor`. Null on the last page."
    },
    "suppressed": {
      "type": "integer",
      "title": "Suppressed",
      "description": "The number of matching results withheld because the plan does not include them.",
      "default": 0
    },
    "total": {
      "anyOf": [
        {
          "$ref": "#/$defs/Total"
        },
        {
          "type": "null"
        }
      ],
      "description": "The number of matching results. Only on the first page, when `total=true` is sent. Null otherwise."
    }
  },
  "type": "object",
  "required": [
    "object",
    "data",
    "has_more",
    "next_cursor",
    "suppressed",
    "total"
  ],
  "$defs": {
    "Event": {
      "properties": {
        "object": {
          "type": "string",
          "const": "event",
          "title": "Object",
          "description": "The object's type. Always `event`.",
          "default": "event"
        },
        "id": {
          "type": "string",
          "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
          "title": "Id",
          "description": "Unique identifier for the object."
        },
        "type": {
          "type": "string",
          "enum": [
            "permit.created",
            "case.created"
          ],
          "title": "Type",
          "description": "The event's type. One of `permit.created` or `case.created`."
        },
        "data": {
          "additionalProperties": true,
          "type": "object",
          "title": "Data",
          "description": "The event's payload, as webhooks receive it: the record's `id` and `href`, and the `monitor` and `list_item` it matched."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At",
          "description": "Time at which the object was created."
        },
        "href": {
          "type": "string",
          "title": "Href",
          "description": "The object's path in the API."
        }
      },
      "type": "object",
      "required": [
        "object",
        "id",
        "type",
        "data",
        "created_at",
        "href"
      ],
      "title": "Event"
    },
    "Total": {
      "properties": {
        "value": {
          "type": "integer",
          "title": "Value",
          "description": "The number of matching results."
        },
        "relation": {
          "type": "string",
          "enum": [
            "eq",
            "gte"
          ],
          "title": "Relation",
          "description": "One of `eq` (exact) or `gte` (at least `value`). Counts above 10,000 are `gte`."
        }
      },
      "type": "object",
      "required": [
        "value",
        "relation"
      ],
      "title": "Total",
      "description": "The number of matching results."
    }
  }
}