{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whenmeet-me/json-schema/whenmeet-me-event-type-schema.json",
  "title": "EventType",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/whenmeet-me-api-openapi.json#/components/schemas/EventType",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "durationMin": {
      "type": "integer"
    },
    "conference": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "meet",
        "teams",
        null
      ]
    },
    "bufferBeforeMin": {
      "type": "integer"
    },
    "bufferAfterMin": {
      "type": "integer"
    },
    "minNoticeMin": {
      "type": "integer"
    },
    "maxDaysAhead": {
      "type": "integer"
    },
    "slotStepMin": {
      "type": "integer"
    },
    "dailyLimit": {
      "type": [
        "integer",
        "null"
      ]
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BookingQuestion"
      }
    },
    "weeklyHours": {
      "anyOf": [
        {
          "$ref": "#/$defs/WeeklyHours"
        },
        {
          "type": "null"
        }
      ],
      "description": "Personal link override; null follows the profile. Team links use each participant’s hours."
    },
    "hoursTimezone": {
      "type": [
        "string",
        "null"
      ],
      "description": "Timezone for the personal link’s weeklyHours override; null when following the profile."
    },
    "reminders": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Minutes before the start, sorted descending; [] = off."
    },
    "active": {
      "type": "boolean"
    },
    "position": {
      "type": "integer"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Public booking URL, e.g. https://whenmeet.me/@anna/intro"
    },
    "team": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "all",
                "any"
              ]
            },
            "members": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/TeamMember"
              }
            },
            "health": {
              "$ref": "#/$defs/TeamHealth"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "teamHandle": {
      "type": [
        "string",
        "null"
      ],
      "description": "The team link’s own handle (null for personal links and team links without one)."
    },
    "teamName": {
      "type": [
        "string",
        "null"
      ]
    },
    "teamUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "https://whenmeet.me/@<teamHandle>, or null."
    }
  },
  "$defs": {
    "BookingQuestion": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9_]{1,32}$"
        },
        "label": {
          "type": "string",
          "maxLength": 200
        },
        "type": {
          "type": "string",
          "enum": [
            "text",
            "textarea"
          ]
        },
        "required": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "label",
        "type",
        "required"
      ]
    },
    "ParticipantHours": {
      "type": "object",
      "description": "The working hours a team participant is checked against (owner view only — never public). Every teammate is checked against their OWN hours: own = their booking profile (also your own entry); default = joined but no profile yet: Mon–Fri 09:00–17:00 in their account timezone (UTC if unknown); owner = not joined yet (pending / declined): your hours and zone.",
      "properties": {
        "weeklyHours": {
          "$ref": "#/$defs/WeeklyHours"
        },
        "tz": {
          "type": "string",
          "description": "IANA zone the hours are in."
        },
        "source": {
          "type": "string",
          "enum": [
            "own",
            "default",
            "owner"
          ]
        }
      },
      "required": [
        "weeklyHours",
        "tz",
        "source"
      ]
    },
    "TeamHealth": {
      "type": "object",
      "description": "Can this team link take bookings right now? The same strict calendar read the public page does (today in the link zone + 14 days), served from its 60 s cache. Inactive links are not read and report ok.",
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "member_unreadable",
            "no_checkable_member",
            null
          ],
          "description": "member_unreadable = an \"all\" participant, or every \"any\" participant, can’t be read (an \"any\" link with only some unreadable stays ok); no_checkable_member = nobody can be checked, or you have no calendar connected."
        },
        "memberEmail": {
          "type": [
            "string",
            "null"
          ],
          "description": "The first unreadable participant (member_unreadable only)."
        }
      },
      "required": [
        "ok",
        "reason",
        "memberEmail"
      ]
    },
    "TeamMember": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "active",
            "declined"
          ]
        },
        "isOwner": {
          "type": "boolean"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "self",
            "org",
            "none"
          ],
          "description": "self = joined, their own calendar is used; org = not joined yet but your calendar account can see their free/busy (same Workspace / Microsoft 365 org); none = not visible until they join (excluded from the check)."
        },
        "hours": {
          "$ref": "#/$defs/ParticipantHours"
        },
        "canHost": {
          "type": "boolean",
          "description": "False when this participant (owner included) has a calendar but no connection that can add events, so an `any` link never assigns them."
        }
      }
    },
    "WeeklyHours": {
      "type": "object",
      "description": "Working hours per weekday in the profile timezone, or in hoursTimezone for a personal link override: up to 6 [\"HH:MM\",\"HH:MM\"] intervals per day (\"24:00\" allowed as an end). Missing days mean no hours; overlapping intervals merge. Profile default Mon–Fri 09:00–17:00.",
      "properties": {
        "mon": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "tue": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "wed": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "thu": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "fri": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "sat": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "sun": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        }
      }
    }
  }
}