{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-party-collection-data-schema.json",
  "title": "PartyCollectionData",
  "description": "Cursor-paginated Party summaries for the admin search endpoint. `searchAfter` is a Party ID cursor and is omitted when the current page is terminal.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-party-api-openapi.yml#/components/schemas/PartyCollectionData",
  "type": "object",
  "required": [
    "items",
    "size"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PartySummaryData"
      },
      "description": "Party summaries returned in the current page."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Number of items returned in the current page."
    },
    "searchAfter": {
      "type": "string",
      "description": "Party ID cursor for the next page, omitted when no more results are available."
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "description": "Total matching Parties when provided by the reader; omitted otherwise."
    }
  },
  "$defs": {
    "PartyContactData": {
      "type": "object",
      "description": "Optional Party contact summary. Absent contact members are omitted.",
      "properties": {
        "phone": {
          "type": "string",
          "description": "Party phone number, omitted when absent."
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "Party email address, omitted when absent."
        }
      }
    },
    "PartySummaryData": {
      "type": "object",
      "description": "Compact Party data returned by the administrator Party-search endpoint.",
      "required": [
        "partyId",
        "partySlugId",
        "name",
        "contact",
        "created",
        "updated"
      ],
      "properties": {
        "partyId": {
          "type": "string",
          "description": "Stable Party identifier."
        },
        "partySlugId": {
          "type": "string",
          "description": "Immutable Party slug identifier."
        },
        "name": {
          "type": "string",
          "maxLength": 255,
          "description": "Party name."
        },
        "contact": {
          "$ref": "#/$defs/PartyContactData"
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "When the Party was created."
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "When the Party was last updated."
        }
      }
    }
  }
}