{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aisle-wedding/json-schema/aisle-wedding-wedding-stats-result-schema.json",
  "title": "WeddingStatsResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aisle-wedding-statistics-api-openapi.yml#/components/schemas/WeddingStatsResult",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/$defs/PublicWeddingStats"
    }
  },
  "$defs": {
    "PublicWeddingStats": {
      "type": "object",
      "description": "Guest counts use the canonical headcount model. Event response counts are explicit guest-event replies. Room money uses settlement groups and completed, unrefunded accommodation payments. Registry totals use completed, unrefunded contribution payments and never registry_items.current_amount.",
      "additionalProperties": false,
      "required": [
        "guests",
        "events",
        "rooms",
        "registry",
        "content"
      ],
      "properties": {
        "guests": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "invited",
            "attending",
            "declined",
            "maybe",
            "pending",
            "replied",
            "awaiting_reply",
            "response_rate_percent"
          ],
          "properties": {
            "invited": {
              "type": "integer"
            },
            "attending": {
              "type": "integer"
            },
            "declined": {
              "type": "integer"
            },
            "maybe": {
              "type": "integer"
            },
            "pending": {
              "type": "integer"
            },
            "replied": {
              "type": "integer"
            },
            "response_rate_percent": {
              "type": "integer"
            },
            "awaiting_reply": {
              "type": "integer",
              "description": "Guests whose wedding RSVP is pending, null, unknown, or maybe."
            }
          }
        },
        "events": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "total",
            "responses",
            "attending_responses",
            "declined_responses",
            "awaiting_responses"
          ],
          "properties": {
            "total": {
              "type": "integer"
            },
            "responses": {
              "type": "integer"
            },
            "attending_responses": {
              "type": "integer"
            },
            "declined_responses": {
              "type": "integer"
            },
            "awaiting_responses": {
              "type": "integer",
              "description": "Stored guest-event response rows whose attending value is null."
            }
          }
        },
        "rooms": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "total",
            "occupied",
            "settlement_groups",
            "settled_groups",
            "priced_groups",
            "total_amount",
            "received_amount",
            "outstanding_amount"
          ],
          "properties": {
            "total": {
              "type": "integer"
            },
            "occupied": {
              "type": "integer",
              "description": "Distinct non-null room IDs assigned to guests."
            },
            "settlement_groups": {
              "type": "integer"
            },
            "settled_groups": {
              "type": "integer"
            },
            "priced_groups": {
              "type": "integer"
            },
            "total_amount": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d{1,2})?$",
              "description": "A decimal currency amount. It is serialized as a string."
            },
            "received_amount": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d{1,2})?$",
              "description": "A decimal currency amount. It is serialized as a string."
            },
            "outstanding_amount": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d{1,2})?$",
              "description": "A decimal currency amount. It is serialized as a string."
            }
          }
        },
        "registry": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "items",
            "goal_amount",
            "received_amount",
            "gift_count"
          ],
          "properties": {
            "items": {
              "type": "integer",
              "description": "All registry items, including items hidden from guests."
            },
            "goal_amount": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d{1,2})?$",
              "description": "The sum of goal amounts across all registry items, including hidden items."
            },
            "received_amount": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d{1,2})?$",
              "description": "Completed, unrefunded registry contributions, including contributions to hidden items and unattributed contributions."
            },
            "gift_count": {
              "type": "integer",
              "description": "Completed, unrefunded registry contributions, including contributions to hidden items and unattributed contributions."
            }
          }
        },
        "content": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "recommendations",
            "faqs",
            "song_requests",
            "guestbook_entries",
            "approved_guestbook_entries",
            "predictions",
            "prediction_responses"
          ],
          "properties": {
            "recommendations": {
              "type": "integer",
              "description": "All stored recommendation rows."
            },
            "faqs": {
              "type": "integer",
              "description": "All stored FAQ rows."
            },
            "song_requests": {
              "type": "integer",
              "description": "All stored song request rows."
            },
            "guestbook_entries": {
              "type": "integer",
              "description": "All guestbook entries, including unapproved entries."
            },
            "approved_guestbook_entries": {
              "type": "integer",
              "description": "Guestbook entries whose approved value is true."
            },
            "predictions": {
              "type": "integer",
              "description": "All predictions, including inactive predictions."
            },
            "prediction_responses": {
              "type": "integer",
              "description": "Responses across active and inactive predictions."
            }
          }
        }
      }
    }
  }
}