{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clment-com/json-schema/clment-com-org-summary-schema.json",
  "title": "OrgSummary",
  "description": "The organisation at a glance — who is in it and how much is in it.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clment-com-collaborators-api-openapi.yml#/components/schemas/OrgSummary",
  "type": "object",
  "properties": {
    "organization": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "legalName": {
          "type": [
            "string",
            "null"
          ]
        },
        "tier": {
          "type": "string",
          "description": "Plan tier, e.g. \"business\"."
        },
        "region": {
          "type": "string",
          "description": "The organisation's data-residency region code."
        }
      }
    },
    "users": {
      "type": "object",
      "properties": {
        "active": {
          "type": "integer"
        },
        "invitedPending": {
          "type": "integer"
        },
        "list": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "lastSeenAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      }
    },
    "counts": {
      "type": "object",
      "properties": {
        "contracts": {
          "type": "integer"
        },
        "reviews": {
          "type": "integer"
        },
        "rulebooks": {
          "type": "integer"
        }
      }
    }
  }
}