{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/novumos-app/json-schema/novumos-app-page-response-schema.json",
  "title": "PageResponse",
  "description": "Notion-compat wrapper for a Card (NOV-32, NOV-78).\n\n``properties`` is a Notion-shape **superset**: the synthesized built-ins\n(``Name``, ``Status``, ``Assignees``, ``Due date``, ``Labels``) are built\nin the router via ``app.services.cards.build_notion_properties`` and\nmerged with user-set keys from ``card.properties`` JSONB (user wins on\ncollisions). The column lookup needs a DB session, so this can't be a\npure ``@computed_field`` on the schema — the router constructs the dict\nand passes it via ``model_copy``.\n\nNotion-trained clients read ``properties.Name.title[0].plain_text`` and\n``properties.Status.status.name``; the native top-level fields below\nstay populated for the existing Novum frontend (NOV-78 is read-side\nadditive, frontend migration is a separate ticket).",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/novumos-app-openapi.json#/components/schemas/PageResponse",
  "properties": {
    "object": {
      "type": "string",
      "title": "Object",
      "default": "page"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "board_id": {
      "type": "string",
      "format": "uuid",
      "title": "Board Id"
    },
    "column_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Column Id"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "properties": {
      "additionalProperties": true,
      "type": "object",
      "title": "Properties"
    },
    "position": {
      "type": "number",
      "title": "Position"
    },
    "assignees": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Assignees"
    },
    "due_date": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Due Date"
    },
    "status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status"
    },
    "labels": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Labels"
    },
    "is_archived": {
      "type": "boolean",
      "title": "Is Archived"
    },
    "agent_activity": {
      "anyOf": [
        {
          "$ref": "#/$defs/AgentActivity"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_time": {
      "type": "string",
      "format": "date-time",
      "title": "Created Time"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time",
      "title": "Last Edited Time"
    },
    "body_last_edited_time": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Body Last Edited Time"
    },
    "etag": {
      "type": "integer",
      "title": "Etag"
    },
    "attachment_count": {
      "type": "integer",
      "title": "Attachment Count",
      "default": 0
    },
    "unique_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Unique Id"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id",
    "board_id",
    "title",
    "properties",
    "position",
    "assignees",
    "labels",
    "is_archived",
    "created_time",
    "last_edited_time",
    "etag"
  ],
  "$defs": {
    "AgentActivity": {
      "properties": {
        "agent_name": {
          "type": "string",
          "title": "Agent Name"
        },
        "doing": {
          "type": "string",
          "title": "Doing"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Started At"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "agent_name",
        "doing"
      ],
      "title": "AgentActivity",
      "description": "NOV-86 / NOV-91: \"an agent is working on this card right now\" payload.\n\nStored as ``cards.agent_activity`` JSONB. Set via\n``POST /v1/cards/{id}/agent_activity``, cleared via the matching\nDELETE, the next mutation on the card, or a 10-minute TTL on read\n(NOV-91 lifecycle).\n\nThe model is strict (``extra=\"forbid\"`` + required fields) but\n``started_at`` is optional so legacy blobs written before NOV-91\ndon't fail validation. The outer ``CardResponse.agent_activity``\nvalidator silently downgrades a malformed stored blob to ``None``\nso a bad write from the agent runtime can't 500 every card read."
    }
  }
}