{
    "openapi": "3.0.0",
    "info": {
        "title": "\u041f\u043b\u0430\u043d\u0451\u0440\u043a\u0430 \u2014 API \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f",
        "description": "REST API \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u041f\u043b\u0430\u043d\u0451\u0440\u043a\u0438 (v2). \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u2014 Bearer API-\u043a\u043b\u044e\u0447 `cal_\u2026`. \u0412\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u2014 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435 (`{status, data}` / `{status:\"error\", error}`). \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a `cal-api-version`.\n",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "/",
            "description": "\u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0445\u043e\u0441\u0442"
        }
    ],
    "paths": {
        "/rest/v2/bookings": {
            "get": {
                "tags": [
                    "Bookings"
                ],
                "summary": "\u0421\u043f\u0438\u0441\u043e\u043a \u0431\u0440\u043e\u043d\u0435\u0439 (\u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u043b\u044e\u0447\u0430 + \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u0435, \u0433\u0434\u0435 \u043e\u043d \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a)",
                "operationId": "get_v2_bookings_list",
                "parameters": [
                    {
                        "name": "cal-api-version",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2024-08-13"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "upcoming|past|cancelled|unconfirmed (\u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e)",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "attendeeEmail",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "eventTypeId",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "afterStart",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "beforeEnd",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "take",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "name": "skip",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 0
                        }
                    },
                    {
                        "name": "sortStart",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u0421\u043f\u0438\u0441\u043e\u043a + \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BookingsListEnvelope"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Bookings"
                ],
                "summary": "\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0440\u043e\u043d\u044c",
                "operationId": "post_v2_bookings_create",
                "parameters": [
                    {
                        "name": "cal-api-version",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2024-08-13"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateBookingInput"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "\u0411\u0440\u043e\u043d\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0430",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BookingEnvelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 / not supported",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "\u041d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Event type \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "\u0421\u043b\u043e\u0442 \u0437\u0430\u043d\u044f\u0442",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/rest/v2/bookings/{bookingUid}": {
            "get": {
                "tags": [
                    "Bookings"
                ],
                "summary": "\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0440\u043e\u043d\u044c \u043f\u043e uid (\u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043a\u043b\u044e\u0447\u0430 \u0438\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b)",
                "operationId": "get_v2_bookings_get",
                "parameters": [
                    {
                        "name": "cal-api-version",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2024-08-13"
                        }
                    },
                    {
                        "name": "bookingUid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u0411\u0440\u043e\u043d\u044c",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BookingEnvelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/rest/v2/bookings/{bookingUid}/cancel": {
            "post": {
                "tags": [
                    "Bookings"
                ],
                "summary": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0440\u043e\u043d\u044c",
                "operationId": "post_v2_bookings_cancel",
                "parameters": [
                    {
                        "name": "cal-api-version",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2024-08-13"
                        }
                    },
                    {
                        "name": "bookingUid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CancelBookingInput"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "\u0411\u0440\u043e\u043d\u044c \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u0430 (\u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e: \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043e\u0442\u043c\u0435\u043d\u0430 \u0443\u0436\u0435 \u043e\u0442\u043c\u0435\u043d\u0451\u043d\u043d\u043e\u0439 \u0431\u0440\u043e\u043d\u0438 \u2192 200)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BookingEnvelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "not supported",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/rest/v2/event-types": {
            "get": {
                "tags": [
                    "EventTypes"
                ],
                "summary": "\u0421\u043f\u0438\u0441\u043e\u043a event types \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u043b\u044e\u0447\u0430",
                "operationId": "get_v2_event_types_list",
                "parameters": [
                    {
                        "name": "cal-api-version",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2024-08-13"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u0432\u0441\u0442\u0440\u0435\u0447",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EventTypesListEnvelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "\u041d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/rest/v2/event-types/{id}": {
            "get": {
                "tags": [
                    "EventTypes"
                ],
                "summary": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0438\u043f\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438, \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0433\u043e\u0441\u0442\u044e",
                "operationId": "get_v2_event_types_get",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "\\d+"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0438\u043f\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438"
                    },
                    "404": {
                        "description": "\u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "tags": [
                    "EventTypes"
                ],
                "summary": "\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0438\u043f\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438",
                "operationId": "patch_v2_event_types_patch",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "\\d+"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u041f\u0440\u0438\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f"
                    },
                    "404": {
                        "description": "\u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/rest/v2/me": {
            "get": {
                "tags": [
                    "Me"
                ],
                "summary": "\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u043b\u044e\u0447\u0430",
                "operationId": "get_v2_me",
                "parameters": [
                    {
                        "name": "cal-api-version",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2024-08-13"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MeEnvelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "\u041d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "\u041d\u0435\u0442 \u0441\u043a\u043e\u0443\u043f\u0430 profile:read",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/rest/v2/schedules": {
            "get": {
                "operationId": "get_v2_schedules_list",
                "responses": {
                    "default": {
                        "description": ""
                    }
                }
            },
            "post": {
                "operationId": "post_v2_schedules_create",
                "responses": {
                    "default": {
                        "description": ""
                    }
                }
            }
        },
        "/rest/v2/schedules/{id}": {
            "get": {
                "operationId": "get_v2_schedules_get",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "\\d+"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": ""
                    }
                }
            },
            "patch": {
                "operationId": "patch_v2_schedules_patch",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "\\d+"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": ""
                    }
                }
            }
        },
        "/rest/v2/slots": {
            "get": {
                "tags": [
                    "Slots"
                ],
                "summary": "\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0441\u043b\u043e\u0442\u044b \u0434\u043b\u044f \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f",
                "operationId": "get_v2_slots",
                "parameters": [
                    {
                        "name": "cal-api-version",
                        "in": "header",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2024-09-04"
                        }
                    },
                    {
                        "name": "start",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "2050-09-05"
                    },
                    {
                        "name": "end",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "2050-09-07"
                    },
                    {
                        "name": "eventTypeId",
                        "in": "query",
                        "description": "\u041b\u0438\u0431\u043e eventTypeId, \u043b\u0438\u0431\u043e eventTypeSlug+username",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "eventTypeSlug",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "username",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "timeZone",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "example": "Europe/Moscow"
                    },
                    {
                        "name": "duration",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "time",
                            "enum": [
                                "time",
                                "range"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "\u0421\u043b\u043e\u0442\u044b \u043f\u043e \u0434\u0430\u0442\u0430\u043c",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SlotsResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "\u041d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Event type \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorEnvelope"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/rest/v2/whoami": {
            "get": {
                "operationId": "get_whoami",
                "responses": {
                    "default": {
                        "description": ""
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Host": {
                "required": [
                    "id",
                    "name",
                    "email",
                    "displayEmail",
                    "username",
                    "timeZone"
                ],
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "displayEmail": {
                        "type": "string"
                    },
                    "username": {
                        "type": "string"
                    },
                    "timeZone": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "EventTypeRef": {
                "required": [
                    "id",
                    "slug"
                ],
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "slug": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "Attendee": {
                "required": [
                    "name",
                    "email",
                    "displayEmail",
                    "timeZone",
                    "absent"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "displayEmail": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string",
                        "example": "+79990001122",
                        "nullable": true
                    },
                    "telegram": {
                        "type": "string",
                        "example": "@ivan",
                        "nullable": true
                    },
                    "company": {
                        "type": "string",
                        "example": "\u041e\u041e\u041e \u00ab\u0420\u043e\u043c\u0430\u0448\u043a\u0430\u00bb",
                        "nullable": true
                    },
                    "timeZone": {
                        "type": "string"
                    },
                    "absent": {
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "BookingOutput": {
                "required": [
                    "id",
                    "uid",
                    "title",
                    "description",
                    "hosts",
                    "status",
                    "start",
                    "end",
                    "duration",
                    "eventTypeId",
                    "eventType",
                    "location",
                    "meetingUrl",
                    "absentHost",
                    "createdAt",
                    "updatedAt",
                    "attendees",
                    "bookingFieldsResponses"
                ],
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "uid": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "hosts": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/Host"
                                }
                            },
                            {
                                "type": "object",
                                "additionalProperties": {
                                    "$ref": "#/components/schemas/Host"
                                }
                            }
                        ]
                    },
                    "status": {
                        "type": "string",
                        "example": "accepted",
                        "enum": [
                            "accepted",
                            "pending",
                            "cancelled",
                            "rejected"
                        ]
                    },
                    "start": {
                        "type": "string"
                    },
                    "end": {
                        "type": "string"
                    },
                    "duration": {
                        "type": "integer"
                    },
                    "eventTypeId": {
                        "type": "integer"
                    },
                    "eventType": {
                        "$ref": "#/components/schemas/EventTypeRef"
                    },
                    "location": {
                        "type": "string"
                    },
                    "meetingUrl": {
                        "title": "URL \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u0434\u043b\u044f \u0412\u041a\u0421-\u043b\u043e\u043a\u0430\u0446\u0438\u0439 (jitsi/zoom/\u2026); \u043f\u0443\u0441\u0442\u043e, \u0435\u0441\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0435\u0442.",
                        "type": "string",
                        "example": "https://meet.jit.si/cal/7d4ccc46-c0f1-424a-9c17-8ead6f65e992"
                    },
                    "absentHost": {
                        "type": "boolean"
                    },
                    "createdAt": {
                        "type": "string"
                    },
                    "updatedAt": {
                        "type": "string"
                    },
                    "attendees": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/Attendee"
                                }
                            },
                            {
                                "type": "object",
                                "additionalProperties": {
                                    "$ref": "#/components/schemas/Attendee"
                                }
                            }
                        ]
                    },
                    "bookingFieldsResponses": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "type": "object"
            },
            "PaginationMeta": {
                "required": [
                    "totalItems",
                    "remainingItems",
                    "returnedItems",
                    "itemsPerPage",
                    "currentPage",
                    "totalPages",
                    "hasNextPage",
                    "hasPreviousPage"
                ],
                "properties": {
                    "totalItems": {
                        "type": "integer"
                    },
                    "remainingItems": {
                        "type": "integer"
                    },
                    "returnedItems": {
                        "type": "integer"
                    },
                    "itemsPerPage": {
                        "type": "integer"
                    },
                    "currentPage": {
                        "type": "integer"
                    },
                    "totalPages": {
                        "type": "integer"
                    },
                    "hasNextPage": {
                        "type": "boolean"
                    },
                    "hasPreviousPage": {
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "BookingsListEnvelope": {
                "required": [
                    "status",
                    "data",
                    "pagination"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "data": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/BookingOutput"
                                }
                            },
                            {
                                "type": "object",
                                "additionalProperties": {
                                    "$ref": "#/components/schemas/BookingOutput"
                                }
                            }
                        ]
                    },
                    "pagination": {
                        "$ref": "#/components/schemas/PaginationMeta"
                    }
                },
                "type": "object"
            },
            "CreateBookingInput": {
                "required": [
                    "start",
                    "attendee"
                ],
                "properties": {
                    "start": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2050-09-05T09:00:00.000Z"
                    },
                    "attendee": {
                        "required": [
                            "name",
                            "timeZone"
                        ],
                        "properties": {
                            "name": {
                                "type": "string",
                                "example": "\u0418\u0432\u0430\u043d"
                            },
                            "timeZone": {
                                "type": "string",
                                "example": "Europe/Moscow"
                            },
                            "email": {
                                "type": "string",
                                "nullable": true
                            },
                            "phoneNumber": {
                                "type": "string",
                                "nullable": true
                            },
                            "telegram": {
                                "type": "string",
                                "example": "@ivan",
                                "nullable": true
                            },
                            "company": {
                                "type": "string",
                                "example": "\u041e\u041e\u041e \u00ab\u0420\u043e\u043c\u0430\u0448\u043a\u0430\u00bb",
                                "nullable": true
                            },
                            "language": {
                                "type": "string",
                                "example": "ru",
                                "nullable": true
                            }
                        },
                        "type": "object"
                    },
                    "eventTypeId": {
                        "description": "\u041b\u0438\u0431\u043e eventTypeId, \u043b\u0438\u0431\u043e eventTypeSlug+username",
                        "type": "integer",
                        "nullable": true
                    },
                    "eventTypeSlug": {
                        "type": "string",
                        "nullable": true
                    },
                    "username": {
                        "type": "string",
                        "nullable": true
                    },
                    "lengthInMinutes": {
                        "type": "integer",
                        "nullable": true
                    },
                    "guests": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                }
                            },
                            {
                                "type": "object",
                                "nullable": true,
                                "enum": [
                                    null
                                ]
                            }
                        ],
                        "default": []
                    },
                    "location": {
                        "type": "string",
                        "nullable": true
                    },
                    "metadata": {
                        "type": "object",
                        "nullable": true,
                        "additionalProperties": true
                    },
                    "bookingFieldsResponses": {
                        "type": "object",
                        "nullable": true,
                        "additionalProperties": true
                    }
                },
                "type": "object"
            },
            "BookingEnvelope": {
                "required": [
                    "status",
                    "data"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "data": {
                        "$ref": "#/components/schemas/BookingOutput"
                    }
                },
                "type": "object"
            },
            "ErrorEnvelope": {
                "required": [
                    "status",
                    "error"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "error"
                    },
                    "error": {
                        "properties": {
                            "code": {
                                "type": "string",
                                "example": "NOT_FOUND"
                            },
                            "message": {
                                "type": "string"
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "CancelBookingInput": {
                "properties": {
                    "cancellationReason": {
                        "type": "string",
                        "example": "\u043f\u0435\u0440\u0435\u0434\u0443\u043c\u0430\u043b",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "EventTypeOutput": {
                "required": [
                    "id",
                    "ownerId",
                    "title",
                    "slug",
                    "lengthInMinutes",
                    "length",
                    "hidden",
                    "position",
                    "locations",
                    "price",
                    "currency",
                    "requiresConfirmation",
                    "disableGuests",
                    "minimumBookingNotice",
                    "beforeEventBuffer",
                    "afterEventBuffer"
                ],
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "ownerId": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string",
                        "nullable": true
                    },
                    "lengthInMinutes": {
                        "type": "integer"
                    },
                    "length": {
                        "type": "integer"
                    },
                    "hidden": {
                        "type": "boolean"
                    },
                    "position": {
                        "type": "integer"
                    },
                    "locations": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "schedulingType": {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                            "ROUND_ROBIN",
                            "COLLECTIVE"
                        ]
                    },
                    "seatsPerTimeSlot": {
                        "type": "integer",
                        "nullable": true
                    },
                    "price": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "requiresConfirmation": {
                        "type": "boolean"
                    },
                    "disableGuests": {
                        "type": "boolean"
                    },
                    "minimumBookingNotice": {
                        "type": "integer"
                    },
                    "beforeEventBuffer": {
                        "type": "integer"
                    },
                    "afterEventBuffer": {
                        "type": "integer"
                    },
                    "slotInterval": {
                        "type": "integer",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "EventTypesListEnvelope": {
                "required": [
                    "status",
                    "data"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "data": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/EventTypeOutput"
                                }
                            },
                            {
                                "type": "object",
                                "additionalProperties": {
                                    "$ref": "#/components/schemas/EventTypeOutput"
                                }
                            }
                        ]
                    }
                },
                "type": "object"
            },
            "MeOutput": {
                "required": [
                    "id",
                    "timeZone",
                    "weekStart"
                ],
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "username": {
                        "type": "string",
                        "example": "ivan",
                        "nullable": true
                    },
                    "name": {
                        "type": "string",
                        "example": "\u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432",
                        "nullable": true
                    },
                    "avatarUrl": {
                        "type": "string",
                        "example": "https://planerka.app/meet/ivan/avatar.png",
                        "nullable": true
                    },
                    "bio": {
                        "type": "string",
                        "nullable": true
                    },
                    "timeZone": {
                        "type": "string"
                    },
                    "weekStart": {
                        "type": "string",
                        "example": "Monday"
                    }
                },
                "type": "object"
            },
            "MeEnvelope": {
                "required": [
                    "status",
                    "data"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success",
                        "enum": [
                            "success"
                        ]
                    },
                    "data": {
                        "$ref": "#/components/schemas/MeOutput"
                    }
                },
                "type": "object"
            },
            "SlotsResponse": {
                "required": [
                    "status",
                    "data"
                ],
                "properties": {
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "data": {
                        "type": "object",
                        "example": {
                            "2050-09-05": [
                                {
                                    "start": "2050-09-05T09:00:00.000+03:00"
                                }
                            ]
                        },
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "properties": {
                                    "start": {
                                        "type": "string",
                                        "format": "date-time"
                                    },
                                    "end": {
                                        "type": "string",
                                        "format": "date-time",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {
            "calApiKey": {
                "type": "http",
                "description": "API-\u043a\u043b\u044e\u0447 \u041f\u043b\u0430\u043d\u0451\u0440\u043a\u0438 \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c cal_",
                "scheme": "bearer"
            }
        }
    },
    "security": [
        {
            "calApiKey": []
        }
    ],
    "tags": [
        {
            "name": "Bookings",
            "description": "Bookings"
        },
        {
            "name": "EventTypes",
            "description": "EventTypes"
        },
        {
            "name": "Me",
            "description": "Me"
        },
        {
            "name": "Slots",
            "description": "Slots"
        }
    ]
}