{"openapi":"3.1.0","info":{"title":"Pied API","description":"Task & Operations Management Platform for Family Offices","version":"0.1.0"},"paths":{"/api/v1/config":{"get":{"tags":["public"],"summary":"Get Public Config","operationId":"get_public_config_api_v1_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh Token","operationId":"refresh_token_api_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke the caller's current access token (and refresh token, if sent).\n\nIntentionally not gated on `get_current_user` — even an expired/invalid\naccess token must return 200 so the client can still complete its local\ncleanup. We simply decode what we can and revoke whichever jti claims we\nfind; invalid tokens are silently ignored.","operationId":"logout_api_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/password":{"put":{"tags":["auth"],"summary":"Change Own Password","operationId":"change_own_password_api_v1_auth_password_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","operationId":"get_me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/assignees":{"get":{"tags":["users"],"summary":"List Assignees","operationId":"list_assignees_api_v1_users_assignees_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserAssigneeResponse"},"type":"array","title":"Response List Assignees Api V1 Users Assignees Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/summary":{"get":{"tags":["users"],"summary":"List Users Summary","operationId":"list_users_summary_api_v1_users_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserSummaryResponse"},"type":"array","title":"Response List Users Summary Api V1 Users Summary Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/":{"get":{"tags":["users"],"summary":"List Users","operationId":"list_users_api_v1_users__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max 100 items per page","default":20,"title":"Page Size"},"description":"Max 100 items per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Create User","operationId":"create_user_api_v1_users__post","security":[{"HTTPBearer":[]}],"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}/password":{"put":{"tags":["users"],"summary":"Admin Reset User Password","operationId":"admin_reset_user_password_api_v1_users__user_id__password_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPasswordResetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPasswordResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/description":{"patch":{"tags":["users"],"summary":"Update My Description","description":"Any authenticated user can update their own role description.","operationId":"update_my_description_api_v1_users_me_description_patch","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User Brief","operationId":"get_user_brief_api_v1_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBriefResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["users"],"summary":"Update User","operationId":"update_user_api_v1_users__user_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","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":"Deactivate User","operationId":"deactivate_user_api_v1_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/permanent":{"delete":{"tags":["users"],"summary":"Hard Delete User","operationId":"hard_delete_user_api_v1_users__user_id__permanent_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/roles/":{"get":{"tags":["roles"],"summary":"Get Roles","operationId":"get_roles_api_v1_roles__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RoleResponse"},"type":"array","title":"Response Get Roles Api V1 Roles  Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["roles"],"summary":"Create New Role","operationId":"create_new_role_api_v1_roles__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/roles/{role_id}":{"put":{"tags":["roles"],"summary":"Update Existing Role","operationId":"update_existing_role_api_v1_roles__role_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["roles"],"summary":"Delete Existing Role","operationId":"delete_existing_role_api_v1_roles__role_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clients/":{"get":{"tags":["clients"],"summary":"List Clients","operationId":"list_clients_api_v1_clients__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClientResponse"},"title":"Response List Clients Api V1 Clients  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["clients"],"summary":"Create Client","operationId":"create_client_api_v1_clients__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clients/tasks-summary":{"get":{"tags":["clients"],"summary":"List Client Task Summary","description":"Per-client task counts (total, open, overdue, completed).\n\nScoped to the caller's own tasks when they lack VIEW_ALL_TASKS — mirrors\nthe filter the tasks list endpoint applies, so counts and drill-down\nstay consistent.","operationId":"list_client_task_summary_api_v1_clients_tasks_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClientTaskSummary"},"type":"array","title":"Response List Client Task Summary Api V1 Clients Tasks Summary Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/clients/{client_id}":{"get":{"tags":["clients"],"summary":"Get Client","operationId":"get_client_api_v1_clients__client_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["clients"],"summary":"Update Client","operationId":"update_client_api_v1_clients__client_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/task-statuses/":{"get":{"tags":["task-statuses"],"summary":"Get Task Statuses","operationId":"get_task_statuses_api_v1_task_statuses__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatusConfigResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/task-statuses/reset-defaults":{"post":{"tags":["task-statuses"],"summary":"Reset Task Statuses","description":"Replace stored status config with the current defaults.","operationId":"reset_task_statuses_api_v1_task_statuses_reset_defaults_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatusConfigResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/tasks/{task_id}/comments":{"get":{"tags":["task-comments"],"summary":"List Task Comments","operationId":"list_task_comments_api_v1_tasks__task_id__comments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}},{"name":"anchor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_CommentResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["task-comments"],"summary":"Create Task Comment","operationId":"create_task_comment_api_v1_tasks__task_id__comments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/comments/{comment_id}":{"patch":{"tags":["task-comments"],"summary":"Update Task Comment","operationId":"update_task_comment_api_v1_tasks__task_id__comments__comment_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/":{"get":{"tags":["tasks"],"summary":"List Tasks","operationId":"list_tasks_api_v1_tasks__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"area","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"}},{"name":"theme_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Id"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},{"name":"is_recurring","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Recurring"}},{"name":"parent_task_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Task Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"my_tasks","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"My Tasks"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_TaskResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tasks"],"summary":"Create Task","operationId":"create_task_api_v1_tasks__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/bulk-status":{"post":{"tags":["tasks"],"summary":"Bulk Update Status","operationId":"bulk_update_status_api_v1_tasks_bulk_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkStatusUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/tasks/{task_id}":{"get":{"tags":["tasks"],"summary":"Get Task","operationId":"get_task_api_v1_tasks__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["tasks"],"summary":"Update Task","operationId":"update_task_api_v1_tasks__task_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tasks"],"summary":"Delete Task","operationId":"delete_task_api_v1_tasks__task_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/ai-classification":{"patch":{"tags":["tasks"],"summary":"Update Ai Classification Feedback","description":"Accept or reject the AI classification suggestion on a task.\n- Accepting applies the AI's area/priority/tags to the task fields.\n- Rejecting marks the suggestion as dismissed without changing task fields.\nBoth actions are logged in the ai_feedback collection (7.6).","operationId":"update_ai_classification_feedback_api_v1_tasks__task_id__ai_classification_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIFeedbackAction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/ai-assignment":{"patch":{"tags":["tasks"],"summary":"Update Ai Assignment Feedback","description":"Accept or reject the AI assignment suggestion on a task.\nAccepting adds the suggested user to task.assigned_to.\nBoth actions are logged in the ai_feedback collection (7.6).","operationId":"update_ai_assignment_feedback_api_v1_tasks__task_id__ai_assignment_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIFeedbackAction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/classify":{"post":{"tags":["tasks"],"summary":"Request Classification","description":"Trigger AI classification for an existing task on demand.\nReplaces any previous ai_classification document on the task.\nReturns the updated task.","operationId":"request_classification_api_v1_tasks__task_id__classify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/trail":{"get":{"tags":["tasks"],"summary":"Get Task Trail","description":"Return the unified audit trail (events, comments, evidence) for a task.","operationId":"get_task_trail_api_v1_tasks__task_id__trail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTrailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/":{"get":{"tags":["dashboard"],"summary":"Get Dashboard","description":"KPI summary + workload by user + breakdown by area.\nperiod=this_week → last 7 days\nperiod=this_month → last 30 days (default)\nperiod=custom → requires date_from and date_to (YYYY-MM-DD)","operationId":"get_dashboard_api_v1_dashboard__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"this_week | this_month | custom","default":"this_month","title":"Period"},"description":"this_week | this_month | custom"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/clients-exposure":{"get":{"tags":["dashboard"],"summary":"Get Clients Exposure","description":"Task count (total, open, overdue) grouped by client.","operationId":"get_clients_exposure_api_v1_dashboard_clients_exposure_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientExposureResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/critical-commitments":{"get":{"tags":["dashboard"],"summary":"Get Critical Commitments","description":"Overdue tasks + high-priority (critica) tasks due within the next 3 days.\nSorted by due date ascending so the most urgent appear first.","operationId":"get_critical_commitments_api_v1_dashboard_critical_commitments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriticalCommitmentsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/trends":{"get":{"tags":["dashboard"],"summary":"Get Trends","description":"Trend data: tasks created, completed, and overdue.\nperiod=this_week → daily breakdown (last 7 days)\nperiod=this_month → weekly breakdown (last 4 weeks)\nperiod=custom → weekly breakdown for N weeks","operationId":"get_trends_api_v1_dashboard_trends_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"this_week (daily) | this_month (4 weeks) | custom (N weeks)","default":"this_month","title":"Period"},"description":"this_week (daily) | this_month (4 weeks) | custom (N weeks)"},{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","maximum":52,"minimum":1,"description":"Number of weeks for custom period","default":8,"title":"Weeks"},"description":"Number of weeks for custom period"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai/classify":{"post":{"tags":["ai"],"summary":"Classify Task","description":"Suggest area, priority and classification for a task using GPT-4o-mini.","operationId":"classify_task_api_v1_ai_classify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/auto-assign":{"post":{"tags":["ai"],"summary":"Auto Assign Task","description":"Run AI auto-assignment for an existing task.\nFetches the task and all active employees, asks GPT-4o-mini for the best match,\nstores the suggestion on task.ai_assignment, and returns it.\nReturns 422 if the task has no area/title yet or 404 if task not found.\nReturns 503 if AI confidence is below 0.80 (no suggestion possible).","operationId":"auto_assign_task_api_v1_ai_auto_assign_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id_str","in":"query","required":true,"schema":{"type":"string","title":"Id Str"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAssignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAssignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai/suggest-assignee":{"post":{"tags":["ai"],"summary":"Suggest Assignee","description":"Suggest the best employee for a task using only task field values (no saved task required).\nIntended for use during task creation before the task is persisted.\nReturns 503 if AI confidence is below 0.80 or no employees are available.","operationId":"suggest_assignee_api_v1_ai_suggest_assignee_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestAssigneeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAssignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/recommend-assignee":{"post":{"tags":["ai"],"summary":"Recommend Assignee","description":"Recommend the top 3 employees for a task based on title and description.\nReturns an empty list if no employees are available or the AI call fails.","operationId":"recommend_assignee_api_v1_ai_recommend_assignee_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendAssigneeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendAssigneeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/parse-message":{"post":{"tags":["ai"],"summary":"Parse Message","description":"Parse a freeform inbound message into one or more structured task dicts.\nIntended for use by the messaging pipeline (WhatsApp/email/Slack).\nReturns an empty tasks list if the message has no actionable content.","operationId":"parse_message_api_v1_ai_parse_message_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseMessageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/chat":{"post":{"tags":["ai"],"summary":"Chat","description":"Conversational AI assistant with automatic context from the user's open tasks.\nSupports 7.7 tenant system prompt via settings.ai_system_prompt.","operationId":"chat_api_v1_ai_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/payments/upcoming":{"get":{"tags":["payments"],"summary":"Get Upcoming Payments","operationId":"get_upcoming_payments_api_v1_payments_upcoming_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpcomingPaymentResponse"},"title":"Response Get Upcoming Payments Api V1 Payments Upcoming Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/missed":{"get":{"tags":["payments"],"summary":"Get Missed Payments","operationId":"get_missed_payments_api_v1_payments_missed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MissedPaymentResponse"},"type":"array","title":"Response Get Missed Payments Api V1 Payments Missed Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/payments/":{"get":{"tags":["payments"],"summary":"List Payments","operationId":"list_payments_api_v1_payments__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_PaymentResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["payments"],"summary":"Create Payment","operationId":"create_payment_api_v1_payments__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/{payment_id}":{"get":{"tags":["payments"],"summary":"Get Payment","operationId":"get_payment_api_v1_payments__payment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["payments"],"summary":"Update Payment","operationId":"update_payment_api_v1_payments__payment_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["payments"],"summary":"Delete Payment","operationId":"delete_payment_api_v1_payments__payment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/{payment_id}/receipt":{"post":{"tags":["payments"],"summary":"Upload Receipt","description":"Upload a proof-of-payment file (PDF, JPG, PNG). Returns the stored URL.","operationId":"upload_receipt_api_v1_payments__payment_id__receipt_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_receipt_api_v1_payments__payment_id__receipt_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/{payment_id}/approve":{"post":{"tags":["payments"],"summary":"Approve Payment","operationId":"approve_payment_api_v1_payments__payment_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/{payment_id}/pay":{"post":{"tags":["payments"],"summary":"Mark Payment Paid","operationId":"mark_payment_paid_api_v1_payments__payment_id__pay_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentPayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/":{"get":{"tags":["reports"],"summary":"List Reports","description":"List reports for the tenant, newest first. Supports type + date filtering.","operationId":"list_reports_api_v1_reports__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"weekly | monthly","title":"Type"},"description":"weekly | monthly"},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/generate":{"post":{"tags":["reports"],"summary":"Generate Report","description":"Trigger manual report generation (weekly or monthly).\nRuns synchronously — generation typically takes a few seconds.\nReturns the new report record including whether a PDF was stored.","operationId":"generate_report_api_v1_reports_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/reports/drive-config":{"get":{"tags":["reports"],"summary":"Get Drive Config","description":"Return current Drive folder ID (DB override > env) and the OAuth email.","operationId":"get_drive_config_api_v1_reports_drive_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveConfigResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["reports"],"summary":"Update Drive Config","description":"Persist a Drive folder ID override in the DB (survives deploys).","operationId":"update_drive_config_api_v1_reports_drive_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/reports/{report_id}":{"delete":{"tags":["reports"],"summary":"Delete Report Endpoint","description":"Remove a report document and its stored PDF blob.","operationId":"delete_report_endpoint_api_v1_reports__report_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}/download":{"get":{"tags":["reports"],"summary":"Download Report","description":"Stream the report in the requested format.","operationId":"download_report_api_v1_reports__report_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"pdf | html — defaults to PDF","title":"Format"},"description":"pdf | html — defaults to PDF"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/logs":{"get":{"tags":["notifications"],"summary":"List Notification Logs","operationId":"list_notification_logs_api_v1_notifications_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_NotificationLogResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/in-app/unread":{"get":{"tags":["notifications"],"summary":"List Unread In App","description":"Return every unread in-app notification for the current user, newest first.","operationId":"list_unread_in_app_api_v1_notifications_in_app_unread_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InAppNotificationItem"},"type":"array","title":"Response List Unread In App Api V1 Notifications In App Unread Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications/in-app/mark-read":{"post":{"tags":["notifications"],"summary":"Mark In App Read","description":"Mark the given in-app notifications as read. Scoped to the caller.","operationId":"mark_in_app_read_api_v1_notifications_in_app_mark_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkReadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications/mentions":{"get":{"tags":["notifications"],"summary":"List My Mentions","operationId":"list_my_mentions_api_v1_notifications_mentions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/mentions/{notification_id}/read":{"post":{"tags":["notifications"],"summary":"Mark Mention Read","operationId":"mark_mention_read_api_v1_notifications_mentions__notification_id__read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/mentions/read-all":{"post":{"tags":["notifications"],"summary":"Mark All Mentions Read","operationId":"mark_all_mentions_read_api_v1_notifications_mentions_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/documents/tasks/{task_id}/evidence/upload":{"post":{"tags":["documents"],"summary":"Upload Evidence","description":"Upload a file to GCS and persist evidence metadata.","operationId":"upload_evidence_api_v1_documents_tasks__task_id__evidence_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_evidence_api_v1_documents_tasks__task_id__evidence_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/tasks/{task_id}/evidence/signed-url":{"get":{"tags":["documents"],"summary":"Get Evidence Url","description":"Get a fresh signed URL for a private GCS evidence file.","operationId":"get_evidence_url_api_v1_documents_tasks__task_id__evidence_signed_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"object_name","in":"query","required":true,"schema":{"type":"string","title":"Object Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/balance/me":{"get":{"tags":["hr-balance"],"summary":"Get My Balance","operationId":"get_my_balance_api_v1_hr_balance_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hr/balance":{"get":{"tags":["hr-balance"],"summary":"List User Balances","description":"Return every active user's vacation config. Used by the RH balances tab.","operationId":"list_user_balances_api_v1_hr_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BalanceResponse"},"type":"array","title":"Response List User Balances Api V1 Hr Balance Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hr/balance/{user_id}":{"get":{"tags":["hr-balance"],"summary":"Get User Balance","operationId":"get_user_balance_api_v1_hr_balance__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["hr-balance"],"summary":"Update User Balance","operationId":"update_user_balance_api_v1_hr_balance__user_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VacationConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/balance/{user_id}/renew":{"post":{"tags":["hr-balance"],"summary":"Force Renew User Balance","operationId":"force_renew_user_balance_api_v1_hr_balance__user_id__renew_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/requests":{"post":{"tags":["hr-requests"],"summary":"Create Hr Request","operationId":"create_hr_request_api_v1_hr_requests_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HRRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HRRequestCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["hr-requests"],"summary":"List All Hr Requests","operationId":"list_all_hr_requests_api_v1_hr_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HRRequestResponse"},"title":"Response List All Hr Requests Api V1 Hr Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/requests/me":{"get":{"tags":["hr-requests"],"summary":"List My Hr Requests","operationId":"list_my_hr_requests_api_v1_hr_requests_me_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HRRequestResponse"},"title":"Response List My Hr Requests Api V1 Hr Requests Me Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/requests/calendar":{"get":{"tags":["hr-requests"],"summary":"Hr Requests Calendar","operationId":"hr_requests_calendar_api_v1_hr_requests_calendar_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEntryResponse"},"title":"Response Hr Requests Calendar Api V1 Hr Requests Calendar Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/requests/{request_id}":{"get":{"tags":["hr-requests"],"summary":"Get Hr Request","operationId":"get_hr_request_api_v1_hr_requests__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HRRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/requests/{request_id}/approve":{"post":{"tags":["hr-requests"],"summary":"Approve Hr Request","operationId":"approve_hr_request_api_v1_hr_requests__request_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HRRequestApprove"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HRRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/requests/{request_id}/reject":{"post":{"tags":["hr-requests"],"summary":"Reject Hr Request","operationId":"reject_hr_request_api_v1_hr_requests__request_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HRRequestReject"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HRRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hr/requests/{request_id}/cancel":{"post":{"tags":["hr-requests"],"summary":"Cancel Hr Request","operationId":"cancel_hr_request_api_v1_hr_requests__request_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HRRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/logs":{"get":{"tags":["audit"],"summary":"List Audit Logs","operationId":"list_audit_logs_api_v1_audit_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"performed_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performed By"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/{entity_type}/{entity_id}":{"get":{"tags":["audit"],"summary":"Get Entity History","operationId":"get_entity_history_api_v1_audit__entity_type___entity_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"type":"string","title":"Entity Type"}},{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/insights/":{"get":{"tags":["insights"],"summary":"Get Insights","description":"Returns the latest cached insights. If the cache is older than 24h\na background refresh is kicked off so the next request is fresh.","operationId":"get_insights_api_v1_admin_insights__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/insights/regenerate":{"post":{"tags":["insights"],"summary":"Regenerate Insights","description":"Force-regenerate insights synchronously. Admin only.","operationId":"regenerate_insights_api_v1_admin_insights_regenerate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/tenants/":{"get":{"tags":["tenants"],"summary":"List Tenants","operationId":"list_tenants_api_v1_tenants__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantResponse"},"title":"Response List Tenants Api V1 Tenants  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tenants"],"summary":"Create Tenant","operationId":"create_tenant_api_v1_tenants__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/{tenant_id}":{"get":{"tags":["tenants"],"summary":"Get Tenant","operationId":"get_tenant_api_v1_tenants__tenant_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["tenants"],"summary":"Update Tenant","operationId":"update_tenant_api_v1_tenants__tenant_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Delete Tenant","operationId":"delete_tenant_api_v1_tenants__tenant_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/themes/":{"get":{"tags":["themes"],"summary":"List Themes","operationId":"list_themes_api_v1_themes__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ThemeResponse"},"title":"Response List Themes Api V1 Themes  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["themes"],"summary":"Create Theme","operationId":"create_theme_api_v1_themes__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/themes/{theme_id}":{"get":{"tags":["themes"],"summary":"Get Theme","operationId":"get_theme_api_v1_themes__theme_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["themes"],"summary":"Update Theme","operationId":"update_theme_api_v1_themes__theme_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","title":"Theme Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["themes"],"summary":"Archive Theme","operationId":"archive_theme_api_v1_themes__theme_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","title":"Theme Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/":{"get":{"tags":["projects"],"summary":"List Projects","operationId":"list_projects_api_v1_projects__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"}},{"name":"owner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectResponse"},"title":"Response List Projects Api V1 Projects  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["projects"],"summary":"Create Project","operationId":"create_project_api_v1_projects__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/summary":{"get":{"tags":["projects"],"summary":"Get Project Summary","operationId":"get_project_summary_api_v1_projects__project_id__summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/tasks":{"get":{"tags":["projects"],"summary":"Get Project Tasks","operationId":"get_project_tasks_api_v1_projects__project_id__tasks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Get Project","operationId":"get_project_api_v1_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["projects"],"summary":"Update Project","operationId":"update_project_api_v1_projects__project_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Archive Project","operationId":"archive_project_api_v1_projects__project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/status":{"patch":{"tags":["projects"],"summary":"Update Project Status","operationId":"update_project_status_api_v1_projects__project_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/check-payment-alerts":{"post":{"tags":["internal"],"summary":"Check Payment Alerts","description":"Cloud Scheduler job — runs daily at 09:00 America/Mexico_City.\nDetects payments whose alert window has arrived and sends notifications.\nNotification delivery is stubbed here until Epic 6 (messaging) is implemented.","operationId":"check_payment_alerts_api_v1_internal_check_payment_alerts_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/check-deadline-reminders":{"post":{"tags":["internal"],"summary":"Check Deadline Reminders","description":"Cloud Scheduler job — runs daily at 08:00 America/Mexico_City.\nSends SMS/WhatsApp reminders for tasks due within the next 24 hours.","operationId":"check_deadline_reminders_api_v1_internal_check_deadline_reminders_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/generate-report":{"post":{"tags":["internal"],"summary":"Generate Report Internal","description":"Cloud Scheduler job — generate reports for all active tenants.\nWeekly: every Monday at 07:00 America/Mexico_City.\nMonthly: 1st of each month at 07:00 America/Mexico_City.\n\nFor multi-tenant setups this iterates over tenant DBs.\nIn this single-tenant deployment it generates one report for the current DB.","operationId":"generate_report_internal_api_v1_internal_generate_report_post","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","description":"weekly | monthly","default":"weekly","title":"Type"},"description":"weekly | monthly"},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Report Internal Api V1 Internal Generate Report Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/weekly-user-performance":{"post":{"tags":["internal"],"summary":"Weekly User Performance","description":"Cloud Scheduler job — every Monday 07:00 America/Mexico_City.\n\nFor every active user, renders a weekly performance PDF covering the\nprevious full Mon-Sun window, stores it in GridFS (via report_service),\nand uploads a copy to the configured Google Drive folder. Drive upload\nfailures per user don't stop the batch — they're surfaced in the response.","operationId":"weekly_user_performance_api_v1_internal_weekly_user_performance_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Weekly User Performance Api V1 Internal Weekly User Performance Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/generate-performance-report":{"post":{"tags":["internal"],"summary":"Generate Performance Report Internal","description":"Cloud Scheduler job (Weekly) — generates user performance PDF and\nuploads directly to Google Drive.","operationId":"generate_performance_report_internal_api_v1_internal_generate_performance_report_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/renew-vacation-balances":{"post":{"tags":["internal"],"summary":"Renew Vacation Balances","description":"Cloud Scheduler job — runs daily at 02:00 America/Mexico_City.\nCredits `annual_days` to any user whose `renewal_date` matches today\nand who hasn't been renewed yet this calendar year. Idempotent.","operationId":"renew_vacation_balances_api_v1_internal_renew_vacation_balances_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/check-missed-payments":{"post":{"tags":["internal"],"summary":"Check Missed Payments","description":"Cloud Scheduler job — detects missed (overdue) payments and notifies coordinator.\nNotification delivery stubbed until Epic 6.","operationId":"check_missed_payments_api_v1_internal_check_missed_payments_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/send-birthday-greetings":{"post":{"tags":["internal"],"summary":"Send Birthday Greetings","description":"Cloud Scheduler job — runs daily at 08:00 America/Mexico_City.\nSends birthday congratulations to users whose birthday matches today.","operationId":"send_birthday_greetings_api_v1_internal_send_birthday_greetings_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/generate-audit-report":{"post":{"tags":["internal"],"summary":"Generate Audit Report Internal","description":"Generate an audit-log report for the given date range and upload to Drive.\nIf no range is given, defaults to the previous 30 days.","operationId":"generate_audit_report_internal_api_v1_internal_generate_audit_report_post","parameters":[{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD — start of audit window","title":"From Date"},"description":"YYYY-MM-DD — start of audit window"},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD — end of audit window","title":"To Date"},"description":"YYYY-MM-DD — end of audit window"},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Audit Report Internal Api V1 Internal Generate Audit Report Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/whatsapp":{"post":{"tags":["webhooks"],"summary":"Twilio Inbound","description":"Receive inbound messages/status updates from Twilio Programmable Messaging.\nConsumes application/x-www-form-urlencoded payloads.\nVerifies X-Twilio-Signature.","operationId":"twilio_inbound_api_v1_webhooks_whatsapp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/webhooks/whatsapp/messages":{"get":{"tags":["webhooks"],"summary":"List Whatsapp Messages","description":"List stored inbound WhatsApp messages (requires authentication).","operationId":"list_whatsapp_messages_api_v1_webhooks_whatsapp_messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Whatsapp Messages Api V1 Webhooks Whatsapp Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health":{"get":{"summary":"Health Check","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AIFeedbackAction":{"properties":{"accepted":{"type":"boolean","title":"Accepted"}},"type":"object","required":["accepted"],"title":"AIFeedbackAction"},"AdminPasswordResetRequest":{"properties":{"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["new_password"],"title":"AdminPasswordResetRequest"},"AdminPasswordResetResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"AdminPasswordResetResponse"},"AreaSummary":{"properties":{"area":{"type":"string","title":"Area"},"total":{"type":"integer","title":"Total","default":0},"completed":{"type":"integer","title":"Completed","default":0},"overdue":{"type":"integer","title":"Overdue","default":0},"completion_rate":{"type":"number","title":"Completion Rate","default":0.0}},"type":"object","required":["area"],"title":"AreaSummary"},"AssigneeRecommendation":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_name":{"type":"string","title":"User Name"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["user_id","user_name","reason"],"title":"AssigneeRecommendation"},"AttachmentInfo":{"properties":{"file_name":{"type":"string","title":"File Name"},"drive_file_id":{"type":"string","title":"Drive File Id","default":""},"drive_url":{"type":"string","title":"Drive Url","default":""},"object_name":{"type":"string","title":"Object Name","default":""}},"type":"object","required":["file_name"],"title":"AttachmentInfo"},"AutoAssignRequest":{"properties":{"task_id":{"type":"string","title":"Task Id"}},"type":"object","required":["task_id"],"title":"AutoAssignRequest"},"AutoAssignResponse":{"properties":{"suggested_user_id":{"type":"string","title":"Suggested User Id"},"suggested_name":{"type":"string","title":"Suggested Name"},"confidence":{"type":"number","title":"Confidence"},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["suggested_user_id","suggested_name","confidence","reasoning"],"title":"AutoAssignResponse"},"BalanceResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"config":{"$ref":"#/components/schemas/VacationConfigResponse"}},"type":"object","required":["user_id","config"],"title":"BalanceResponse"},"Body_upload_evidence_api_v1_documents_tasks__task_id__evidence_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_evidence_api_v1_documents_tasks__task_id__evidence_upload_post"},"Body_upload_receipt_api_v1_payments__payment_id__receipt_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_receipt_api_v1_payments__payment_id__receipt_post"},"BulkStatusError":{"properties":{"task_id":{"type":"string","title":"Task Id"},"current_status":{"type":"string","title":"Current Status"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["task_id","current_status","reason"],"title":"BulkStatusError"},"BulkStatusResponse":{"properties":{"updated":{"type":"integer","title":"Updated"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"items":{"$ref":"#/components/schemas/BulkStatusError"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["updated","skipped"],"title":"BulkStatusResponse"},"BulkStatusUpdate":{"properties":{"task_ids":{"items":{"type":"string"},"type":"array","title":"Task Ids"},"status":{"type":"string","title":"Status"}},"type":"object","required":["task_ids","status"],"title":"BulkStatusUpdate"},"CalendarEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"type":{"$ref":"#/components/schemas/RequestType"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"business_days":{"type":"integer","title":"Business Days"}},"type":"object","required":["id","user_id","type","start_date","end_date","business_days"],"title":"CalendarEntryResponse"},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatRequest":{"properties":{"message":{"type":"string","title":"Message"},"history":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"History","default":[]},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"}},"type":"object","required":["message"],"title":"ChatRequest"},"ChatResponse":{"properties":{"reply":{"type":"string","title":"Reply"}},"type":"object","required":["reply"],"title":"ChatResponse"},"ClassifyRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["title"],"title":"ClassifyRequest"},"ClassifyResponse":{"properties":{"area":{"type":"string","title":"Area"},"priority":{"type":"string","title":"Priority"},"classification":{"type":"string","title":"Classification"},"confidence":{"type":"number","title":"Confidence","default":0.0},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["area","priority","classification","reasoning"],"title":"ClassifyResponse"},"ClientCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"code":{"type":"string","minLength":1,"title":"Code"},"phone":{"type":"string","title":"Phone","default":""},"email":{"type":"string","title":"Email","default":""},"contact_name":{"type":"string","title":"Contact Name","default":""},"address":{"type":"string","title":"Address","default":""},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","code"],"title":"ClientCreate"},"ClientExposureItem":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_code":{"type":"string","title":"Client Code"},"client_name":{"type":"string","title":"Client Name"},"total":{"type":"integer","title":"Total","default":0},"open_count":{"type":"integer","title":"Open Count","default":0},"overdue_count":{"type":"integer","title":"Overdue Count","default":0}},"type":"object","required":["client_id","client_code","client_name"],"title":"ClientExposureItem"},"ClientExposureResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ClientExposureItem"},"type":"array","title":"Items","default":[]}},"type":"object","title":"ClientExposureResponse"},"ClientResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"phone":{"type":"string","title":"Phone"},"email":{"type":"string","title":"Email","default":""},"contact_name":{"type":"string","title":"Contact Name"},"address":{"type":"string","title":"Address"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","name","code","phone","contact_name","address","is_active"],"title":"ClientResponse"},"ClientTaskSummary":{"properties":{"client_id":{"type":"string","title":"Client Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"phone":{"type":"string","title":"Phone"},"email":{"type":"string","title":"Email","default":""},"contact_name":{"type":"string","title":"Contact Name"},"is_active":{"type":"boolean","title":"Is Active"},"total":{"type":"integer","title":"Total"},"open":{"type":"integer","title":"Open"},"overdue":{"type":"integer","title":"Overdue"},"completed":{"type":"integer","title":"Completed"}},"type":"object","required":["client_id","name","code","phone","contact_name","is_active","total","open","overdue","completed"],"title":"ClientTaskSummary"},"ClientUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ClientUpdate"},"CollaboratorSummary":{"properties":{"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"avatar_initials":{"type":"string","title":"Avatar Initials"},"active_task_count":{"type":"integer","title":"Active Task Count"}},"type":"object","required":["user_id","name","avatar_initials","active_task_count"],"title":"CollaboratorSummary"},"CommentCreate":{"properties":{"text":{"type":"string","minLength":1,"title":"Text"},"mentions":{"items":{"type":"string"},"type":"array","title":"Mentions","default":[]},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentInfo"},"type":"array","title":"Attachments","default":[]}},"type":"object","required":["text"],"title":"CommentCreate"},"CommentResponse":{"properties":{"id":{"type":"string","title":"Id"},"task_id":{"type":"string","title":"Task Id"},"author_id":{"type":"string","title":"Author Id"},"author_name":{"type":"string","title":"Author Name"},"text":{"type":"string","title":"Text"},"mentions":{"items":{"type":"string"},"type":"array","title":"Mentions"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentInfo"},"type":"array","title":"Attachments"},"is_system":{"type":"boolean","title":"Is System"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","task_id","author_id","author_name","text","mentions","attachments","is_system","created_at"],"title":"CommentResponse"},"CommentUpdate":{"properties":{"text":{"type":"string","minLength":1,"title":"Text"},"mentions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mentions"},"attachments":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttachmentInfo"},"type":"array"},{"type":"null"}],"title":"Attachments"}},"type":"object","required":["text"],"title":"CommentUpdate"},"CriticalCommitmentsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CriticalTask"},"type":"array","title":"Items","default":[]},"total":{"type":"integer","title":"Total","default":0}},"type":"object","title":"CriticalCommitmentsResponse"},"CriticalTask":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"priority":{"type":"string","title":"Priority"},"area":{"type":"string","title":"Area"},"status":{"type":"string","title":"Status"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"days_overdue":{"type":"integer","title":"Days Overdue","default":0},"assigned_to_names":{"items":{"type":"string"},"type":"array","title":"Assigned To Names","default":[]}},"type":"object","required":["id","title","priority","area","status"],"title":"CriticalTask"},"DashboardResponse":{"properties":{"kpis":{"$ref":"#/components/schemas/KPISummary"},"workload":{"items":{"$ref":"#/components/schemas/WorkloadItem"},"type":"array","title":"Workload","default":[]},"by_area":{"items":{"$ref":"#/components/schemas/AreaSummary"},"type":"array","title":"By Area","default":[]}},"type":"object","required":["kpis"],"title":"DashboardResponse"},"DefaultNotificationPreferences":{"properties":{"email_enabled":{"type":"boolean","title":"Email Enabled","default":true},"whatsapp_enabled":{"type":"boolean","title":"Whatsapp Enabled","default":false},"slack_enabled":{"type":"boolean","title":"Slack Enabled","default":false}},"type":"object","title":"DefaultNotificationPreferences"},"DriveConfigResponse":{"properties":{"folder_id":{"type":"string","title":"Folder Id"},"oauth_email":{"type":"string","title":"Oauth Email"}},"type":"object","required":["folder_id","oauth_email"],"title":"DriveConfigResponse"},"DriveConfigUpdate":{"properties":{"folder_id":{"type":"string","title":"Folder Id"}},"type":"object","required":["folder_id"],"title":"DriveConfigUpdate"},"EmailConfig":{"properties":{"provider":{"type":"string","title":"Provider","default":"resend"},"api_key":{"type":"string","title":"Api Key","default":""},"from_address":{"type":"string","title":"From Address","default":""},"from_name":{"type":"string","title":"From Name","default":""},"inbound_address":{"type":"string","title":"Inbound Address","default":""}},"type":"object","title":"EmailConfig"},"EvidenceItem":{"properties":{"file_name":{"type":"string","title":"File Name"},"object_name":{"type":"string","title":"Object Name","default":""},"public_url":{"type":"string","title":"Public Url","default":""},"content_type":{"type":"string","title":"Content Type","default":""},"size_bytes":{"type":"integer","title":"Size Bytes","default":0},"uploaded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploaded By"},"uploaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Uploaded At"},"drive_file_id":{"type":"string","title":"Drive File Id","default":""},"drive_url":{"type":"string","title":"Drive Url","default":""}},"type":"object","required":["file_name"],"title":"EvidenceItem"},"EvidenceResponse":{"properties":{"file_name":{"type":"string","title":"File Name"},"drive_file_id":{"type":"string","title":"Drive File Id"},"drive_url":{"type":"string","title":"Drive Url"},"uploaded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploaded By"},"uploaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Uploaded At"}},"type":"object","required":["file_name","drive_file_id","drive_url","uploaded_by"],"title":"EvidenceResponse"},"GoogleDriveConfig":{"properties":{"service_account_json":{"type":"string","title":"Service Account Json","default":""},"root_folder_id":{"type":"string","title":"Root Folder Id","default":""}},"type":"object","title":"GoogleDriveConfig"},"HRRequestApprove":{"properties":{"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","title":"HRRequestApprove"},"HRRequestCreate":{"properties":{"type":{"$ref":"#/components/schemas/RequestType"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["type","start_date","end_date"],"title":"HRRequestCreate"},"HRRequestCreateResponse":{"properties":{"request":{"$ref":"#/components/schemas/HRRequestResponse"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["request"],"title":"HRRequestCreateResponse","description":"Create response includes informational warnings (e.g. overlap with other users)."},"HRRequestReject":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"HRRequestReject"},"HRRequestResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"type":{"$ref":"#/components/schemas/RequestType"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"business_days":{"type":"integer","title":"Business Days"},"description":{"type":"string","title":"Description"},"status":{"$ref":"#/components/schemas/RequestStatus"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"approved_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By Name"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"approval_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Comment"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"cancelled_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","type","start_date","end_date","business_days","description","status","created_at","updated_at"],"title":"HRRequestResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InAppNotificationItem":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"request_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Type"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","type","created_at"],"title":"InAppNotificationItem"},"KPISummary":{"properties":{"total_tasks":{"type":"integer","title":"Total Tasks","default":0},"open_tasks":{"type":"integer","title":"Open Tasks","default":0},"overdue_tasks":{"type":"integer","title":"Overdue Tasks","default":0},"completed_this_week":{"type":"integer","title":"Completed This Week","default":0},"completion_rate":{"type":"number","title":"Completion Rate","default":0.0}},"type":"object","title":"KPISummary"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LogoutRequest":{"properties":{"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","title":"LogoutRequest"},"LogoutResponse":{"properties":{"message":{"type":"string","title":"Message","default":"logged_out"}},"type":"object","title":"LogoutResponse"},"MarkReadRequest":{"properties":{"ids":{"items":{"type":"string"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"MarkReadRequest"},"MentionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MentionNotificationResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"unread":{"type":"integer","title":"Unread"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","unread","page","page_size"],"title":"MentionListResponse"},"MentionNotificationResponse":{"properties":{"id":{"type":"string","title":"Id"},"task_id":{"type":"string","title":"Task Id"},"comment_id":{"type":"string","title":"Comment Id"},"author_name":{"type":"string","title":"Author Name"},"text_preview":{"type":"string","title":"Text Preview"},"read":{"type":"boolean","title":"Read"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","task_id","comment_id","author_name","text_preview","read","created_at"],"title":"MentionNotificationResponse"},"MissedPaymentResponse":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"concept":{"type":"string","title":"Concept"},"client_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Code"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"amount":{"type":"number","title":"Amount"},"current_period_paid":{"type":"number","title":"Current Period Paid"},"currency":{"type":"string","title":"Currency"},"next_due_date":{"type":"string","format":"date-time","title":"Next Due Date"},"days_overdue":{"type":"integer","title":"Days Overdue"}},"type":"object","required":["id","provider","concept","client_code","client_name","amount","current_period_paid","currency","next_due_date","days_overdue"],"title":"MissedPaymentResponse"},"NotificationLogResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"recipient_phone":{"type":"string","title":"Recipient Phone"},"template":{"type":"string","title":"Template"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"sent_at":{"type":"string","format":"date-time","title":"Sent At"}},"type":"object","required":["id","type","recipient_phone","template","status","error","sent_at"],"title":"NotificationLogResponse"},"PaginatedResponse_CommentResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CommentResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page","default":1},"page_size":{"type":"integer","title":"Page Size","default":20},"pages":{"type":"integer","title":"Pages","default":1}},"type":"object","required":["items","total"],"title":"PaginatedResponse[CommentResponse]"},"PaginatedResponse_NotificationLogResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationLogResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page","default":1},"page_size":{"type":"integer","title":"Page Size","default":20},"pages":{"type":"integer","title":"Pages","default":1}},"type":"object","required":["items","total"],"title":"PaginatedResponse[NotificationLogResponse]"},"PaginatedResponse_PaymentResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PaymentResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page","default":1},"page_size":{"type":"integer","title":"Page Size","default":20},"pages":{"type":"integer","title":"Pages","default":1}},"type":"object","required":["items","total"],"title":"PaginatedResponse[PaymentResponse]"},"PaginatedResponse_TaskResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaskResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page","default":1},"page_size":{"type":"integer","title":"Page Size","default":20},"pages":{"type":"integer","title":"Pages","default":1}},"type":"object","required":["items","total"],"title":"PaginatedResponse[TaskResponse]"},"PaginatedResponse_UserResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page","default":1},"page_size":{"type":"integer","title":"Page Size","default":20},"pages":{"type":"integer","title":"Pages","default":1}},"type":"object","required":["items","total"],"title":"PaginatedResponse[UserResponse]"},"ParseMessageRequest":{"properties":{"text":{"type":"string","title":"Text"},"sender_name":{"type":"string","title":"Sender Name"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"}},"type":"object","required":["text","sender_name"],"title":"ParseMessageRequest"},"ParseMessageResponse":{"properties":{"tasks":{"items":{"$ref":"#/components/schemas/ParsedTask"},"type":"array","title":"Tasks"}},"type":"object","required":["tasks"],"title":"ParseMessageResponse"},"ParsedTask":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"area":{"type":"string","title":"Area"},"priority":{"type":"string","title":"Priority"},"urgency_indicators":{"items":{"type":"string"},"type":"array","title":"Urgency Indicators","default":[]}},"type":"object","required":["title","description","area","priority"],"title":"ParsedTask"},"PasswordChangeRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"PasswordChangeRequest"},"PaymentCreate":{"properties":{"provider":{"type":"string","title":"Provider"},"concept":{"type":"string","title":"Concept","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"property_id":{"type":"string","title":"Property Id","default":""},"amount":{"type":"number","title":"Amount"},"currency":{"type":"string","title":"Currency","default":"MXN"},"frequency":{"type":"string","title":"Frequency","default":"monthly"},"due_day":{"type":"integer","title":"Due Day","default":1},"alert_days_before":{"type":"integer","title":"Alert Days Before","default":5}},"type":"object","required":["provider","amount"],"title":"PaymentCreate"},"PaymentPayRequest":{"properties":{"amount_paid":{"type":"number","title":"Amount Paid"},"receipt_url":{"type":"string","title":"Receipt Url","default":""}},"type":"object","required":["amount_paid"],"title":"PaymentPayRequest"},"PaymentRecordResponse":{"properties":{"paid_at":{"type":"string","format":"date-time","title":"Paid At"},"amount_paid":{"type":"number","title":"Amount Paid"},"receipt_url":{"type":"string","title":"Receipt Url"},"paid_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid By"}},"type":"object","required":["paid_at","amount_paid","receipt_url","paid_by"],"title":"PaymentRecordResponse"},"PaymentResponse":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"concept":{"type":"string","title":"Concept"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Code"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"property_id":{"type":"string","title":"Property Id"},"amount":{"type":"number","title":"Amount"},"current_period_paid":{"type":"number","title":"Current Period Paid"},"currency":{"type":"string","title":"Currency"},"frequency":{"type":"string","title":"Frequency"},"due_day":{"type":"integer","title":"Due Day"},"next_due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Due Date"},"alert_days_before":{"type":"integer","title":"Alert Days Before"},"status":{"type":"string","title":"Status"},"payment_history":{"items":{"$ref":"#/components/schemas/PaymentRecordResponse"},"type":"array","title":"Payment History"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","provider","concept","client_id","client_code","client_name","property_id","amount","current_period_paid","currency","frequency","due_day","next_due_date","alert_days_before","status","payment_history","created_at"],"title":"PaymentResponse"},"PaymentUpdate":{"properties":{"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frequency"},"due_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Due Day"},"alert_days_before":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Alert Days Before"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"PaymentUpdate"},"ProjectCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"client_id":{"type":"string","title":"Client Id"},"owner_id":{"type":"string","title":"Owner Id"},"status":{"$ref":"#/components/schemas/ProjectStatus","default":"activo"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"target_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target End Date"},"color":{"type":"string","title":"Color","default":"#1E3A5F"}},"type":"object","required":["name","client_id","owner_id"],"title":"ProjectCreate"},"ProjectResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"client_id":{"type":"string","title":"Client Id"},"owner_id":{"type":"string","title":"Owner Id"},"status":{"$ref":"#/components/schemas/ProjectStatus"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"target_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target End Date"},"color":{"type":"string","title":"Color"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["id","name","client_id","owner_id","status","color","created_at","updated_at"],"title":"ProjectResponse"},"ProjectStatus":{"type":"string","enum":["activo","pausado","completado","archivado"],"title":"ProjectStatus"},"ProjectStatusUpdate":{"properties":{"status":{"$ref":"#/components/schemas/ProjectStatus"}},"type":"object","required":["status"],"title":"ProjectStatusUpdate"},"ProjectSummaryResponse":{"properties":{"project":{"$ref":"#/components/schemas/ProjectResponse"},"task_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Task Counts"},"total_tasks":{"type":"integer","title":"Total Tasks"},"completion_pct":{"type":"number","title":"Completion Pct"},"collaborators":{"items":{"$ref":"#/components/schemas/CollaboratorSummary"},"type":"array","title":"Collaborators"}},"type":"object","required":["project","task_counts","total_tasks","completion_pct","collaborators"],"title":"ProjectSummaryResponse"},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"target_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target End Date"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","title":"ProjectUpdate"},"RecommendAssigneeRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["title"],"title":"RecommendAssigneeRequest"},"RecommendAssigneeResponse":{"properties":{"recommendations":{"items":{"$ref":"#/components/schemas/AssigneeRecommendation"},"type":"array","title":"Recommendations"}},"type":"object","required":["recommendations"],"title":"RecommendAssigneeResponse"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","minLength":1,"title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"ReportGenerateRequest":{"properties":{"type":{"type":"string","title":"Type","default":"weekly"},"period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period End"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"},"upload_to_drive":{"type":"boolean","title":"Upload To Drive","default":false},"send_by_email":{"type":"boolean","title":"Send By Email","default":false},"email_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email To"},"vacation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vacation Type"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"}},"type":"object","title":"ReportGenerateRequest"},"ReportListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"ReportListResponse"},"ReportResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"generated_by":{"type":"string","title":"Generated By","default":"system"},"generated_by_name":{"type":"string","title":"Generated By Name","default":"Automatico"},"drive_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Drive Url"},"has_pdf":{"type":"boolean","title":"Has Pdf","default":false},"has_html":{"type":"boolean","title":"Has Html","default":false},"file_size_bytes":{"type":"integer","title":"File Size Bytes","default":0},"email_sent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Sent"},"email_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Error"}},"type":"object","required":["id","type","period_start","period_end","generated_at"],"title":"ReportResponse"},"RequestStatus":{"type":"string","enum":["pendiente","aprobado","rechazado","cancelado"],"title":"RequestStatus"},"RequestType":{"type":"string","enum":["vacaciones","permiso_especial","home_office"],"title":"RequestType"},"RoleCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"}},"type":"object","required":["name","permissions"],"title":"RoleCreate"},"RoleResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"is_system":{"type":"boolean","title":"Is System"},"user_count":{"type":"integer","title":"User Count","default":0}},"type":"object","required":["id","name","description","permissions","is_system"],"title":"RoleResponse"},"RoleUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","title":"RoleUpdate"},"SlackConfig":{"properties":{"bot_token":{"type":"string","title":"Bot Token","default":""},"team_id":{"type":"string","title":"Team Id","default":""},"signing_secret":{"type":"string","title":"Signing Secret","default":""}},"type":"object","title":"SlackConfig"},"StatusItem":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"color":{"type":"string","title":"Color"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["key","label","color","order"],"title":"StatusItem"},"SuggestAssigneeRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"area":{"type":"string","title":"Area","default":""},"priority":{"type":"string","title":"Priority","default":"media"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"}},"type":"object","required":["title"],"title":"SuggestAssigneeRequest","description":"Suggest an assignee from raw task fields (no existing task_id required)."},"TaskCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"type":"string","maxLength":5000,"title":"Description","default":""},"area":{"type":"string","maxLength":100,"title":"Area","default":""},"classification":{"type":"string","maxLength":100,"title":"Classification","default":""},"priority":{"type":"string","enum":["baja","media","alta","critica"],"title":"Priority","default":"media"},"effort_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Effort Level"},"assigned_to":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Assigned To","default":[]},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"additional_client_ids":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Additional Client Ids","default":[]},"theme_id":{"type":"string","title":"Theme Id"},"project_id":{"type":"string","title":"Project Id"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags","default":[]},"is_recurring":{"type":"boolean","title":"Is Recurring","default":false},"recurrence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recurrence"}},"type":"object","required":["title","theme_id","project_id"],"title":"TaskCreate"},"TaskResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"area":{"type":"string","title":"Area"},"classification":{"type":"string","title":"Classification"},"priority":{"type":"string","title":"Priority"},"status":{"type":"string","title":"Status"},"effort_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Effort Level"},"assigned_to":{"items":{"type":"string"},"type":"array","title":"Assigned To","default":[]},"assigned_to_names":{"items":{"type":"string"},"type":"array","title":"Assigned To Names","default":[]},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"additional_client_ids":{"items":{"type":"string"},"type":"array","title":"Additional Client Ids","default":[]},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Id"},"theme_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"evidence":{"items":{"$ref":"#/components/schemas/EvidenceResponse"},"type":"array","title":"Evidence","default":[]},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"is_recurring":{"type":"boolean","title":"Is Recurring","default":false},"recurrence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recurrence"},"ai_classification":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Classification"},"ai_assignment":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Assignment"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","description","area","classification","priority","status","created_by","property_id","due_date","completed_at","created_at","updated_at"],"title":"TaskResponse"},"TaskStatusConfigResponse":{"properties":{"statuses":{"items":{"$ref":"#/components/schemas/StatusItem"},"type":"array","title":"Statuses"},"transitions":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Transitions"}},"type":"object","required":["statuses","transitions"],"title":"TaskStatusConfigResponse"},"TaskTrailEvent":{"properties":{"kind":{"type":"string","enum":["created","status_changed","assignment_changed","comment","evidence"],"title":"Kind"},"at":{"type":"string","format":"date-time","title":"At"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"},"actor_name":{"type":"string","title":"Actor Name","default":""},"details":{"additionalProperties":true,"type":"object","title":"Details","default":{}}},"type":"object","required":["kind","at"],"title":"TaskTrailEvent"},"TaskTrailResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"title":{"type":"string","title":"Title"},"status":{"type":"string","title":"Status"},"priority":{"type":"string","title":"Priority"},"effort_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Effort Level"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id"},"created_by_name":{"type":"string","title":"Created By Name","default":""},"created_at":{"type":"string","format":"date-time","title":"Created At"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"assignees":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Assignees","default":[]},"events":{"items":{"$ref":"#/components/schemas/TaskTrailEvent"},"type":"array","title":"Events","default":[]}},"type":"object","required":["task_id","title","status","priority","created_at"],"title":"TaskTrailResponse"},"TaskUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"area":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Area"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"effort_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Effort Level"},"assigned_to":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Assigned To"},"property_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Id"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"additional_client_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Additional Client Ids"},"theme_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"is_recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Recurring"},"recurrence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recurrence"}},"type":"object","title":"TaskUpdate"},"TenantCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"domain":{"type":"string","title":"Domain"},"logo_url":{"type":"string","title":"Logo Url","default":""},"favicon_url":{"type":"string","title":"Favicon Url","default":""},"primary_color":{"type":"string","title":"Primary Color","default":"#1E3A5F"},"secondary_color":{"type":"string","title":"Secondary Color","default":"#F59E0B"},"accent_color":{"type":"string","title":"Accent Color","default":"#EF4444"},"anthropic_api_key":{"type":"string","title":"Anthropic Api Key","default":""},"default_notification_preferences":{"$ref":"#/components/schemas/DefaultNotificationPreferences","default":{"email_enabled":true,"whatsapp_enabled":false,"slack_enabled":false}}},"type":"object","required":["name","slug","domain"],"title":"TenantCreate"},"TenantResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"domain":{"type":"string","title":"Domain"},"logo_url":{"type":"string","title":"Logo Url"},"favicon_url":{"type":"string","title":"Favicon Url"},"primary_color":{"type":"string","title":"Primary Color"},"secondary_color":{"type":"string","title":"Secondary Color"},"accent_color":{"type":"string","title":"Accent Color"},"mongodb_database_name":{"type":"string","title":"Mongodb Database Name"},"default_notification_preferences":{"$ref":"#/components/schemas/DefaultNotificationPreferences"},"is_active":{"type":"boolean","title":"Is Active"},"whatsapp_enabled":{"type":"boolean","title":"Whatsapp Enabled"},"email_enabled":{"type":"boolean","title":"Email Enabled"},"slack_enabled":{"type":"boolean","title":"Slack Enabled"},"google_drive_enabled":{"type":"boolean","title":"Google Drive Enabled"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","slug","domain","logo_url","favicon_url","primary_color","secondary_color","accent_color","mongodb_database_name","default_notification_preferences","is_active","whatsapp_enabled","email_enabled","slack_enabled","google_drive_enabled","created_at","updated_at"],"title":"TenantResponse","description":"Full admin response — no raw secrets exposed."},"TenantUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"favicon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Favicon Url"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"secondary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Color"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color"},"anthropic_api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anthropic Api Key"},"whatsapp_config":{"anyOf":[{"$ref":"#/components/schemas/WhatsAppConfig"},{"type":"null"}]},"email_config":{"anyOf":[{"$ref":"#/components/schemas/EmailConfig"},{"type":"null"}]},"slack_config":{"anyOf":[{"$ref":"#/components/schemas/SlackConfig"},{"type":"null"}]},"google_drive_config":{"anyOf":[{"$ref":"#/components/schemas/GoogleDriveConfig"},{"type":"null"}]},"default_notification_preferences":{"anyOf":[{"$ref":"#/components/schemas/DefaultNotificationPreferences"},{"type":"null"}]},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"TenantUpdate"},"ThemeCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"color":{"type":"string","title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","color"],"title":"ThemeCreate"},"ThemeResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"active_task_count":{"type":"integer","title":"Active Task Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["id","name","color","created_at","updated_at"],"title":"ThemeResponse"},"ThemeUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"ThemeUpdate"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse"},"TrendPoint":{"properties":{"label":{"type":"string","title":"Label"},"created":{"type":"integer","title":"Created","default":0},"completed":{"type":"integer","title":"Completed","default":0},"overdue":{"type":"integer","title":"Overdue","default":0}},"type":"object","required":["label"],"title":"TrendPoint"},"TrendResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/TrendPoint"},"type":"array","title":"Points","default":[]}},"type":"object","title":"TrendResponse"},"UpcomingPaymentResponse":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"concept":{"type":"string","title":"Concept"},"client_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Code"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"amount":{"type":"number","title":"Amount"},"current_period_paid":{"type":"number","title":"Current Period Paid"},"currency":{"type":"string","title":"Currency"},"frequency":{"type":"string","title":"Frequency"},"next_due_date":{"type":"string","format":"date-time","title":"Next Due Date"},"alert_days_before":{"type":"integer","title":"Alert Days Before"},"days_until_due":{"type":"integer","title":"Days Until Due"}},"type":"object","required":["id","provider","concept","client_code","client_name","amount","current_period_paid","currency","frequency","next_due_date","alert_days_before","days_until_due"],"title":"UpcomingPaymentResponse"},"UserAssigneeResponse":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"type":"string","title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"UserAssigneeResponse"},"UserBriefResponse":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"type":"string","title":"Full Name"}},"type":"object","required":["id","full_name"],"title":"UserBriefResponse"},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"full_name":{"type":"string","title":"Full Name"},"phone":{"type":"string","title":"Phone","default":""},"department":{"type":"string","title":"Department","default":""},"role_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Id"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"}},"type":"object","required":["email","password","full_name"],"title":"UserCreate"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"phone":{"type":"string","title":"Phone"},"role_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Id"},"role_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Name"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","default":[]},"department":{"type":"string","title":"Department","default":""},"role_description":{"type":"string","title":"Role Description","default":""},"is_active":{"type":"boolean","title":"Is Active"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"}},"type":"object","required":["id","email","full_name","phone","is_active"],"title":"UserResponse"},"UserSummaryResponse":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"department":{"type":"string","title":"Department"},"task_count":{"type":"integer","title":"Task Count"},"recurring_task_count":{"type":"integer","title":"Recurring Task Count"},"overdue_count":{"type":"integer","title":"Overdue Count"},"completed_this_week":{"type":"integer","title":"Completed This Week"}},"type":"object","required":["id","full_name","department","task_count","recurring_task_count","overdue_count","completed_this_week"],"title":"UserSummaryResponse"},"UserUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"role_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"birthday":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthday"}},"type":"object","title":"UserUpdate"},"VacationConfigResponse":{"properties":{"annual_days":{"type":"integer","title":"Annual Days"},"renewal_date":{"type":"string","format":"date","title":"Renewal Date"},"current_balance":{"type":"number","title":"Current Balance"},"last_renewed_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Renewed At"}},"type":"object","required":["annual_days","renewal_date","current_balance"],"title":"VacationConfigResponse"},"VacationConfigUpdate":{"properties":{"annual_days":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":0.0},{"type":"null"}],"title":"Annual Days"},"renewal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewal Date"},"balance_adjustment":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance Adjustment"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","title":"VacationConfigUpdate","description":"Update config and/or apply a manual balance adjustment.\n\nAt least one of the three mutating fields must be provided. Manual\nadjustments require a comment for the audit trail."},"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"},"WhatsAppConfig":{"properties":{"provider":{"type":"string","title":"Provider","default":"vonage"},"api_key":{"type":"string","title":"Api Key","default":""},"phone_number_id":{"type":"string","title":"Phone Number Id","default":""},"webhook_secret":{"type":"string","title":"Webhook Secret","default":""}},"type":"object","title":"WhatsAppConfig"},"WorkloadItem":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_name":{"type":"string","title":"User Name"},"assigned":{"type":"integer","title":"Assigned","default":0},"completed":{"type":"integer","title":"Completed","default":0},"overdue":{"type":"integer","title":"Overdue","default":0}},"type":"object","required":["user_id","user_name"],"title":"WorkloadItem"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}