{"openapi":"3.1.0","info":{"title":"RAG Chatbot API","description":"API for the production RAG chatbot backend.","version":"1.0.0"},"paths":{"/api/v1/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Health check","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/auth/token":{"post":{"tags":["Authentication"],"summary":"Login For Access Token","description":"Authenticates a user and returns a JWT token.\nCorresponds to /api/auth/login from PRD.","operationId":"login_for_access_token_api_v1_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_for_access_token_api_v1_auth_token_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/register":{"post":{"tags":["Authentication"],"summary":"Register User","description":"Creates a new user.\nCorresponds to /api/auth/register from PRD.","operationId":"register_user_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh-token":{"post":{"tags":["Authentication"],"summary":"Refresh Token","description":"Provides a new access token from a valid refresh token.","operationId":"refresh_token_api_v1_auth_refresh_token_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"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/logout":{"post":{"tags":["Authentication"],"summary":"Logout","description":"Invalidates the current user's token.","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/auth/users/me":{"get":{"tags":["Authentication - Users"],"summary":"Read Users Me","description":"Gets the profile of the currently authenticated user.","operationId":"read_users_me_api_v1_auth_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["Authentication - Users"],"summary":"Update Users Me","description":"Updates the profile of the currently authenticated user.","operationId":"update_users_me_api_v1_auth_users_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/auth/forgot-password":{"post":{"tags":["Authentication"],"summary":"Forgot Password","description":"Initiates the password reset process.","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["Authentication"],"summary":"Reset Password","description":"Resets the user's password using a valid token.","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats":{"get":{"tags":["AskAI - Chats"],"summary":"Get Chats","description":"Get all chats, sorted by last updated","operationId":"get_chats_api_v1_askai_chats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChatMetadata"},"type":"array","title":"Response Get Chats Api V1 Askai Chats Get"}}}}}},"post":{"tags":["AskAI - Chats"],"summary":"Create Chat","description":"Create a new chat session and start importing documents from Google Drive","operationId":"create_chat_api_v1_askai_chats_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreateNewChatRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMetadata"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats/{chat_id}":{"get":{"tags":["AskAI - Chats"],"summary":"Get Chat","description":"Get all messages for a specific chat","operationId":"get_chat_api_v1_askai_chats__chat_id__get","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"title":"Response Get Chat Api V1 Askai Chats Chat Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["AskAI - Chats"],"summary":"Delete Chat","description":"Delete a chat session and its associated data","operationId":"delete_chat_api_v1_askai_chats__chat_id__delete","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats/{chat_id}/rename":{"put":{"tags":["AskAI - Chats"],"summary":"Rename Chat","description":"Rename a chat session","operationId":"rename_chat_api_v1_askai_chats__chat_id__rename_put","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats/{chat_id}/messages":{"post":{"tags":["AskAI - Chats"],"summary":"Send Message","description":"Send a message to a chat and get a RAG-based response","operationId":"send_message_api_v1_askai_chats__chat_id__messages_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats/{chat_id}/upload-pdf":{"post":{"tags":["AskAI - Documents"],"summary":"Upload Pdf","description":"Upload a PDF for RAG processing. This is an asynchronous operation.","operationId":"upload_pdf_api_v1_askai_chats__chat_id__upload_pdf_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_pdf_api_v1_askai_chats__chat_id__upload_pdf_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats/{chat_id}/add-drive":{"post":{"tags":["AskAI - Documents"],"summary":"Add Drive Folder","description":"Scans a public Google Drive folder and adds its file structure to the chat\nwithout downloading the files.","operationId":"add_drive_folder_api_v1_askai_chats__chat_id__add_drive_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDriveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFolder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/upload-status/{job_id}":{"get":{"tags":["AskAI - Documents"],"summary":"Get Upload Status","description":"Get the status of an asynchronous upload job","operationId":"get_upload_status_api_v1_askai_upload_status__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the upload job","title":"Job Id"},"description":"The ID of the upload job"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats/{chat_id}/docs":{"get":{"tags":["AskAI - Documents"],"summary":"Get Chat Docs","description":"Get all active and processing documents for a specific chat","operationId":"get_chat_docs_api_v1_askai_chats__chat_id__docs_get","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDocumentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats/{chat_id}/docs-sse":{"get":{"tags":["AskAI - Documents"],"summary":"Stream Chat Docs","description":"Streams document status for a chat using Server-Sent Events (SSE).\nSends an update whenever the status of a document processing job changes.","operationId":"stream_chat_docs_api_v1_askai_chats__chat_id__docs_sse_get","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/askai/chats/{chat_id}/pdfs/{pdf_name}":{"delete":{"tags":["AskAI - Documents"],"summary":"Delete Chat Pdf","description":"Delete a specific PDF from a chat","operationId":"delete_chat_pdf_api_v1_askai_chats__chat_id__pdfs__pdf_name__delete","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}},{"name":"pdf_name","in":"path","required":true,"schema":{"type":"string","title":"Pdf Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenderiq/dailytenders":{"get":{"tags":["TenderIQ"],"summary":"Get the latest daily tenders from the scraper","description":"Retrieves the most recent batch of tenders added by the scraper.\nThis represents the latest daily scrape run.","operationId":"get_daily_tenders_api_v1_tenderiq_dailytenders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyTendersResponse"}}}}}}},"/api/v1/dms/summary":{"get":{"tags":["DMS","DMS - Summary"],"summary":"Get Dms Summary","description":"Get DMS summary statistics including total documents, storage used, etc.","operationId":"get_dms_summary_api_v1_dms_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSummary"}}}}}}},"/api/v1/dms/categories":{"get":{"tags":["DMS","DMS - Categories"],"summary":"List Categories","description":"List all available document categories.","operationId":"list_categories_api_v1_dms_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DocumentCategory"},"type":"array","title":"Response List Categories Api V1 Dms Categories Get"}}}}}}},"/api/v1/dms/folders":{"get":{"tags":["DMS","DMS - Folders"],"summary":"List Folders","description":"List accessible folders with optional filtering.\nReturns hierarchical folder structure with subfolders.","operationId":"list_folders_api_v1_dms_folders_get","parameters":[{"name":"parent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by parent folder (null for root)","title":"Parent Id"},"description":"Filter by parent folder (null for root)"},{"name":"department","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by department","title":"Department"},"description":"Filter by department"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search folder name","title":"Search"},"description":"Search folder name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Folder"},"title":"Response List Folders Api V1 Dms Folders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["DMS","DMS - Folders"],"summary":"Create Folder","description":"Create a new folder.\nRequires write permission on parent folder if specified.","operationId":"create_folder_api_v1_dms_folders_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/folders/{folder_id}":{"get":{"tags":["DMS","DMS - Folders"],"summary":"Get Folder","description":"Get folder details including document count and subfolders.","operationId":"get_folder_api_v1_dms_folders__folder_id__get","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["DMS","DMS - Folders"],"summary":"Update Folder","description":"Update folder metadata (name, description, confidentiality level).\nRequires admin permission on folder.","operationId":"update_folder_api_v1_dms_folders__folder_id__patch","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["DMS","DMS - Folders"],"summary":"Delete Folder","description":"Soft delete folder (must be empty).\nRequires admin permission on folder.","operationId":"delete_folder_api_v1_dms_folders__folder_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/folders/{folder_id}/move":{"post":{"tags":["DMS","DMS - Folders"],"summary":"Move Folder","description":"Move folder to new parent and update materialized paths.\nRequires admin permission on both source and destination.","operationId":"move_folder_api_v1_dms_folders__folder_id__move_post","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderMove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/folders/{folder_id}/permissions":{"get":{"tags":["DMS","DMS - Folders"],"summary":"List Folder Permissions","description":"Get all permissions for a folder.\nRequires admin permission on folder.","operationId":"list_folder_permissions_api_v1_dms_folders__folder_id__permissions_get","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FolderPermission"},"title":"Response List Folder Permissions Api V1 Dms Folders Folder Id Permissions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["DMS","DMS - Folders"],"summary":"Grant Folder Permission","description":"Grant permission to user or department on folder.\nDepartment admins can only grant permissions on their department's folders.","operationId":"grant_folder_permission_api_v1_dms_folders__folder_id__permissions_post","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderPermissionGrant"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderPermission"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/folders/{folder_id}/permissions/{permission_id}":{"delete":{"tags":["DMS","DMS - Folders"],"summary":"Revoke Folder Permission","description":"Revoke folder permission.\nRequires admin permission on folder.","operationId":"revoke_folder_permission_api_v1_dms_folders__folder_id__permissions__permission_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}},{"name":"permission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Permission Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/file-upload":{"post":{"tags":["DMS","DMS - Documents"],"summary":"Upload File","description":"Directly upload a file to the DMS.\nThis endpoint is for Phase 1 (local storage) and bypasses the presigned URL flow.","operationId":"upload_file_api_v1_dms_file_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_v1_dms_file_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/upload-url":{"post":{"tags":["DMS","DMS - Documents"],"summary":"Generate Upload Url","description":"Generate presigned upload URL for direct file upload from frontend.\nCreates document record in 'pending' status.\nReturns upload URL, document ID, and expiration time.","operationId":"generate_upload_url_api_v1_dms_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadURLRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadURLResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/documents/{document_id}/confirm-upload":{"post":{"tags":["DMS","DMS - Documents"],"summary":"Confirm Upload","description":"Confirm S3/local upload completion.\nChanges document status from 'pending' to 'active'.\nTriggers document processing if needed.","operationId":"confirm_upload_api_v1_dms_documents__document_id__confirm_upload_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/documents":{"get":{"tags":["DMS","DMS - Documents"],"summary":"List Documents","description":"List accessible documents with filtering and pagination.\nReturns documents filtered by user permissions and folder access.","operationId":"list_documents_api_v1_dms_documents_get","parameters":[{"name":"folder_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by folder","title":"Folder Id"},"description":"Filter by folder"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by category","title":"Category Id"},"description":"Filter by category"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full-text search on name and content","title":"Search"},"description":"Full-text search on name and content"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by tags (all must match)","title":"Tags"},"description":"Filter by tags (all must match)"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"enum":["active","archived","pending","processing"],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max results per page","default":50,"title":"Limit"},"description":"Max results per page"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/documents/{document_id}":{"get":{"tags":["DMS","DMS - Documents"],"summary":"Get Document","description":"Get document details including metadata, versions, and permissions.","operationId":"get_document_api_v1_dms_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["DMS","DMS - Documents"],"summary":"Update Document","description":"Update document metadata (name, tags, folder, status).\nRequires write permission on document.","operationId":"update_document_api_v1_dms_documents__document_id__patch","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["DMS","DMS - Documents"],"summary":"Delete Document","description":"Soft delete document (can be recovered).\nRequires write permission on document.","operationId":"delete_document_api_v1_dms_documents__document_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/documents/{document_id}/download":{"get":{"tags":["DMS","DMS - Documents"],"summary":"Download File","description":"Directly download a file from the DMS.","operationId":"download_file_api_v1_dms_documents__document_id__download_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/documents/{document_id}/download-url":{"get":{"tags":["DMS","DMS - Documents"],"summary":"Get Download Url","description":"Generate presigned S3/local download URL.\nIncludes permission check and audit logging.","operationId":"get_download_url_api_v1_dms_documents__document_id__download_url_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"version_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Specific version to download (defaults to latest)","title":"Version Number"},"description":"Specific version to download (defaults to latest)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadURLResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/documents/{document_id}/versions":{"get":{"tags":["DMS","DMS - Documents"],"summary":"Get Document Versions","description":"Get document version history.\nReturns all versions with metadata (size, uploaded by, timestamp, etc.).","operationId":"get_document_versions_api_v1_dms_documents__document_id__versions_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/documents/{document_id}/permissions":{"get":{"tags":["DMS","DMS - Documents"],"summary":"List Document Permissions","description":"Get explicit document-level permissions.\nRequires admin permission on document.","operationId":"list_document_permissions_api_v1_dms_documents__document_id__permissions_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentPermission"},"title":"Response List Document Permissions Api V1 Dms Documents Document Id Permissions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["DMS","DMS - Documents"],"summary":"Grant Document Permission","description":"Grant explicit permission to user on document.\nRequires admin permission on document.","operationId":"grant_document_permission_api_v1_dms_documents__document_id__permissions_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPermissionGrant"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPermission"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dms/documents/{document_id}/permissions/{permission_id}":{"delete":{"tags":["DMS","DMS - Documents"],"summary":"Revoke Document Permission","description":"Revoke explicit document permission.\nRequires admin permission on document.","operationId":"revoke_document_permission_api_v1_dms_documents__document_id__permissions__permission_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"permission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Permission Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddDriveRequest":{"properties":{"driveUrl":{"type":"string","title":"Driveurl"}},"type":"object","required":["driveUrl"],"title":"AddDriveRequest"},"Body_login_for_access_token_api_v1_auth_token_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_for_access_token_api_v1_auth_token_post"},"Body_upload_file_api_v1_dms_file_upload_post":{"properties":{"folder_id":{"type":"string","format":"uuid","title":"Folder Id"},"file":{"type":"string","format":"binary","title":"File"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"confidentiality_level":{"type":"string","title":"Confidentiality Level","default":"internal"}},"type":"object","required":["folder_id","file"],"title":"Body_upload_file_api_v1_dms_file_upload_post"},"Body_upload_pdf_api_v1_askai_chats__chat_id__upload_pdf_post":{"properties":{"pdf":{"type":"string","format":"binary","title":"Pdf","description":"The PDF file to upload"}},"type":"object","required":["pdf"],"title":"Body_upload_pdf_api_v1_askai_chats__chat_id__upload_pdf_post"},"ChatDocumentsResponse":{"properties":{"pdfs":{"items":{"$ref":"#/components/schemas/DocumentMetadata"},"type":"array","title":"Pdfs"},"xlsx":{"items":{"$ref":"#/components/schemas/DocumentMetadata"},"type":"array","title":"Xlsx"},"processing":{"items":{"$ref":"#/components/schemas/ProcessingJob"},"type":"array","title":"Processing"},"drive_folders":{"items":{"$ref":"#/components/schemas/DriveFolder"},"type":"array","title":"Drive Folders"},"total_docs":{"type":"integer","title":"Total Docs"},"chat_id":{"type":"string","title":"Chat Id"}},"type":"object","required":["pdfs","xlsx","processing","drive_folders","total_docs","chat_id"],"title":"ChatDocumentsResponse"},"ChatMetadata":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"message_count":{"type":"integer","title":"Message Count"},"pdf_count":{"type":"integer","title":"Pdf Count"},"pdf_list":{"items":{"$ref":"#/components/schemas/DocumentMetadata"},"type":"array","title":"Pdf List","default":[]}},"type":"object","required":["id","title","created_at","updated_at","message_count","pdf_count"],"title":"ChatMetadata","description":"Model for the list of chats API response."},"ConfidentialityLevel":{"type":"string","enum":["public","internal","confidential","restricted"],"title":"ConfidentialityLevel"},"ConfirmUploadRequest":{"properties":{"s3_etag":{"type":"string","title":"S3 Etag"},"s3_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Version Id"}},"type":"object","required":["s3_etag"],"title":"ConfirmUploadRequest"},"CreateNewChatRequest":{"properties":{"driveUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Driveurl"}},"type":"object","required":["driveUrl"],"title":"CreateNewChatRequest"},"DailyTendersResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_at":{"type":"string","format":"date-time","title":"Run At"},"date_str":{"type":"string","title":"Date Str"},"name":{"type":"string","title":"Name"},"contact":{"type":"string","title":"Contact"},"no_of_new_tenders":{"type":"string","title":"No Of New Tenders"},"company":{"type":"string","title":"Company"},"queries":{"items":{"$ref":"#/components/schemas/ScrapedTenderQuery-Output"},"type":"array","title":"Queries"}},"type":"object","required":["id","run_at","date_str","name","contact","no_of_new_tenders","company","queries"],"title":"DailyTendersResponse"},"Document":{"properties":{"name":{"type":"string","title":"Name"},"original_filename":{"type":"string","title":"Original Filename"},"mime_type":{"type":"string","title":"Mime Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"confidentiality_level":{"$ref":"#/components/schemas/ConfidentialityLevel","default":"internal"},"doc_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Doc Metadata"},"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/DocumentStatus","default":"pending"},"version":{"type":"integer","title":"Version","default":1},"uploaded_by":{"type":"string","format":"uuid","title":"Uploaded By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"storage_provider":{"type":"string","title":"Storage Provider","default":"local"},"storage_path":{"type":"string","title":"Storage Path"},"folder_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Path"},"category_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Category Ids","default":[]},"s3_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Bucket"},"s3_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Etag"},"s3_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Version Id"}},"type":"object","required":["name","original_filename","mime_type","id","uploaded_by","created_at","updated_at","storage_path"],"title":"Document"},"DocumentCategory":{"properties":{"name":{"type":"string","title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["name","id"],"title":"DocumentCategory"},"DocumentListResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/Document"},"type":"array","title":"Documents"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["documents","total","limit","offset"],"title":"DocumentListResponse"},"DocumentMetadata":{"properties":{"name":{"type":"string","title":"Name"},"chunks":{"type":"integer","title":"Chunks"},"status":{"type":"string","title":"Status"}},"type":"object","required":["name","chunks","status"],"title":"DocumentMetadata"},"DocumentPermission":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"permission_level":{"$ref":"#/components/schemas/PermissionLevel"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"id":{"type":"string","format":"uuid","title":"Id"},"granted_by":{"type":"string","format":"uuid","title":"Granted By"},"granted_at":{"type":"string","format":"date-time","title":"Granted At"}},"type":"object","required":["user_id","permission_level","id","granted_by","granted_at"],"title":"DocumentPermission"},"DocumentPermissionGrant":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"permission_level":{"$ref":"#/components/schemas/PermissionLevel"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"}},"type":"object","required":["user_id","permission_level"],"title":"DocumentPermissionGrant"},"DocumentStatus":{"type":"string","enum":["pending","processing","active","archived"],"title":"DocumentStatus"},"DocumentSummary":{"properties":{"total_documents":{"type":"integer","title":"Total Documents"},"recent_uploads":{"type":"integer","title":"Recent Uploads"},"storage_used":{"type":"string","title":"Storage Used"},"shared_documents":{"type":"integer","title":"Shared Documents"}},"type":"object","required":["total_documents","recent_uploads","storage_used","shared_documents"],"title":"DocumentSummary"},"DocumentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"status":{"anyOf":[{"$ref":"#/components/schemas/DocumentStatus"},{"type":"null"}]},"confidentiality_level":{"anyOf":[{"$ref":"#/components/schemas/ConfidentialityLevel"},{"type":"null"}]}},"type":"object","title":"DocumentUpdate"},"DownloadURLResponse":{"properties":{"download_url":{"type":"string","title":"Download Url"},"filename":{"type":"string","title":"Filename"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["download_url","filename","expires_in"],"title":"DownloadURLResponse"},"DriveFile":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"mimeType":{"type":"string","title":"Mimetype"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size"}},"type":"object","required":["id","name","mimeType"],"title":"DriveFile"},"DriveFolder":{"properties":{"id":{"type":"string","title":"Id"},"files":{"items":{"$ref":"#/components/schemas/DriveFile"},"type":"array","title":"Files"},"subfolders":{"items":{"$ref":"#/components/schemas/DriveFolder"},"type":"array","title":"Subfolders"}},"type":"object","required":["id","files","subfolders"],"title":"DriveFolder"},"Folder":{"properties":{"name":{"type":"string","title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"confidentiality_level":{"$ref":"#/components/schemas/ConfidentialityLevel","default":"internal"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"type":"string","format":"uuid","title":"Id"},"path":{"type":"string","title":"Path"},"document_count":{"type":"integer","title":"Document Count","default":0},"is_system_folder":{"type":"boolean","title":"Is System Folder","default":false},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"subfolders":{"items":{"$ref":"#/components/schemas/Folder"},"type":"array","title":"Subfolders","default":[]}},"type":"object","required":["name","id","path","created_by","created_at","updated_at"],"title":"Folder"},"FolderCreate":{"properties":{"name":{"type":"string","title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"confidentiality_level":{"$ref":"#/components/schemas/ConfidentialityLevel","default":"internal"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"FolderCreate"},"FolderMove":{"properties":{"new_parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"New Parent Id"}},"type":"object","title":"FolderMove"},"FolderPermission":{"properties":{"permission_level":{"$ref":"#/components/schemas/PermissionLevel"},"inherit_to_subfolders":{"type":"boolean","title":"Inherit To Subfolders","default":true},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"id":{"type":"string","format":"uuid","title":"Id"},"folder_id":{"type":"string","format":"uuid","title":"Folder Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"granted_by":{"type":"string","format":"uuid","title":"Granted By"},"granted_at":{"type":"string","format":"date-time","title":"Granted At"}},"type":"object","required":["permission_level","id","folder_id","granted_by","granted_at"],"title":"FolderPermission"},"FolderPermissionGrant":{"properties":{"permission_level":{"$ref":"#/components/schemas/PermissionLevel"},"inherit_to_subfolders":{"type":"boolean","title":"Inherit To Subfolders","default":true},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"}},"type":"object","required":["permission_level"],"title":"FolderPermissionGrant"},"FolderUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"confidentiality_level":{"anyOf":[{"$ref":"#/components/schemas/ConfidentialityLevel"},{"type":"null"}]}},"type":"object","title":"FolderUpdate"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"timestamp":{"type":"string","title":"Timestamp"},"llamaparse":{"type":"string","title":"Llamaparse"}},"type":"object","required":["status","timestamp","llamaparse"],"title":"HealthResponse"},"Message":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"text":{"type":"string","title":"Text"},"sender":{"type":"string","title":"Sender"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["id","text","sender","timestamp"],"title":"Message"},"NewMessageRequest":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"NewMessageRequest"},"NewMessageResponse":{"properties":{"reply":{"type":"string","title":"Reply"},"sources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array","title":"Sources"},"message_count":{"type":"integer","title":"Message Count"}},"type":"object","required":["reply","sources","message_count"],"title":"NewMessageResponse"},"PermissionLevel":{"type":"string","enum":["read","write","admin"],"title":"PermissionLevel"},"ProcessingJob":{"properties":{"name":{"type":"string","title":"Name"},"job_id":{"type":"string","title":"Job Id"},"status":{"$ref":"#/components/schemas/ProcessingStatus"},"stage":{"$ref":"#/components/schemas/ProcessingStage"},"progress":{"type":"number","title":"Progress"}},"type":"object","required":["name","job_id","status","stage","progress"],"title":"ProcessingJob"},"ProcessingStage":{"type":"string","enum":["not_processing","llama_loading","pymupdf_loading","tesseract_loading","extracting_content","extracting_tables","creating_chunks","adding_to_vector_store","saving_metadata"],"title":"ProcessingStage"},"ProcessingStatus":{"type":"string","enum":["queued","downloading","processing","finished","failed"],"title":"ProcessingStatus"},"RenameChatRequest":{"properties":{"title":{"type":"string","title":"Title"}},"type":"object","required":["title"],"title":"RenameChatRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"ScrapedTender":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tender_id_str":{"type":"string","title":"Tender Id Str"},"tender_name":{"type":"string","title":"Tender Name"},"tender_url":{"type":"string","title":"Tender Url"},"drive_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Drive Url"},"city":{"type":"string","title":"City"},"summary":{"type":"string","title":"Summary"},"value":{"type":"string","title":"Value"},"due_date":{"type":"string","title":"Due Date"},"tdr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tdr"},"tendering_authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tendering Authority"},"tender_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tender No"},"tender_id_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tender Id Detail"},"tender_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tender Brief"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"document_fees":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Fees"},"emd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emd"},"tender_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tender Value"},"tender_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tender Type"},"bidding_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bidding Type"},"competition_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competition Type"},"tender_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tender Details"},"publish_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publish Date"},"last_date_of_bid_submission":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Date Of Bid Submission"},"tender_opening_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tender Opening Date"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"contact_person":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Person"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"information_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Information Source"},"files":{"items":{"$ref":"#/components/schemas/ScrapedTenderFile"},"type":"array","title":"Files"}},"type":"object","required":["id","tender_id_str","tender_name","tender_url","city","summary","value","due_date","files"],"title":"ScrapedTender"},"ScrapedTenderFile":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"file_name":{"type":"string","title":"File Name"},"file_url":{"type":"string","title":"File Url"},"file_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Description"},"file_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Size"}},"type":"object","required":["id","file_name","file_url"],"title":"ScrapedTenderFile"},"ScrapedTenderQuery-Input":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"query_name":{"type":"string","title":"Query Name"},"number_of_tenders":{"type":"string","title":"Number Of Tenders"},"tenders":{"items":{"$ref":"#/components/schemas/ScrapedTender"},"type":"array","title":"Tenders"}},"type":"object","required":["id","query_name","number_of_tenders","tenders"],"title":"ScrapedTenderQuery"},"ScrapedTenderQuery-Output":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"query_name":{"type":"string","title":"Query Name"},"number_of_tenders":{"type":"string","title":"Number Of Tenders"},"tenders":{"items":{"$ref":"#/components/schemas/ScrapedTender"},"type":"array","title":"Tenders"}},"type":"object","required":["id","query_name","number_of_tenders","tenders"],"title":"ScrapedTenderQuery"},"Source":{"properties":{"id":{"type":"integer","title":"Id"},"source":{"type":"string","title":"Source"},"location":{"type":"string","title":"Location"},"doc_type":{"type":"string","title":"Doc Type"},"content_type":{"type":"string","title":"Content Type"},"content":{"type":"string","title":"Content"},"full_content":{"type":"string","title":"Full Content"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"}},"type":"object","required":["id","source","location","doc_type","content_type","content","full_content"],"title":"Source"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","required":["access_token"],"title":"Token","description":"Pydantic model for the JWT token response."},"UploadAcceptedResponse":{"properties":{"message":{"type":"string","title":"Message"},"job_id":{"type":"string","title":"Job Id"},"processing":{"type":"boolean","title":"Processing"}},"type":"object","required":["message","job_id","processing"],"title":"UploadAcceptedResponse"},"UploadURLRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"file_size":{"type":"integer","title":"File Size"},"mime_type":{"type":"string","title":"Mime Type"},"folder_id":{"type":"string","format":"uuid","title":"Folder Id"},"category_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Category Id"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"confidentiality_level":{"$ref":"#/components/schemas/ConfidentialityLevel","default":"internal"}},"type":"object","required":["filename","file_size","mime_type","folder_id"],"title":"UploadURLRequest"},"UploadURLResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"storage_path":{"type":"string","title":"Storage Path"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["upload_url","document_id","storage_path","expires_in"],"title":"UploadURLResponse"},"User":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"employee_id":{"type":"string","title":"Employee Id"},"mobile_number":{"type":"string","title":"Mobile Number"},"designation":{"type":"string","title":"Designation"},"department":{"type":"string","title":"Department"},"id":{"type":"string","format":"uuid","title":"Id"},"role":{"type":"string","title":"Role"},"account_status":{"type":"string","title":"Account Status"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["email","full_name","employee_id","mobile_number","designation","department","id","role","account_status","is_active"],"title":"User","description":"Pydantic model for returning a user (response)."},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"employee_id":{"type":"string","title":"Employee Id"},"mobile_number":{"type":"string","title":"Mobile Number"},"designation":{"type":"string","title":"Designation"},"department":{"type":"string","title":"Department"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","full_name","employee_id","mobile_number","designation","department","password"],"title":"UserCreate","description":"Pydantic model for creating a new user."},"UserProfileUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"mobile_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile Number"},"designation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Designation"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"}},"type":"object","title":"UserProfileUpdate","description":"Pydantic model for updating a user's profile."},"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"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/auth/token"}}}}}}