{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/codiumai/main/json-schema/codiumai-member-page-schema.json",
  "title": "MemberPage",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/codiumai-openapi-openapi.json#/components/schemas/MemberPage",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Member"
      }
    },
    "total": {
      "type": "integer",
      "minimum": 0
    },
    "page": {
      "type": "integer",
      "minimum": 1
    },
    "size": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "pages": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "items",
    "total",
    "page",
    "size",
    "pages"
  ],
  "$defs": {
    "GitProvider": {
      "type": "string",
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "azure"
      ]
    },
    "Member": {
      "type": "object",
      "properties": {
        "member_id": {
          "type": "string",
          "description": "Use this value in the get, update, and remove member endpoints."
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "$ref": "#/$defs/MemberType"
        },
        "last_login": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "team": {
          "type": [
            "object",
            "null"
          ],
          "allOf": [
            {
              "$ref": "#/$defs/Team"
            }
          ]
        },
        "team_role": {
          "type": [
            "string",
            "null"
          ],
          "allOf": [
            {
              "$ref": "#/$defs/TeamPermission"
            }
          ]
        },
        "is_organization_owner": {
          "type": "boolean"
        },
        "linked_git_accounts": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/GitProvider"
          }
        },
        "enterprise_user_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "baseUrl": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "member_id",
        "email",
        "type",
        "team_role",
        "is_organization_owner"
      ]
    },
    "MemberType": {
      "type": "string",
      "enum": [
        "user",
        "invite"
      ],
      "description": "Whether the member is a registered user or a pending invitation."
    },
    "Team": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id"
      ]
    },
    "TeamPermission": {
      "type": "string",
      "enum": [
        "owner",
        "user"
      ]
    }
  }
}