{"openapi":"3.1.0","info":{"title":"CrewUp API","version":"1.1.0","description":"Локальный бэкэнд без регистрации, паролей и токенов. Выбор профиля через X-Profile-Id не является аутентификацией: любой локальный клиент может выбрать любой профиль. Сервер по умолчанию слушает 127.0.0.1. SQLite и загрузки сохраняются в data/. Все даты ISO 8601 с часовым поясом, ответы UTC. Перед публичным размещением согласовать модель доступа. API без /v1: версия 1.1.0. Два клиента /front1/ и /front2/ используют REST polling раз в 2 секунды. SSE необязателен. Ответы JSON без envelope, кроме пагинации сообщений и ошибок."},"servers":[{"url":"/","description":"Текущий сервер: локальная версия или домен публикации"}],"paths":{"/api/health":{"get":{"summary":"Проверка сервера через префикс API","description":"","operationId":"get__api_health","tags":["health"],"parameters":[],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"version":{"type":"string"},"storage":{"type":"string","enum":["native-sqlite","portable-sqlite"]},"runtime":{"type":"string"}},"required":[]}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"summary":"Проверка сервера","description":"","operationId":"get__health","tags":["system"],"parameters":[],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"version":{"type":"string"},"storage":{"type":"string","enum":["native-sqlite","portable-sqlite"]},"runtime":{"type":"string"}},"required":[]}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/profiles":{"get":{"summary":"Профили для выбора без регистрации","description":"","operationId":"get__api_profiles","tags":["profiles"],"parameters":[],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Profile"}}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Создать локальный профиль без пароля","description":"","operationId":"post__api_profiles","tags":["profiles"],"parameters":[],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileInput"}}}}}},"/api/me":{"patch":{"summary":"Изменить имя, телефон или фото выбранного профиля","description":"","operationId":"patch__api_me","tags":["me"],"parameters":[{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"phone":{"type":["string","null"]},"avatarFileId":{"type":["string","null"]}},"required":[]}}}}}},"/api/profiles/search":{"get":{"summary":"Найти профиль по точному номеру телефона","description":"","operationId":"get__api_profiles_search","tags":["profiles"],"parameters":[{"name":"phone","in":"query","required":true,"schema":{"type":"string","example":"+79990000002"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Profile"}}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/contacts":{"get":{"summary":"Контакты выбранного профиля","description":"","operationId":"get__api_contacts","tags":["contacts"],"parameters":[{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Найти или создать контакт по телефону","description":"Телефон нормализуется удалением пробелов, скобок, точек и дефисов. Если профиля с этим телефоном нет, создаётся профиль по имени контакта без регистрации. Его можно выбрать и от его имени создать группу. Повтор контакта возвращает 409.","operationId":"post__api_contacts","tags":["contacts"],"parameters":[{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}}}},"/api/contacts/{contactId}":{"patch":{"summary":"Изменить личное имя контакта и фото","description":"","operationId":"patch__api_contacts__contactId_","tags":["contacts"],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"avatarFileId":{"type":["string","null"]}},"required":[]}}}}},"delete":{"summary":"Удалить контакт из своего списка","description":"","operationId":"delete__api_contacts__contactId_","tags":["contacts"],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"204":{"description":"Удалено"},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/files":{"post":{"summary":"Загрузить фото, видео или документ","description":"Тело — байты файла, НЕ multipart и НЕ JSON. Content-Type должен соответствовать MIME файла. Максимум 50 MiB, до 10 вложений в сообщении. Сначала загрузите файл, затем передайте id в attachmentIds, avatarFileId или fileId. Изображения проверяются по сигнатуре.","operationId":"post__api_files","tags":["files"],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/gif":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"video/mp4":{"schema":{"type":"string","format":"binary"}},"video/webm":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"text/plain":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string","format":"binary"}},"application/zip":{"schema":{"type":"string","format":"binary"}},"application/msword":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"schema":{"type":"string","format":"binary"}}}}}},"/api/files/{fileId}":{"get":{"summary":"Получить файл","description":"Файлы доступны по ссылке без заголовка профиля для img/video. Видео поддерживает Range (206). Документы выдаются как скачивание. Суффиксные диапазоны bytes=-500 не поддерживаются.","operationId":"get__api_files__fileId_","tags":["files"],"parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Range","in":"header","schema":{"type":"string"},"example":"bytes=0-1023"}],"responses":{"200":{"description":"Байты файла","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"Диапазон байтов","headers":{"Content-Range":{"schema":{"type":"string"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/assets":{"get":{"summary":"Встроенные и добавленные эмодзи/GIF","description":"","operationId":"get__api_assets","tags":["assets"],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["emoji","gif"]}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Добавить свой эмодзи или GIF в общий каталог","description":"Для GIF обязателен fileId загруженного image/gif. Эмодзи: value (Unicode до 32 символов) или fileId изображения. Встроено 12 Unicode-эмодзи и 3 простые оригинальные анимации; внешний GIF-поиск не подключён.","operationId":"post__api_assets","tags":["assets"],"parameters":[{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetInput"}}}}}},"/api/chats":{"get":{"summary":"Все доступные чаты и подчаты","description":"","operationId":"get__api_chats","tags":["chats"],"parameters":[{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Chat"}}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Создать личный чат или группу","description":"Любой профиль может создать группу. Создатель добавляется в memberIds автоматически. Для direct нужны ровно два разных профиля.","operationId":"post__api_chats","tags":["chats"],"parameters":[{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatInput"}}}}}},"/api/chats/{chatId}":{"get":{"summary":"Получить чат","description":"","operationId":"get__api_chats__chatId_","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Название, планирование, преобразование в группу","description":"Передайте {\"type\":\"group\"}, чтобы превратить direct в группу. planningMode — предпочтение интерфейса; цели и планы доступны в любом режиме.","operationId":"patch__api_chats__chatId_","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"planningMode":{"type":"boolean"},"type":{"const":"group"}},"required":[]}}}}}},"/api/chats/{chatId}/members":{"post":{"summary":"Добавить профиль в группу","description":"Любой участник группы может добавить профиль. Участие в подчатах наследуется динамически. Роли администратора и удаление участников в этой локальной версии отсутствуют.","operationId":"post__api_chats__chatId__members","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"profileId":{"type":"string"}},"required":["profileId"]}}}}}},"/api/chats/{chatId}/subchats":{"get":{"summary":"Список подчатов","description":"","operationId":"get__api_chats__chatId__subchats","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Chat"}}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Создать подчат группы","description":"Один уровень подчатов. Вложенные подчаты не поддерживаются.","operationId":"post__api_chats__chatId__subchats","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"]}}}}}},"/api/chats/{chatId}/messages":{"get":{"summary":"История сообщений с курсором","description":"По умолчанию последние 50 сообщений в порядке от старых к новым. Для предыдущей страницы передайте before=nextBefore. null означает начало истории. При SSE-переподключении перечитайте историю и объедините по id.","operationId":"get__api_chats__chatId__messages","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"before","in":"query","required":false,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"nextBefore":{"type":["string","null"]}},"required":[]}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Отправить текст, вложения, GIF или эмодзи","description":"","operationId":"post__api_chats__chatId__messages","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageInput"}}}}}},"/api/messages/{messageId}":{"patch":{"summary":"Редактировать свой текст","description":"","operationId":"patch__api_messages__messageId_","tags":["messages"],"parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":10000}},"required":["text"]}}}}},"delete":{"summary":"Удалить своё сообщение","description":"","operationId":"delete__api_messages__messageId_","tags":["messages"],"parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"204":{"description":"Удалено"},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/messages/{messageId}/reactions":{"post":{"summary":"Включить или убрать реакцию","description":"emoji — value Unicode-эмодзи из каталога или id кастомного эмодзи. Повторный запрос того же профиля снимает реакцию.","operationId":"post__api_messages__messageId__reactions","tags":["messages"],"parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emoji":{"type":"string"}},"required":["emoji"]}}}}}},"/api/chats/{chatId}/goals":{"get":{"summary":"Цели чата","description":"","operationId":"get__api_chats__chatId__goals","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Goal"}}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Создать цель","description":"","operationId":"post__api_chats__chatId__goals","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalInput"}}}}}},"/api/goals/{itemId}":{"patch":{"summary":"Изменить цель и статус","description":"Изменять и удалять может любой участник чата. Напоминания и отложенная отправка сообщений не реализованы.","operationId":"patch__api_goals__itemId_","tags":["goals"],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalPatch"}}}}},"delete":{"summary":"Удалить","description":"","operationId":"delete__api_goals__itemId_","tags":["goals"],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"204":{"description":"Удалено"},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/chats/{chatId}/plans":{"get":{"summary":"План чата","description":"","operationId":"get__api_chats__chatId__plans","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Запланировать событие","description":"","operationId":"post__api_chats__chatId__plans","tags":["chats"],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"201":{"description":"Создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanInput"}}}}}},"/api/plans/{itemId}":{"patch":{"summary":"Изменить событие и статус","description":"Изменять и удалять может любой участник чата. Напоминания и отложенная отправка сообщений не реализованы.","operationId":"patch__api_plans__itemId_","tags":["plans"],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPatch"}}}}},"delete":{"summary":"Удалить","description":"","operationId":"delete__api_plans__itemId_","tags":["plans"],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Profile-Id","in":"header","required":true,"schema":{"type":"string"},"description":"ID выбранного профиля. Это выбор личности в локальной версии, не токен авторизации."}],"responses":{"204":{"description":"Удалено"},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/events":{"get":{"summary":"События реального времени (SSE)","description":"new EventSource(`/api/events?profileId=${profile.id}`). События: ready, chat.created, chat.updated, message.created, message.updated, messages.deleted, goals.created, goals.updated, goals.deleted, plans.created, plans.updated, plans.deleted. Payload: {chatId,data}; ready: {profileId}. События только для чатов участника. Heartbeat каждые 20 секунд. Журнал событий и replay отсутствуют; после ready перечитайте REST-ресурсы. Сначала откройте SSE, затем загрузите снимок и объединяйте сообщения по id.","operationId":"get__api_events","tags":["events"],"parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Поток SSE","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Ошибка параметров","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет доступа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Слишком большой файл","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Неверный Range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"База временно занята, повторите запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"ProfileInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"example":"Алексей"},"phone":{"type":["string","null"],"example":"+79991234567"}},"required":["name"]},"Profile":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"phone":{"type":["string","null"]},"avatarFileId":{"type":["string","null"]}},"required":["id","createdAt","name","phone","avatarFileId"]},"ContactInput":{"type":"object","properties":{"phone":{"type":"string","example":"+79990000002"},"name":{"type":"string"},"avatarFileId":{"type":["string","null"]}},"required":["phone"]},"Contact":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"ownerId":{"type":"string"},"profileId":{"type":"string"},"phone":{"type":"string"},"name":{"type":"string"},"avatarFileId":{"type":["string","null"]}},"required":["id","createdAt","ownerId","profileId","phone","name","avatarFileId"]},"File":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"mime":{"type":"string"},"size":{"type":"integer"},"ownerId":{"type":["string","null"]},"builtin":{"type":"boolean"},"url":{"type":"string"}},"required":["id","createdAt","name","mime","size","ownerId","builtin","url"]},"AssetInput":{"type":"object","properties":{"kind":{"type":"string","enum":["emoji","gif"]},"name":{"type":"string"},"fileId":{"type":["string","null"]},"value":{"type":["string","null"]}},"required":["kind","name"]},"Asset":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["emoji","gif"]},"name":{"type":"string"},"fileId":{"type":["string","null"]},"value":{"type":["string","null"]},"builtin":{"type":"boolean"},"creatorId":{"type":["string","null"]}},"required":["id","createdAt","kind","name","fileId","value","builtin","creatorId"]},"ChatInput":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":"string","enum":["direct","group"],"default":"group"},"memberIds":{"type":"array","items":{"type":"string"}}},"required":["title"]},"Chat":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"title":{"type":"string"},"type":{"type":"string","enum":["direct","group","subchat"]},"parentId":{"type":["string","null"]},"ownerId":{"type":"string"},"memberIds":{"type":"array","items":{"type":"string"}},"planningMode":{"type":"boolean"}},"required":["id","createdAt","title","type","parentId","ownerId","memberIds","planningMode"]},"MessageInput":{"type":"object","properties":{"text":{"type":"string","maxLength":10000},"attachmentIds":{"type":"array","items":{"type":"string"},"maxItems":10},"assetId":{"type":["string","null"]}},"required":[]},"Message":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"chatId":{"type":"string"},"senderId":{"type":"string"},"text":{"type":"string"},"attachmentIds":{"type":"array","items":{"type":"string"}},"assetId":{"type":["string","null"]},"reactions":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"editedAt":{"type":["string","null"]}},"required":["id","createdAt","chatId","senderId","text","attachmentIds","assetId","reactions","editedAt"]},"GoalInput":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"dueAt":{"type":["string","null"],"format":"date-time"},"assigneeId":{"type":["string","null"]}},"required":["title"]},"GoalPatch":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"dueAt":{"type":["string","null"],"format":"date-time"},"assigneeId":{"type":["string","null"]},"status":{"type":"string","enum":["open","in_progress","done","cancelled"]}},"required":[]},"Goal":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"title":{"type":"string"},"description":{"type":"string"},"dueAt":{"type":["string","null"],"format":"date-time"},"assigneeId":{"type":["string","null"]},"chatId":{"type":"string"},"creatorId":{"type":"string"},"status":{"type":"string","enum":["open","in_progress","done","cancelled"]}},"required":["id","createdAt","title","description","chatId","creatorId","status","dueAt","assigneeId"]},"PlanInput":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"}},"required":["title","startsAt","endsAt"]},"PlanPatch":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["planned","done","cancelled"]}},"required":[]},"Plan":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"title":{"type":"string"},"description":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"chatId":{"type":"string"},"creatorId":{"type":"string"},"status":{"type":"string","enum":["planned","done","cancelled"]}},"required":["id","createdAt","title","description","chatId","creatorId","status","startsAt","endsAt"]}}}}