{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dropto-run/json-schema/dropto-run-members-response-schema.json",
  "title": "MembersResponse",
  "description": "Who is on the account, and who has been asked.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dropto-run-account-api-openapi.yml#/components/schemas/MembersResponse",
  "properties": {
    "invites": {
      "description": "Invitations still standing. Spent and withdrawn ones are history, not a list.",
      "items": {
        "$ref": "#/$defs/InviteRow"
      },
      "type": "array"
    },
    "members": {
      "description": "People who may act on it, oldest first.",
      "items": {
        "$ref": "#/$defs/MemberRow"
      },
      "type": "array"
    },
    "requireTwoFactorAt": {
      "description": "Since when the owner has required two-factor of every member, or null while they have not.",
      "format": "date-time",
      "type": [
        "null",
        "string"
      ]
    },
    "tokensOfUnprotectedMembers": {
      "description": "Access tokens on this account held by members without two-factor. Requiring two-factor does not stop\nthem, so the owner is told before turning it on.",
      "format": "int32",
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ]
    }
  },
  "required": [
    "members",
    "invites",
    "requireTwoFactorAt",
    "tokensOfUnprotectedMembers"
  ],
  "type": "object",
  "$defs": {
    "InviteRow": {
      "description": "One invitation nobody has accepted yet.",
      "properties": {
        "email": {
          "description": "The address it was sent to. The link only works for this one.",
          "type": "string"
        },
        "expiresAt": {
          "description": "When it stops working on its own.",
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "description": "Its id, which is what withdrawing it names.",
          "type": "string"
        },
        "role": {
          "description": "What accepting it would grant.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "email",
        "role",
        "expiresAt"
      ],
      "type": "object"
    },
    "MemberRow": {
      "description": "One person on the account.",
      "properties": {
        "email": {
          "description": "Their address, which is how a colleague recognises them.",
          "type": "string"
        },
        "founder": {
          "description": "Whether they created the account. A founder cannot be removed or demoted while the plan is held in their\nname, so the members screen offers neither for this row.",
          "type": "boolean"
        },
        "joinedAt": {
          "description": "When they were added.",
          "format": "date-time",
          "type": "string"
        },
        "name": {
          "description": "Their display name, or null when Google gave none.",
          "type": [
            "null",
            "string"
          ]
        },
        "role": {
          "description": "What they may do here.",
          "type": "string"
        },
        "twoFactor": {
          "description": "Whether they have two-factor on — the column an owner reads before requiring it, and a member reads to\nsee whether the rule would block them.",
          "type": "boolean"
        },
        "userId": {
          "description": "Their ULID, which is what removing them names.",
          "type": "string"
        }
      },
      "required": [
        "userId",
        "email",
        "name",
        "role",
        "joinedAt",
        "twoFactor",
        "founder"
      ],
      "type": "object"
    }
  }
}