{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dotsy-ai/json-schema/dotsy-ai-site-member-list-schema.json",
  "title": "SiteMemberList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dotsy-ai-members-api-openapi.yml#/components/schemas/SiteMemberList",
  "type": "object",
  "properties": {
    "members": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SiteMember"
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Present only when the request sent `limit`. Pass it as `cursor` (with the same `limit`) for the next page; null on the last page."
    },
    "pendingInvites": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SitePendingInvite"
      },
      "description": "Always the complete list, whatever `limit` says."
    }
  },
  "required": [
    "members",
    "pendingInvites"
  ],
  "$defs": {
    "SiteMember": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string"
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "owner",
            "editor",
            "content_editor",
            "viewer"
          ]
        },
        "isInternal": {
          "type": "boolean",
          "description": "True for someone inside your own organization, as opposed to an outside guest."
        },
        "invitedBy": {
          "type": [
            "string",
            "null"
          ],
          "description": "The id of whoever invited them."
        },
        "createdAt": {
          "type": "number",
          "description": "When access was granted, Unix ms."
        }
      },
      "required": [
        "userId",
        "email",
        "name",
        "role",
        "isInternal",
        "invitedBy",
        "createdAt"
      ]
    },
    "SitePendingInvite": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "enum": [
            "editor",
            "content_editor",
            "viewer"
          ]
        },
        "isInternal": {
          "type": "boolean"
        },
        "invitedBy": {
          "type": "string"
        },
        "expiresAt": {
          "type": "number",
          "description": "Unix ms."
        },
        "createdAt": {
          "type": "number",
          "description": "Unix ms."
        }
      },
      "required": [
        "id",
        "email",
        "role",
        "isInternal",
        "invitedBy",
        "expiresAt",
        "createdAt"
      ]
    }
  }
}