{"openapi":"3.1.0","info":{"title":"Session Audit","version":"0.1.0"},"paths":{"/api/login":{"post":{"summary":"Api Login","operationId":"api_login_api_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pwd"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/phone/start":{"post":{"summary":"Phone Start","operationId":"phone_start_api_phone_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneStart"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/phone/verify":{"post":{"summary":"Phone Verify","operationId":"phone_verify_api_phone_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SidCode"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/phone/2fa":{"post":{"summary":"Phone 2Fa","operationId":"phone_2fa_api_phone_2fa_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SidPwd"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/phone/resend":{"post":{"summary":"Phone Resend","operationId":"phone_resend_api_phone_resend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SidOnly"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qr/start":{"post":{"summary":"Qr Start","operationId":"qr_start_api_qr_start_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/qr/poll/{sid}":{"get":{"summary":"Qr Poll","operationId":"qr_poll_api_qr_poll__sid__get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qr/refresh":{"post":{"summary":"Qr Refresh","operationId":"qr_refresh_api_qr_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SidOnly"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qr/2fa":{"post":{"summary":"Qr 2Fa","operationId":"qr_2fa_api_qr_2fa_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SidPwd"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/start":{"post":{"summary":"Audit Start","operationId":"audit_start_api_audit_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/status/{tid}":{"get":{"summary":"Audit Status","operationId":"audit_status_api_audit_status__tid__get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","title":"Tid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/download/{tid}/{ftype}":{"get":{"summary":"Audit Download","operationId":"audit_download_api_audit_download__tid___ftype__get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string","title":"Tid"}},{"name":"ftype","in":"path","required":true,"schema":{"type":"string","title":"Ftype"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client/me/{sid}":{"get":{"summary":"Client Me","operationId":"client_me_api_client_me__sid__get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client/dialogs/{sid}":{"get":{"summary":"Client Dialogs","operationId":"client_dialogs_api_client_dialogs__sid__get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client/messages/{sid}/{peer_id}":{"get":{"summary":"Client Messages","operationId":"client_messages_api_client_messages__sid___peer_id__get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}},{"name":"peer_id","in":"path","required":true,"schema":{"type":"string","title":"Peer Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":40,"title":"Limit"}},{"name":"offset_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client/send":{"post":{"summary":"Client Send","operationId":"client_send_api_client_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMsg"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client/updates":{"post":{"summary":"Client Updates","operationId":"client_updates_api_client_updates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUpdates"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client/{sid}":{"delete":{"summary":"Client Close","operationId":"client_close_api_client__sid__delete","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","description":"Liveness-эндпоинт для watchdog (проверка HTTP вместо порта).\nЕсли event loop заблокирован тяжёлой синхронной работой (Excel, поиск по БД)\nили executor переполнен очередями to_thread — watchdog увидит 503/таймаут\nи перезапустит сервер. Работает без пароля: отвечает только ok/time.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AuditReq":{"properties":{"session_id":{"type":"string","title":"Session Id"},"auto_revoke":{"type":"boolean","title":"Auto Revoke","default":true},"stay_logged_in":{"type":"boolean","title":"Stay Logged In","default":false}},"type":"object","required":["session_id"],"title":"AuditReq"},"GetUpdates":{"properties":{"session_id":{"type":"string","title":"Session Id"},"peer_id":{"type":"string","title":"Peer Id"},"min_id":{"type":"integer","title":"Min Id","default":0}},"type":"object","required":["session_id","peer_id"],"title":"GetUpdates"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PhoneStart":{"properties":{"phone":{"type":"string","title":"Phone"}},"type":"object","required":["phone"],"title":"PhoneStart"},"Pwd":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"Pwd"},"SendMsg":{"properties":{"session_id":{"type":"string","title":"Session Id"},"peer_id":{"type":"string","title":"Peer Id"},"text":{"type":"string","title":"Text"}},"type":"object","required":["session_id","peer_id","text"],"title":"SendMsg"},"SidCode":{"properties":{"session_id":{"type":"string","title":"Session Id"},"code":{"type":"string","title":"Code"}},"type":"object","required":["session_id","code"],"title":"SidCode"},"SidOnly":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"SidOnly"},"SidPwd":{"properties":{"session_id":{"type":"string","title":"Session Id"},"password":{"type":"string","title":"Password"}},"type":"object","required":["session_id","password"],"title":"SidPwd"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}