{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trajectory/json-schema/trajectory-organization-members-response-schema.json",
  "title": "OrganizationMembersResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trajectory-organizations-api-openapi.yml#/components/schemas/OrganizationMembersResponse",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/OrganizationMember"
      },
      "type": "array",
      "title": "Items",
      "description": "Page of organization members, ordered by email."
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "Cursor for the next page, or null if none."
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "description": "True if more members remain beyond this page."
    }
  },
  "type": "object",
  "required": [
    "items",
    "has_more"
  ],
  "$defs": {
    "OrganizationMember": {
      "properties": {
        "email": {
          "type": "string",
          "title": "Email",
          "description": "Email of the member."
        },
        "display_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Display Name",
          "description": "User's display name, when set."
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created At",
          "description": "UTC timestamp the membership row was created."
        },
        "status": {
          "$ref": "#/$defs/OrganizationMembershipStatus",
          "description": "Membership status."
        },
        "role": {
          "$ref": "#/$defs/OrganizationRole",
          "description": "Membership role within the organization."
        }
      },
      "type": "object",
      "required": [
        "email",
        "status",
        "role"
      ],
      "title": "OrganizationMember"
    },
    "OrganizationMembershipStatus": {
      "type": "string",
      "enum": [
        "ORG_STATUS_ACTIVE",
        "ORG_STATUS_PENDING",
        "ORG_STATUS_DISABLED"
      ],
      "title": "OrganizationMembershipStatus"
    },
    "OrganizationRole": {
      "type": "string",
      "enum": [
        "ORG_ROLE_OWNER",
        "ORG_ROLE_ADMIN",
        "ORG_ROLE_MEMBER"
      ],
      "title": "OrganizationRole"
    }
  }
}