{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tradesapi-com/json-schema/tradesapi-com-monitor-public-schema.json",
  "title": "MonitorPublic",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tradesapi-com-openapi.json#/components/schemas/MonitorPublic",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "jurisdiction": {
      "type": "string",
      "title": "Jurisdiction"
    },
    "license_number": {
      "type": "string",
      "title": "License Number"
    },
    "trade": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Trade"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Label"
    },
    "notify": {
      "anyOf": [
        {
          "$ref": "#/$defs/NotifyConfig"
        },
        {
          "type": "null"
        }
      ]
    },
    "active": {
      "type": "boolean",
      "title": "Active"
    },
    "watching_since": {
      "type": "string",
      "format": "date-time",
      "title": "Watching Since"
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Event At"
    },
    "entity_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Entity Id"
    },
    "license_valid": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Valid"
    },
    "license_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Status"
    },
    "license_status_normalized": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Status Normalized"
    },
    "license_expiration": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Expiration"
    },
    "license_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Name"
    },
    "license_checked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Checked At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "jurisdiction",
    "license_number",
    "trade",
    "label",
    "notify",
    "active",
    "watching_since",
    "last_event_at",
    "entity_id"
  ],
  "$defs": {
    "NotifyConfig": {
      "properties": {
        "webhook_subscription_ids": {
          "anyOf": [
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Webhook Subscription Ids"
        },
        "email": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Email"
        }
      },
      "type": "object",
      "title": "NotifyConfig",
      "description": "Notification preferences for a monitored license.\n\nBoth fields are independently optional. ``webhook_subscription_ids``\nreferences entries in ``webhook_subscription`` owned by the same\napi_key (cross-tenant + soft-deleted IDs rejected at validate\ntime). ``email`` adds an out-of-band Resend notification (Phase 2\nintegrates the email path)."
    }
  }
}