{"openapi":"3.1.0","info":{"title":"HVAC SimplyFi Python Backend","description":"Refactored Python FastAPI backend for HVAC document processing & AI analysis","version":"1.0.0"},"paths":{"/api/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","operationId":"signup_api_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/signup/verify":{"post":{"tags":["auth"],"summary":"Signup Verify","operationId":"signup_verify_api_auth_signup_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupVerifyBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/signup/resend":{"post":{"tags":["auth"],"summary":"Signup Resend","operationId":"signup_resend_api_auth_signup_resend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/mfa/verify":{"post":{"tags":["auth"],"summary":"Mfa Verify","operationId":"mfa_verify_api_auth_mfa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaVerifyBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/mfa/resend":{"post":{"tags":["auth"],"summary":"Mfa Resend","operationId":"mfa_resend_api_auth_mfa_resend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaResendBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/process-document":{"post":{"summary":"Process Document","description":"Two modes:\n- multipart upload (`file`): always creates a NEW document with a fresh unique doc_id,\n  owned by the caller. The filename is stored as display metadata only.\n- JSON body `{\"doc_id\": ...}`: re-process a previously stored document the caller may see.","operationId":"process_document_api_process_document_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_process_document_api_process_document_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents":{"get":{"summary":"Get Documents","description":"List the caller's documents. Admins see the whole workspace.","operationId":"get_documents_api_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/delete-document":{"delete":{"summary":"Delete Document","operationId":"delete_document_api_delete_document_delete","parameters":[{"name":"doc_id","in":"query","required":false,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/extracted-data":{"get":{"summary":"Get Extracted Data","operationId":"get_extracted_data_api_extracted_data_get","parameters":[{"name":"doc_id","in":"query","required":false,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/raw-document":{"get":{"summary":"Get Raw Document","operationId":"get_raw_document_api_raw_document_get","parameters":[{"name":"doc_id","in":"query","required":false,"schema":{"type":"string","title":"Doc Id"}},{"name":"json","in":"query","required":false,"schema":{"type":"string","title":"Json"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat":{"post":{"summary":"Chat Endpoint","operationId":"chat_endpoint_api_chat_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/dashboard":{"get":{"summary":"Get Dashboard Widgets","operationId":"get_dashboard_widgets_api_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Save Dashboard Widget","operationId":"save_dashboard_widget_api_dashboard_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"summary":"Delete Dashboard Widget","operationId":"delete_dashboard_widget_api_dashboard_delete","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"tags":["admin"],"summary":"List Users","operationId":"list_users_api_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/users/{user_id}":{"patch":{"tags":["admin"],"summary":"Set User Role","operationId":"set_user_role_api_admin_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/audit":{"get":{"tags":["admin"],"summary":"List Audit","operationId":"list_audit_api_admin_audit_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"event","in":"query","required":false,"schema":{"type":"string","maxLength":64,"title":"Event"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_process_document_api_process_document_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","title":"Body_process_document_api_process_document_post"},"EmailBody":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email","default":""}},"type":"object","title":"EmailBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LoginBody":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email","default":""},"password":{"type":"string","maxLength":128,"title":"Password","default":""}},"type":"object","title":"LoginBody"},"MfaResendBody":{"properties":{"challengeId":{"type":"string","maxLength":64,"title":"Challengeid","default":""}},"type":"object","title":"MfaResendBody"},"MfaVerifyBody":{"properties":{"challengeId":{"type":"string","maxLength":64,"title":"Challengeid","default":""},"otp":{"type":"string","pattern":"^[0-9]{1,12}$","title":"Otp","default":""}},"type":"object","title":"MfaVerifyBody"},"RoleBody":{"properties":{"role":{"type":"string","maxLength":32,"title":"Role","default":""}},"type":"object","title":"RoleBody"},"SignupBody":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name","default":""},"email":{"type":"string","maxLength":254,"title":"Email","default":""},"password":{"type":"string","maxLength":128,"title":"Password","default":""}},"type":"object","title":"SignupBody"},"SignupVerifyBody":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email","default":""},"otp":{"type":"string","pattern":"^[0-9]{1,12}$","title":"Otp","default":""}},"type":"object","title":"SignupVerifyBody"},"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"}}}}