{"openapi":"3.1.0","info":{"title":"VSTA Orders Hub","description":"API для управления гарантийными заявками","version":"1.0.0"},"paths":{"/api/v1/health/":{"get":{"tags":["health"],"summary":"Health Check","description":"Базовая проверка здоровья API.","operationId":"health_check_api_v1_health__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/db":{"get":{"tags":["health"],"summary":"Health Check Db","description":"Проверка подключения к базе данных.","operationId":"health_check_db_api_v1_health_db_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Получить access token по email и паролю.","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_api_v1_auth_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","description":"Получить профиль текущего пользователя.","operationId":"get_me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/external-systems/":{"get":{"tags":["external-systems"],"summary":"Get External Systems","description":"Получить список внешних систем, доступных текущему пользователю.","operationId":"get_external_systems_api_v1_external_systems__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExternalSystemResponse"},"type":"array","title":"Response Get External Systems Api V1 External Systems  Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["external-systems"],"summary":"Create External System","description":"Создать внешнюю систему.\n\nДоступно только администратору хаба.","operationId":"create_external_system_api_v1_external_systems__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalSystemCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalSystemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/warranty-claims/":{"post":{"tags":["warranty-claims"],"summary":"Create Warranty Claim","description":"1. Создать гарантийную заявку.","operationId":"create_warranty_claim_api_v1_warranty_claims__post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["warranty-claims"],"summary":"Get Warranty Claims Filtered","description":"4. Получить заявки по фильтру.","operationId":"get_warranty_claims_filtered_api_v1_warranty_claims__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Количество записей для пропуска","default":0,"title":"Skip"},"description":"Количество записей для пропуска"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Максимальное количество записей","default":100,"title":"Limit"},"description":"Максимальное количество записей"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/WarrantyClaimStatus"},{"type":"null"}],"description":"Фильтр по статусу","title":"Status"},"description":"Фильтр по статусу"},{"name":"applicant_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Фильтр по имени заявителя","title":"Applicant Name"},"description":"Фильтр по имени заявителя"},{"name":"applicant_phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Фильтр по телефону заявителя","title":"Applicant Phone"},"description":"Фильтр по телефону заявителя"},{"name":"location_address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Фильтр по адресу","title":"Location Address"},"description":"Фильтр по адресу"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WarrantyClaimResponse"},"title":"Response Get Warranty Claims Filtered Api V1 Warranty Claims  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warranty-claims/{claim_id}/external-ids":{"post":{"tags":["warranty-claims"],"summary":"Add Warranty Claim External Id","description":"Добавить или обновить внешний ID заявки.","operationId":"add_warranty_claim_external_id_api_v1_warranty_claims__claim_id__external_ids_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"integer","title":"Claim Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimExternalIDCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warranty-claims/{claim_id}":{"delete":{"tags":["warranty-claims"],"summary":"Delete Warranty Claim","description":"2. Удалить гарантийную заявку.","operationId":"delete_warranty_claim_api_v1_warranty_claims__claim_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"integer","title":"Claim Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["warranty-claims"],"summary":"Update Warranty Claim","description":"6. Изменить заявку.","operationId":"update_warranty_claim_api_v1_warranty_claims__claim_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"integer","title":"Claim Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["warranty-claims"],"summary":"Get Warranty Claim","description":"Получить заявку по ID.","operationId":"get_warranty_claim_api_v1_warranty_claims__claim_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"integer","title":"Claim Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warranty-claims/{claim_id}/status":{"patch":{"tags":["warranty-claims"],"summary":"Update Warranty Claim Status","description":"5. Сменить статус заявки.","operationId":"update_warranty_claim_status_api_v1_warranty_claims__claim_id__status_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"integer","title":"Claim Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warranty-claims/{claim_id}/result":{"post":{"tags":["warranty-claims"],"summary":"Add Warranty Claim Result","description":"7. Добавить результат заявки (можно несколько раз на одну заявку).","operationId":"add_warranty_claim_result_api_v1_warranty_claims__claim_id__result_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"integer","title":"Claim Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimResultCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warranty-claims/number/{claim_number}":{"get":{"tags":["warranty-claims"],"summary":"Get Warranty Claim By Number","description":"Получить заявку по номеру.","operationId":"get_warranty_claim_by_number_api_v1_warranty_claims_number__claim_number__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"claim_number","in":"path","required":true,"schema":{"type":"string","title":"Claim Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarrantyClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/uploads":{"get":{"tags":["files"],"summary":"List My Uploads","description":"Список своих загрузок в MinIO (метаданные в БД).\n\nНужен, если клиент потерял ответ ``POST /files/upload`` и не знает ``file_path``\nдля прикрепления к заявке. Фильтры: имя файла, интервал дат ``created_at``.","operationId":"list_my_uploads_api_v1_files_uploads_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Смещение","default":0,"title":"Skip"},"description":"Смещение"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Лимит записей","default":50,"title":"Limit"},"description":"Лимит записей"},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Подстрока в исходном имени файла (без учёта регистра)","title":"Filename"},"description":"Подстрока в исходном имени файла (без учёта регистра)"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Нижняя граница по времени загрузки (UTC)","title":"Date From"},"description":"Нижняя граница по времени загрузки (UTC)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Верхняя граница по времени загрузки (UTC)","title":"Date To"},"description":"Верхняя граница по времени загрузки (UTC)"},{"name":"owner_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Только для admin: смотреть загрузки указанного пользователя","title":"Owner User Id"},"description":"Только для admin: смотреть загрузки указанного пользователя"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoredFileUploadListItem"},"title":"Response List My Uploads Api V1 Files Uploads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/upload":{"post":{"tags":["files"],"summary":"Upload Files","description":"Загрузить файлы в MinIO.\n\nВ ответе для каждого файла: ``file_path`` (ключ в бакете) и вычисляемое поле\n``download_url`` — постоянная ссылка на скачивание (см. настройки MinIO и\n``PUBLIC_APP_BASE_URL`` в документации конфигурации).\n\nЗапись попадает в ``GET /files/uploads`` — можно найти файл, если ответ upload потерян.","operationId":"upload_files_api_v1_files_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_files_api_v1_files_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AttachmentResponse"},"type":"array","title":"Response Upload Files Api V1 Files Upload Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/files/download/{file_path}":{"get":{"tags":["files"],"summary":"Download File","description":"Скачать файл по ключу в MinIO.\n\nДоступ: владелец заявки/результата с этим вложением **или** владелец записи\nиз ``GET /files/uploads`` (загрузка ещё не привязана к заявке); админ — ко всем.","operationId":"download_file_api_v1_files_download__file_path__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/":{"get":{"tags":["users"],"summary":"Get Users","description":"Получить список пользователей.","operationId":"get_users_api_v1_users__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserResponse"},"title":"Response Get Users Api V1 Users  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Create User","description":"Создать нового пользователя.","operationId":"create_user_api_v1_users__post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User","description":"Получить пользователя по ID.","operationId":"get_user_api_v1_users__user_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["users"],"summary":"Update User","description":"Обновить пользователя.","operationId":"update_user_api_v1_users__user_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete User","description":"Удалить пользователя.","operationId":"delete_user_api_v1_users__user_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Корневой эндпоинт - перенаправление на документацию.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Эндпоинт для проверки здоровья приложения.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/favicon.ico":{"get":{"summary":"Favicon","description":"Возвращает favicon для документации.","operationId":"favicon_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/versions.json":{"get":{"summary":"Versions","description":"Заглушка для versions.json (нужен для MkDocs Material).","operationId":"versions_versions_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ApplicantData":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"ФИО заявителя"},"phone":{"type":"string","maxLength":50,"minLength":1,"title":"Phone","description":"Телефон заявителя"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email","description":"Email заявителя"}},"type":"object","required":["name","phone"],"title":"ApplicantData","description":"Данные заявителя."},"AttachmentCreate":{"properties":{"filename":{"type":"string","maxLength":255,"title":"Filename","description":"Имя файла"},"file_path":{"type":"string","maxLength":500,"title":"File Path","description":"Ключ объекта в MinIO (например attachments/uuid.pdf)"},"file_size":{"type":"integer","minimum":0.0,"title":"File Size","description":"Размер файла в байтах"},"content_type":{"type":"string","maxLength":100,"title":"Content Type","description":"MIME тип файла"}},"type":"object","required":["filename","file_path","file_size","content_type"],"title":"AttachmentCreate","description":"Схема для создания вложения."},"AttachmentResponse":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"filename":{"type":"string","maxLength":255,"title":"Filename","description":"Имя файла"},"file_path":{"type":"string","maxLength":500,"title":"File Path","description":"Ключ объекта в MinIO (например attachments/uuid.pdf)"},"file_size":{"type":"integer","minimum":0.0,"title":"File Size","description":"Размер файла в байтах"},"content_type":{"type":"string","maxLength":100,"title":"Content Type","description":"MIME тип файла"},"claim_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Claim Id","description":"ID заявки"},"result_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Result Id","description":"ID результата"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url","description":"Постоянная ссылка на скачивание (MinIO напрямую или прокси API — см. настройки).\n\nСм. ``attachment_download_url`` в ``app.services.object_storage``.","readOnly":true}},"type":"object","required":["filename","file_path","file_size","content_type","download_url"],"title":"AttachmentResponse","description":"Схема ответа для вложения."},"Body_login_api_v1_auth_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_api_v1_auth_login_post"},"Body_upload_files_api_v1_files_upload_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","description":"Файлы для загрузки"}},"type":"object","required":["files"],"title":"Body_upload_files_api_v1_files_upload_post"},"ExternalSystemCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Наименование системы (уникально в хабе)"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Описание системы"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id","description":"ID владельца системы (пользователь хаба)"}},"type":"object","required":["name"],"title":"ExternalSystemCreate","description":"Схема создания внешней системы (только admin)."},"ExternalSystemResponse":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Наименование системы (уникально в хабе)"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Описание системы"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id","description":"ID владельца системы (пользователь хаба)"}},"type":"object","required":["name"],"title":"ExternalSystemResponse","description":"Схема ответа внешней системы."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"StoredFileUploadListItem":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"file_path":{"type":"string","maxLength":500,"title":"File Path","description":"Ключ объекта в MinIO"},"filename":{"type":"string","maxLength":255,"title":"Filename","description":"Исходное имя файла"},"file_size":{"type":"integer","minimum":0.0,"title":"File Size","description":"Размер в байтах"},"content_type":{"type":"string","maxLength":100,"title":"Content Type","description":"MIME-тип"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Время загрузки"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url","description":"Постоянная ссылка на скачивание (как у вложений в заявке).","readOnly":true}},"type":"object","required":["file_path","filename","file_size","content_type","created_at","download_url"],"title":"StoredFileUploadListItem","description":"Элемент списка своих загрузок."},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"Token","description":"Ответ с access token."},"UserCreate":{"properties":{"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone"},"is_active":{"type":"boolean","title":"Is Active","default":true},"role":{"$ref":"#/components/schemas/UserRole","default":"user"},"password":{"type":"string","maxLength":100,"minLength":8,"title":"Password"}},"type":"object","required":["first_name","last_name","email","password"],"title":"UserCreate","description":"Схема для создания пользователя."},"UserResponse":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone"},"is_active":{"type":"boolean","title":"Is Active","default":true},"role":{"$ref":"#/components/schemas/UserRole","default":"user"}},"type":"object","required":["first_name","last_name","email"],"title":"UserResponse","description":"Схема ответа для пользователя."},"UserRole":{"type":"string","enum":["admin","user"],"title":"UserRole","description":"Роли пользователей в API."},"UserUpdate":{"properties":{"first_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"role":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}]}},"type":"object","title":"UserUpdate","description":"Схема для обновления пользователя."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WarrantyClaimCreate":{"properties":{"description":{"type":"string","maxLength":2000,"minLength":10,"title":"Description","description":"Описание проблемы (минимум 10 символов)"},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Comment","description":"Дополнительный комментарий"},"location_address":{"type":"string","maxLength":500,"minLength":1,"title":"Location Address","description":"Точный адрес, где произошла проблема"},"applicant":{"$ref":"#/components/schemas/ApplicantData","description":"Данные заявителя"},"executor_id":{"type":"integer","title":"Executor Id","description":"ID исполнителя заявки (пользователь системы)"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id","description":"Владелец заявки (ID пользователя в хабе, например клиент). Может задать только admin; для остальных ролей поле не используется."},"attachments":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttachmentCreate"},"type":"array"},{"type":"null"}],"title":"Attachments","description":"Вложения к заявке"},"external_ids":{"anyOf":[{"items":{"$ref":"#/components/schemas/WarrantyClaimExternalIDCreate"},"type":"array"},{"type":"null"}],"title":"External Ids","description":"Внешние ID заявки в сторонних системах"}},"type":"object","required":["description","location_address","applicant","executor_id"],"title":"WarrantyClaimCreate","description":"Схема для создания гарантийной заявки."},"WarrantyClaimExternalIDCreate":{"properties":{"external_system_id":{"type":"integer","title":"External System Id","description":"ID внешней системы"},"external_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Id","description":"Внешний ID заявки"}},"type":"object","required":["external_system_id","external_id"],"title":"WarrantyClaimExternalIDCreate","description":"Схема добавления внешнего ID."},"WarrantyClaimExternalIDResponse":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"external_system_id":{"type":"integer","title":"External System Id","description":"ID внешней системы"},"external_id":{"type":"string","maxLength":255,"minLength":1,"title":"External Id","description":"Внешний ID заявки"},"claim_id":{"type":"integer","title":"Claim Id","description":"ID заявки в хабе"},"external_system":{"anyOf":[{"$ref":"#/components/schemas/ExternalSystemResponse"},{"type":"null"}],"description":"Данные внешней системы"}},"type":"object","required":["external_system_id","external_id","claim_id"],"title":"WarrantyClaimExternalIDResponse","description":"Схема ответа внешнего ID заявки."},"WarrantyClaimResponse":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"claim_number":{"type":"string","title":"Claim Number","description":"Номер заявки"},"description":{"type":"string","title":"Description","description":"Описание проблемы"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Дополнительный комментарий"},"location_address":{"type":"string","title":"Location Address","description":"Точный адрес, где произошла проблема"},"status":{"$ref":"#/components/schemas/WarrantyClaimStatus","description":"Статус заявки"},"owner_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner User Id","description":"ID владельца заявки"},"executor_id":{"type":"integer","title":"Executor Id","description":"ID исполнителя заявки"},"applicant_data":{"additionalProperties":true,"type":"object","title":"Applicant Data","description":"Данные заявителя"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentResponse"},"type":"array","title":"Attachments","description":"Вложения к заявке"},"external_ids":{"items":{"$ref":"#/components/schemas/WarrantyClaimExternalIDResponse"},"type":"array","title":"External Ids","description":"Внешние ID заявки"},"results":{"items":{"$ref":"#/components/schemas/WarrantyClaimResultResponse"},"type":"array","title":"Results","description":"Результаты работ застройщика (может быть несколько)"},"result":{"anyOf":[{"$ref":"#/components/schemas/WarrantyClaimResultResponse"},{"type":"null"}],"description":"Последний результат (обратная совместимость со старым полем result).","readOnly":true}},"type":"object","required":["claim_number","description","location_address","status","executor_id","applicant_data","result"],"title":"WarrantyClaimResponse","description":"Схема ответа для гарантийной заявки."},"WarrantyClaimResultCreate":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title","description":"Краткий заголовок результата (например «Устранена протечка»)"},"description":{"type":"string","maxLength":10000,"minLength":1,"title":"Description","description":"Описание выполненных работ"},"attachments":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttachmentCreate"},"type":"array"},{"type":"null"}],"title":"Attachments","description":"Вложения к результату (ключи MinIO после upload)"}},"type":"object","required":["title","description"],"title":"WarrantyClaimResultCreate","description":"Создание результата: текст + опциональные вложения (акты, фото и т.д.)."},"WarrantyClaimResultResponse":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title","description":"Краткий заголовок результата (например «Устранена протечка»)"},"description":{"type":"string","maxLength":10000,"minLength":1,"title":"Description","description":"Описание выполненных работ"},"claim_id":{"type":"integer","title":"Claim Id","description":"ID заявки в хабе"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentResponse"},"type":"array","title":"Attachments","description":"Вложения к результату"}},"type":"object","required":["title","description","claim_id"],"title":"WarrantyClaimResultResponse","description":"Ответ API: результат с вложениями."},"WarrantyClaimStatus":{"type":"string","enum":["new","sent_to_builder","accepted_by_builder","completed_by_builder","cancelled"],"title":"WarrantyClaimStatus","description":"Статусы гарантийной заявки."},"WarrantyClaimStatusUpdate":{"properties":{"status":{"$ref":"#/components/schemas/WarrantyClaimStatus","description":"Новый статус заявки"},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Comment","description":"Комментарий к изменению статуса"}},"type":"object","required":["status"],"title":"WarrantyClaimStatusUpdate","description":"Схема для обновления статуса заявки."},"WarrantyClaimUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000,"minLength":10},{"type":"null"}],"title":"Description"},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Comment"},"location_address":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Location Address"},"applicant":{"anyOf":[{"$ref":"#/components/schemas/ApplicantData"},{"type":"null"}]},"executor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Executor Id","description":"ID исполнителя заявки"}},"type":"object","title":"WarrantyClaimUpdate","description":"Схема для обновления гарантийной заявки."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/auth/login"}}}}}}