{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aurinko/json-schema/aurinko-suggest-meeting-times-request-schema.json",
  "title": "SuggestMeetingTimesRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aurinko-freebusyschedule-api-openapi.yml#/components/schemas/SuggestMeetingTimesRequest",
  "type": "object",
  "properties": {
    "timeMin": {
      "type": "string",
      "format": "date-time",
      "description": "The lower bound of the time interval to search for available meeting times."
    },
    "timeMax": {
      "type": "string",
      "format": "date-time",
      "description": "The upper bound of the time interval to search for available meeting times."
    },
    "durationMinutes": {
      "type": "integer",
      "description": "The duration of the meeting to search time for."
    },
    "availabilityStep": {
      "type": "integer",
      "default": 30,
      "description": "Determines the interval at which new meeting slots are made available throughout the working hours."
    },
    "attendees": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MeetingAttendee"
      },
      "description": "The attendees to consider when searching for available meeting times."
    },
    "defaultTimezone": {
      "type": "string",
      "description": "Timezone (IANA) to use when no timezone information is available for the attendees."
    },
    "defaultWorkHours": {
      "$ref": "#/$defs/WeekWorkSchedule",
      "description": "Work hours to use when no information is available for the attendees."
    },
    "availabilityIntervals": {
      "description": "the hours of availability for a date range, it have priority over defaultWorkHours.",
      "$ref": "#/$defs/AvailabilityIntervals"
    },
    "freeStatuses": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ShowAs"
      },
      "default": [
        "free"
      ],
      "description": "The statuses from /freeBusy request to consider as free time for the attendees."
    }
  },
  "$defs": {
    "AvailabilityInterval": {
      "type": "object",
      "properties": {
        "dateStartInclusive": {
          "type": "string",
          "format": "date"
        },
        "dateEndInclusive": {
          "type": "string",
          "format": "date"
        },
        "hours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WorkingInterval"
          }
        }
      }
    },
    "AvailabilityIntervals": {
      "type": "object",
      "properties": {
        "intervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AvailabilityInterval"
          }
        }
      }
    },
    "DayOfWeek": {
      "type": "string",
      "enum": [
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday",
        "sunday"
      ]
    },
    "DayWorkSchedule": {
      "type": "object",
      "properties": {
        "dayOfWeek": {
          "$ref": "#/$defs/DayOfWeek"
        },
        "workingIntervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WorkingInterval"
          }
        }
      }
    },
    "MeetingAttendee": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        },
        "workHours": {
          "$ref": "#/$defs/WeekWorkSchedule"
        },
        "error": {
          "type": "string",
          "readOnly": true
        },
        "busyIntervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TimeInterval"
          },
          "writeOnly": true,
          "description": "Busy intervals for the attendee. If set, these intervals will be excluded when searching for available meeting times. Can be combined with `freeIntervals`."
        },
        "freeIntervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TimeInterval"
          },
          "writeOnly": true,
          "description": "Free time intervals for the attendee. If set, this parameter will limit the search for available meeting times. Can be combined with `busyIntervals`."
        }
      }
    },
    "ShowAs": {
      "type": "string",
      "enum": [
        "free",
        "busy",
        "tentative",
        "outOfOffice",
        "unknown"
      ]
    },
    "TimeInterval": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "WeekWorkSchedule": {
      "type": "object",
      "properties": {
        "daySchedules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DayWorkSchedule"
          }
        },
        "timezone": {
          "type": "string"
        }
      }
    },
    "WorkingInterval": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "pattern": "^\\d{2}:\\d{2}:\\d{2}$"
        },
        "end": {
          "type": "string",
          "pattern": "^\\d{2}:\\d{2}:\\d{2}$"
        }
      }
    }
  }
}