{"openapi":"3.1.0","info":{"title":"Zato 2.0 Backend","version":"0.1.0"},"paths":{"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login Begin","description":"Step 1: ask which IdP to use (or signal that password is needed).","operationId":"login_begin_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginBeginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login/password":{"post":{"tags":["auth"],"summary":"Login Password","description":"Manual (email + password) flow — validated against the app DB only.\n\nReturns mode=otp_staged: sets the pre_session cookie, frontend goes to the\nOTP page. Manual auth never touches Cognito (that's the SSO buttons only).","operationId":"login_password_api_v1_auth_login_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/set-new-password":{"post":{"tags":["auth"],"summary":"Set New Password","description":"Complete the Cognito NEW_PASSWORD_REQUIRED challenge.\n\nUsed by first-time CS Admin (bootstrap-emailed temp password) and by any\nuser Cognito has flagged for forced password reset.","operationId":"set_new_password_api_v1_auth_set_new_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetNewPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/callback":{"get":{"tags":["auth"],"summary":"Callback","description":"OAuth2 redirect target for federated IdPs (Google/Microsoft/Apple/...).\n\nFederated users have already completed strong auth at the IdP, so we skip\nthe OTP step and open the session directly. Cookies are set on the redirect\nresponse and the browser lands on the frontend's PersonaDispatcher, which\nroutes them to their portal-specific landing route.\n\nResilience: any failure here (Cognito JWKS unreachable, IdP token exchange\nfailed, user not provisioned, firm disabled) is redirected back to the\nlogin page with an `?sso_error=...` query so the user sees a friendly\nmessage instead of a bare \"Internal Server Error\" page from the proxy.","operationId":"callback_api_v1_auth_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-otp":{"post":{"tags":["auth"],"summary":"Verify Otp","description":"Step 2: exchange OTP + pre_session cookie for the full session.","operationId":"verify_otp_api_v1_auth_verify_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_api_v1_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/extend":{"post":{"tags":["auth"],"summary":"Extend","description":"User clicked 'Continue session' on the 15-min idle warning popup.","operationId":"extend_api_v1_auth_extend_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Triggers a Cognito-emailed reset code to the user (no-op in local dev).","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/accept-invite":{"post":{"tags":["auth"],"summary":"Accept Invite","description":"Redeem an invitation token. Public — no session cookie required.\n\nNative users: must supply `new_password`; we promote their temp Cognito\npassword and stage the OTP step (sets pre_session cookie).\nFederated users: we mark the invitation accepted and return a redirect to\n/auth/login so the user can click their IdP.","operationId":"accept_invite_api_v1_auth_accept_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/config":{"get":{"tags":["config"],"summary":"Get Bootstrap Config","description":"Return the deployment's active locale + the advertised supported set.","operationId":"get_bootstrap_config_api_v1_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Bootstrap Config Api V1 Config Get"}}}}}}},"/api/v1/health/services":{"get":{"tags":["health"],"summary":"Services Health","description":"Fan out to every service's /healthz and return combined status.","operationId":"services_health_api_v1_health_services_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/services/reverse-check":{"get":{"tags":["health"],"summary":"Reverse Check","description":"Ask each Lambda service to call back to the backend /healthz.\nProves the services → backend network path (Lambda outbound via NAT).","operationId":"reverse_check_api_v1_health_services_reverse_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/services/{name}":{"get":{"tags":["health"],"summary":"Service Health By Name","description":"Ping a single service by name.","operationId":"service_health_by_name_api_v1_health_services__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/personas/me":{"get":{"tags":["personas"],"summary":"Me","operationId":"me_api_v1_personas_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/compute":{"post":{"tags":["compute"],"summary":"Compute","operationId":"compute_api_v1_compute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents":{"get":{"tags":["documents"],"summary":"List Documents","operationId":"list_documents_api_v1_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/lambdas/bulk-upload":{"post":{"tags":["lambdas"],"summary":"Bulk Upload","operationId":"bulk_upload_api_v1_lambdas_bulk_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lambdas/document-agent":{"post":{"tags":["lambdas"],"summary":"Document Agent","operationId":"document_agent_api_v1_lambdas_document_agent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentAgentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lambdas/ai-gateway":{"post":{"tags":["lambdas"],"summary":"Ai Gateway","operationId":"ai_gateway_api_v1_lambdas_ai_gateway_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiGatewayIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lambdas/pipeline":{"post":{"tags":["lambdas"],"summary":"Pipeline","description":"Demo workflow chaining all three services in a single run.","operationId":"pipeline_api_v1_lambdas_pipeline_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs":{"get":{"tags":["runs"],"summary":"List Runs","description":"List recent runs across all services. Optionally filter by kind.\n\nRuns are bounded (24h TTL), so we read every matching key, sort by recency,\nthen window with offset/limit — Redis SCAN has no offset, and a partial scan\nwould make `total` and paging wrong.","operationId":"list_runs_api_v1_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}":{"get":{"tags":["runs"],"summary":"Get Run","operationId":"get_run_api_v1_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/log":{"get":{"tags":["runs"],"summary":"Get Run Log","description":"Return the per-run JSONL log as plain text (browser will download/view).","operationId":"get_run_log_api_v1_runs__run_id__log_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/master-config":{"get":{"tags":["coa"],"summary":"Get Master Config","description":"Return the active COA master_config doc.","operationId":"get_master_config_api_v1_coa_master_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/coa/clients":{"get":{"tags":["coa"],"summary":"List Clients","description":"List clients in the caller's firm.","operationId":"list_clients_api_v1_coa_clients_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/coa/clients/{client_uuid}/jobs":{"get":{"tags":["coa"],"summary":"List Jobs For Client","description":"List COA jobs for the given client.","operationId":"list_jobs_for_client_api_v1_coa_clients__client_uuid__jobs_get","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs":{"post":{"tags":["coa"],"summary":"Create Job","description":"Create a new COA mapping job — inserts both a `jobs` row and the\n`coa_mapping_job` extension, and ensures the per-client COA document\n(deep copy of the master `parents`) in `coa_mapping_document`.","operationId":"create_job_api_v1_coa_jobs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJobIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/tb/upload":{"post":{"tags":["coa"],"summary":"Upload Tb","description":"Upload a CSV or XLSX trial balance into `trial_balance`.","operationId":"upload_tb_api_v1_coa_jobs__job_uuid__tb_upload_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_tb_api_v1_coa_jobs__job_uuid__tb_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/tb/sync-xero":{"post":{"tags":["coa"],"summary":"Sync Tb From Xero","description":"Live Xero TB sync — fetch the client's trial balance into this job.","operationId":"sync_tb_from_xero_api_v1_coa_jobs__job_uuid__tb_sync_xero_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/tb":{"get":{"tags":["coa"],"summary":"List Tb For Job","description":"List TB rows for the job joined with the current mapping projection.","operationId":"list_tb_for_job_api_v1_coa_jobs__job_uuid__tb_get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/automap":{"post":{"tags":["coa"],"summary":"Automap Job","description":"Dispatch the 5-tier auto-mapping pipeline and return immediately (202).\n\nThe edge does NOT run the pipeline (that would hold the request open 35-135s\nand starve the orchestrator). It writes a durable dispatch record and returns\n``{run_id, status: 'dispatched'}``; the agent tier claims + runs it, and the\nclient watches live progress over the ``run:<run_id>`` WS topic.","operationId":"automap_job_api_v1_coa_jobs__job_uuid__automap_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/document":{"get":{"tags":["coa"],"summary":"Get Job Document","description":"Return the per-job COA document (deep copy of parents + mapping[]).","operationId":"get_job_document_api_v1_coa_jobs__job_uuid__document_get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/mappings/{coa_tb_id}":{"put":{"tags":["coa"],"summary":"Update Mapping","operationId":"update_mapping_api_v1_coa_jobs__job_uuid__mappings__coa_tb_id__put","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"coa_tb_id","in":"path","required":true,"schema":{"type":"integer","title":"Coa Tb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMappingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/parents/add":{"post":{"tags":["coa"],"summary":"Add Section","description":"Multi-parent +: create a numbered sibling pair under the given base.","operationId":"add_section_api_v1_coa_jobs__job_uuid__parents_add_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSectionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/parents/{parent_key}":{"delete":{"tags":["coa"],"summary":"Remove Section","description":"Multi-parent −: tail-only delete of the highest numbered instance.","operationId":"remove_section_api_v1_coa_jobs__job_uuid__parents__parent_key__delete","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"parent_key","in":"path","required":true,"schema":{"type":"string","title":"Parent Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/approve-all":{"post":{"tags":["coa"],"summary":"Approve All","description":"Commit every non-null mapping to `client_account_memory` and freeze the job.","operationId":"approve_all_api_v1_coa_jobs__job_uuid__approve_all_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}/findings/{event_uuid}/confirm":{"post":{"tags":["coa"],"summary":"Confirm Finding","description":"Human-in-the-loop gate: confirm (or reject with ``?reject=true``) a draft AI\nmapping decision. AI events are captured as ``draft``; only a permitted human\ntransitions them — 'AI proposes, humans approve'.","operationId":"confirm_finding_api_v1_coa_jobs__job_uuid__findings__event_uuid__confirm_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"event_uuid","in":"path","required":true,"schema":{"type":"string","title":"Event Uuid"}},{"name":"reject","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Reject"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/jobs/{job_uuid}":{"delete":{"tags":["coa"],"summary":"Delete Job","description":"Soft-delete the COA job (PG `coa_mapping_job` row; the client-level COA\ndocument is shared across the client's jobs and left untouched).","operationId":"delete_job_api_v1_coa_jobs__job_uuid__delete","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/coa/audit":{"get":{"tags":["coa"],"summary":"Query Audit","description":"Query the append-only audit trail by client / job / source.","operationId":"query_audit_api_v1_coa_audit_get","parameters":[{"name":"client_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uuid"}},{"name":"job_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/firms":{"post":{"tags":["cs"],"summary":"Create Firm","operationId":"create_firm_api_v1_cs_firms_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cs"],"summary":"List Firms","operationId":"list_firms_api_v1_cs_firms_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/firms/{firm_uuid}":{"get":{"tags":["cs"],"summary":"Get Firm","operationId":"get_firm_api_v1_cs_firms__firm_uuid__get","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["cs"],"summary":"Update Firm","operationId":"update_firm_api_v1_cs_firms__firm_uuid__patch","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/firms/{firm_uuid}/suspend":{"post":{"tags":["cs"],"summary":"Suspend Firm","operationId":"suspend_firm_api_v1_cs_firms__firm_uuid__suspend_post","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/firms/{firm_uuid}/users":{"post":{"tags":["cs"],"summary":"Add Partner","operationId":"add_partner_api_v1_cs_firms__firm_uuid__users_post","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cs"],"summary":"List Firm Users","operationId":"list_firm_users_api_v1_cs_firms__firm_uuid__users_get","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/firms/{firm_uuid}/branches":{"get":{"tags":["cs"],"summary":"List Firm Branches","operationId":"list_firm_branches_api_v1_cs_firms__firm_uuid__branches_get","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["cs"],"summary":"Add Branch","operationId":"add_branch_api_v1_cs_firms__firm_uuid__branches_post","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/firms/{firm_uuid}/branches/{branch_uuid}":{"patch":{"tags":["cs"],"summary":"Update Branch","operationId":"update_branch_api_v1_cs_firms__firm_uuid__branches__branch_uuid__patch","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}},{"name":"branch_uuid","in":"path","required":true,"schema":{"type":"string","title":"Branch Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__modules__organization__org_data_service__BranchUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/firms/{firm_uuid}/resend-invite/{user_uuid}":{"post":{"tags":["cs"],"summary":"Resend Invite","operationId":"resend_invite_api_v1_cs_firms__firm_uuid__resend_invite__user_uuid__post","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}},{"name":"user_uuid","in":"path","required":true,"schema":{"type":"string","title":"User Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/cs-team-users":{"get":{"tags":["cs"],"summary":"List Cs Team Users","operationId":"list_cs_team_users_api_v1_cs_cs_team_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/cs/firms/{firm_uuid}/grant-support":{"post":{"tags":["cs"],"summary":"Grant Support","operationId":"grant_support_api_v1_cs_firms__firm_uuid__grant_support_post","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantSupportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cs/users/{user_uuid}/reset-password":{"post":{"tags":["cs"],"summary":"Reset Password","operationId":"reset_password_api_v1_cs_users__user_uuid__reset_password_post","parameters":[{"name":"user_uuid","in":"path","required":true,"schema":{"type":"string","title":"User Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/requests":{"get":{"tags":["domain-support"],"summary":"List Requests","operationId":"list_requests_api_v1_domain_support_requests_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"request_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/my-orgs":{"get":{"tags":["domain-support"],"summary":"List My Orgs","description":"Orgs the support user can work on — the post-login picker.","operationId":"list_my_orgs_api_v1_domain_support_my_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/domain-support/assignees":{"get":{"tags":["domain-support"],"summary":"List Assignees","operationId":"list_assignees_api_v1_domain_support_assignees_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"job","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/requests/{request_uuid}":{"get":{"tags":["domain-support"],"summary":"Get Request","operationId":"get_request_api_v1_domain_support_requests__request_uuid__get","parameters":[{"name":"request_uuid","in":"path","required":true,"schema":{"type":"string","title":"Request Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/requests/{request_uuid}/assign":{"post":{"tags":["domain-support"],"summary":"Assign Request","operationId":"assign_request_api_v1_domain_support_requests__request_uuid__assign_post","parameters":[{"name":"request_uuid","in":"path","required":true,"schema":{"type":"string","title":"Request Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRequestPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/requests/{request_uuid}/resolve":{"post":{"tags":["domain-support"],"summary":"Resolve Request","operationId":"resolve_request_api_v1_domain_support_requests__request_uuid__resolve_post","parameters":[{"name":"request_uuid","in":"path","required":true,"schema":{"type":"string","title":"Request Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequestPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/requests/{request_uuid}/reopen":{"post":{"tags":["domain-support"],"summary":"Reopen Request","operationId":"reopen_request_api_v1_domain_support_requests__request_uuid__reopen_post","parameters":[{"name":"request_uuid","in":"path","required":true,"schema":{"type":"string","title":"Request Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/orgs/{firm_uuid}":{"get":{"tags":["domain-support"],"summary":"Get Org Detail","operationId":"get_org_detail_api_v1_domain_support_orgs__firm_uuid__get","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/orgs/{firm_uuid}/enter":{"post":{"tags":["domain-support"],"summary":"Enter Org","description":"Switch the support session's current-org context to `firm_uuid` so the\nuser can do real Practice-Portal setup. Allowed only if the user is the\nassignee of an active request for that firm (or a support admin).","operationId":"enter_org_api_v1_domain_support_orgs__firm_uuid__enter_post","parameters":[{"name":"firm_uuid","in":"path","required":true,"schema":{"type":"string","title":"Firm Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/domain-support/orgs/exit":{"post":{"tags":["domain-support"],"summary":"Exit Org","description":"Drop the entered-org context: re-mint with no firm so the support user\nreturns to the Support Dashboard.","operationId":"exit_org_api_v1_domain_support_orgs_exit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/domain-support/users":{"get":{"tags":["domain-support"],"summary":"List Support Users","operationId":"list_support_users_api_v1_domain_support_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["domain-support"],"summary":"Create Support User","operationId":"create_support_user_api_v1_domain_support_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupportUserPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/support/requests":{"post":{"tags":["support"],"summary":"Create Support Request","operationId":"create_support_request_api_v1_support_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/firm/me":{"get":{"tags":["practice"],"summary":"Get My Firm","operationId":"get_my_firm_api_v1_practice_firm_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/practice/firm/me/details":{"put":{"tags":["practice"],"summary":"Update Firm Details","operationId":"update_firm_details_api_v1_practice_firm_me_details_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmDetailsUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/firm/me/branches":{"get":{"tags":["practice"],"summary":"List Branches","operationId":"list_branches_api_v1_practice_firm_me_branches_get","parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["practice"],"summary":"Add Branch","operationId":"add_branch_api_v1_practice_firm_me_branches_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/firm/me/branches/{branch_uuid}":{"patch":{"tags":["practice"],"summary":"Update Branch","operationId":"update_branch_api_v1_practice_firm_me_branches__branch_uuid__patch","parameters":[{"name":"branch_uuid","in":"path","required":true,"schema":{"type":"string","title":"Branch Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__modules__practice__schemas__BranchUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["practice"],"summary":"Delete Branch","operationId":"delete_branch_api_v1_practice_firm_me_branches__branch_uuid__delete","parameters":[{"name":"branch_uuid","in":"path","required":true,"schema":{"type":"string","title":"Branch Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/firm/me/documents":{"get":{"tags":["practice"],"summary":"List Documents","operationId":"list_documents_api_v1_practice_firm_me_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["practice"],"summary":"Upload Document","operationId":"upload_document_api_v1_practice_firm_me_documents_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_api_v1_practice_firm_me_documents_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/firm/me/documents/{document_uuid}/download":{"get":{"tags":["practice"],"summary":"Download Document","operationId":"download_document_api_v1_practice_firm_me_documents__document_uuid__download_get","parameters":[{"name":"document_uuid","in":"path","required":true,"schema":{"type":"string","title":"Document Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/firm/me/users":{"get":{"tags":["practice"],"summary":"List Firm Users","operationId":"list_firm_users_api_v1_practice_firm_me_users_get","parameters":[{"name":"branch_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Branch Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["practice"],"summary":"Invite Teammate","operationId":"invite_teammate_api_v1_practice_firm_me_users_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeammateInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/firm/me/users/{user_uuid}":{"patch":{"tags":["practice"],"summary":"Patch Firm User","operationId":"patch_firm_user_api_v1_practice_firm_me_users__user_uuid__patch","parameters":[{"name":"user_uuid","in":"path","required":true,"schema":{"type":"string","title":"User Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmUserPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["practice"],"summary":"Delete Firm User","operationId":"delete_firm_user_api_v1_practice_firm_me_users__user_uuid__delete","parameters":[{"name":"user_uuid","in":"path","required":true,"schema":{"type":"string","title":"User Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/firm/me/users/{user_uuid}/resend-invite":{"post":{"tags":["practice"],"summary":"Resend Invite","operationId":"resend_invite_api_v1_practice_firm_me_users__user_uuid__resend_invite_post","parameters":[{"name":"user_uuid","in":"path","required":true,"schema":{"type":"string","title":"User Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/permissions-reference":{"get":{"tags":["practice"],"summary":"Permissions Reference","description":"Static lookup powering the Tab 2 right-side reference panel.","operationId":"permissions_reference_api_v1_practice_permissions_reference_get","parameters":[{"name":"_q","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":" Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"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","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Search"}},{"name":"branch_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Branch Uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"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","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clients/entity-types":{"get":{"tags":["clients"],"summary":"List Entity Types","description":"Entity-type options for the Create/Edit Client dropdown (curated set).","operationId":"list_entity_types_api_v1_clients_entity_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/clients/{client_uuid}":{"get":{"tags":["clients"],"summary":"Get Client","operationId":"get_client_api_v1_clients__client_uuid__get","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["clients"],"summary":"Patch Client","operationId":"patch_client_api_v1_clients__client_uuid__patch","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clients/{client_uuid}/jobs":{"get":{"tags":["clients"],"summary":"List Client Jobs","operationId":"list_client_jobs_api_v1_clients__client_uuid__jobs_get","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/me/home":{"get":{"tags":["client-portal"],"summary":"Get Home","operationId":"get_home_api_v1_client_me_home_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/client/me/questionnaire":{"get":{"tags":["client-portal"],"summary":"Get Questionnaire","operationId":"get_questionnaire_api_v1_client_me_questionnaire_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["client-portal"],"summary":"Submit Questionnaire","operationId":"submit_questionnaire_api_v1_client_me_questionnaire_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientQuestionnaireSubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/client/me/documents":{"get":{"tags":["client-portal"],"summary":"List Documents","operationId":"list_documents_api_v1_client_me_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/jobs":{"get":{"tags":["jobs"],"summary":"List Jobs","operationId":"list_jobs_api_v1_jobs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["jobs"],"summary":"Create Job","operationId":"create_job_api_v1_jobs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/types":{"get":{"tags":["jobs"],"summary":"List Job Types","description":"The active job-type lookup, for create/edit dropdowns (so the UI stops\nhardcoding types and stops auto-creating stray ones).","operationId":"list_job_types_api_v1_jobs_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/jobs/{job_uuid}":{"get":{"tags":["jobs"],"summary":"Get Job","operationId":"get_job_api_v1_jobs__job_uuid__get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["jobs"],"summary":"Patch Job","operationId":"patch_job_api_v1_jobs__job_uuid__patch","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/materiality-thresholds":{"get":{"tags":["materiality-thresholds"],"summary":"Get Effective Thresholds","operationId":"get_effective_thresholds_api_v1_materiality_thresholds_get","parameters":[{"name":"threshold_type","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"GL_MATERIALITY_THRESHOLDS","title":"Threshold Type"}},{"name":"job_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Job Type Id"}},{"name":"client_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Client Uuid"}},{"name":"job_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/materiality-thresholds/job-types":{"get":{"tags":["materiality-thresholds"],"summary":"List Job Types","operationId":"list_job_types_api_v1_materiality_thresholds_job_types_get","parameters":[{"name":"threshold_type","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"GL_MATERIALITY_THRESHOLDS","title":"Threshold Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/materiality-thresholds/organization":{"put":{"tags":["materiality-thresholds"],"summary":"Update Organization","operationId":"update_organization_api_v1_materiality_thresholds_organization_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgThresholdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["materiality-thresholds"],"summary":"Reset Organization","operationId":"reset_organization_api_v1_materiality_thresholds_organization_delete","parameters":[{"name":"threshold_type","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"GL_MATERIALITY_THRESHOLDS","title":"Threshold Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/materiality-thresholds/job-type/{job_type_id}":{"put":{"tags":["materiality-thresholds"],"summary":"Update Job Type","operationId":"update_job_type_api_v1_materiality_thresholds_job_type__job_type_id__put","parameters":[{"name":"job_type_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateJobTypeThresholdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["materiality-thresholds"],"summary":"Reset Job Type","operationId":"reset_job_type_api_v1_materiality_thresholds_job_type__job_type_id__delete","parameters":[{"name":"job_type_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Type Id"}},{"name":"threshold_type","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"GL_MATERIALITY_THRESHOLDS","title":"Threshold Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/materiality-thresholds/client/{client_uuid}":{"put":{"tags":["materiality-thresholds"],"summary":"Update Client","operationId":"update_client_api_v1_materiality_thresholds_client__client_uuid__put","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClientThresholdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["materiality-thresholds"],"summary":"Reset Client","operationId":"reset_client_api_v1_materiality_thresholds_client__client_uuid__delete","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}},{"name":"threshold_type","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"GL_MATERIALITY_THRESHOLDS","title":"Threshold Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/materiality-thresholds/job/{job_uuid}":{"put":{"tags":["materiality-thresholds"],"summary":"Update Job","operationId":"update_job_api_v1_materiality_thresholds_job__job_uuid__put","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateJobThresholdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["materiality-thresholds"],"summary":"Reset Job","operationId":"reset_job_api_v1_materiality_thresholds_job__job_uuid__delete","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"threshold_type","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"GL_MATERIALITY_THRESHOLDS","title":"Threshold Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clients/{client_uuid}/assignees":{"get":{"tags":["assignments"],"summary":"List Client Assignees","operationId":"list_client_assignees_api_v1_clients__client_uuid__assignees_get","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["assignments"],"summary":"Assign Client","operationId":"assign_client_api_v1_clients__client_uuid__assignees_post","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clients/{client_uuid}/assignees/{user_uuid}":{"delete":{"tags":["assignments"],"summary":"Unassign Client","operationId":"unassign_client_api_v1_clients__client_uuid__assignees__user_uuid__delete","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}},{"name":"user_uuid","in":"path","required":true,"schema":{"type":"string","title":"User Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_uuid}/assignees":{"get":{"tags":["assignments"],"summary":"List Job Assignees","operationId":"list_job_assignees_api_v1_jobs__job_uuid__assignees_get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["assignments"],"summary":"Assign Job","operationId":"assign_job_api_v1_jobs__job_uuid__assignees_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_uuid}/assignees/{user_uuid}":{"delete":{"tags":["assignments"],"summary":"Unassign Job","operationId":"unassign_job_api_v1_jobs__job_uuid__assignees__user_uuid__delete","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"user_uuid","in":"path","required":true,"schema":{"type":"string","title":"User Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memory/context":{"get":{"tags":["memory"],"summary":"Memory Context","description":"Live memory for the current scope.\n\nThe USER tier is actor-centric across all firms (a user's own history,\nwherever it landed — so a CS user sees the firms they create/manage). The\nCLIENT/JOB tiers, when in that route context, stay firm-private to the\ncaller's firm.","operationId":"memory_context_api_v1_memory_context_get","parameters":[{"name":"job_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"}},{"name":"client_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uuid"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Memory Context Api V1 Memory Context Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/tools":{"get":{"tags":["mcp"],"summary":"Get Tools","description":"Proxy tools/list to the mcp-read server.","operationId":"get_tools_api_v1_mcp_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/mcp/call":{"post":{"tags":["mcp"],"summary":"Post Call","description":"Proxy tools/call to the mcp-read server.","operationId":"post_call_api_v1_mcp_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/tenants/{xero_tenant_uuid}/resync":{"post":{"tags":["xero","xero"],"summary":"Resync Tenant","description":"Re-fetch a tenant's raw materials (delta by default, full re-baseline on\ndemand). Returns the dispatched run_id; progress streams on\n``xero_tenant_sync:<xero_tenant_uuid>``.","operationId":"resync_tenant_api_v1_xero_tenants__xero_tenant_uuid__resync_post","parameters":[{"name":"xero_tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Xero Tenant Uuid"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"^(delta|full)$","default":"delta","title":"Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resync Tenant Api V1 Xero Tenants  Xero Tenant Uuid  Resync Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/clients/{client_uuid}/raw-status":{"get":{"tags":["xero","xero"],"summary":"Raw Status","description":"Per-resource raw-import watermark for the client's bound tenant.","operationId":"raw_status_api_v1_xero_clients__client_uuid__raw_status_get","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Raw Status Api V1 Xero Clients  Client Uuid  Raw Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/jobs/{job_uuid}/general-ledger":{"get":{"tags":["xero","xero"],"summary":"General Ledger For Job","operationId":"general_ledger_for_job_api_v1_xero_jobs__job_uuid__general_ledger_get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response General Ledger For Job Api V1 Xero Jobs  Job Uuid  General Ledger Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/jobs/{job_uuid}/aged-payables":{"get":{"tags":["xero","xero"],"summary":"Aged Payables For Job","operationId":"aged_payables_for_job_api_v1_xero_jobs__job_uuid__aged_payables_get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Aged Payables For Job Api V1 Xero Jobs  Job Uuid  Aged Payables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/jobs/{job_uuid}/aged-receivables":{"get":{"tags":["xero","xero"],"summary":"Aged Receivables For Job","operationId":"aged_receivables_for_job_api_v1_xero_jobs__job_uuid__aged_receivables_get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Aged Receivables For Job Api V1 Xero Jobs  Job Uuid  Aged Receivables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/connect":{"post":{"tags":["xero"],"summary":"Connect","description":"Mint a Xero OAuth state and return the authorize URL the browser should visit.","operationId":"connect_api_v1_xero_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroConnectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/callback":{"get":{"tags":["xero"],"summary":"Callback","description":"Xero redirects here with ?code&state. Exchanges code, saves tokens + tenants.\n\nAuth is provided by the state token itself (minted by /connect, stored in\nRedis, single-use). No JWT cookie is required because Xero's user-agent\nredirect won't carry our cookies cross-site reliably.\n\nHandles both regular Xero OAuth and XPM OAuth flows via state lookup.","operationId":"callback_api_v1_xero_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/tenants":{"get":{"tags":["xero"],"summary":"List Tenants","operationId":"list_tenants_api_v1_xero_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroTenantListResponse"}}}}}}},"/api/v1/xero/tenants/{xero_tenant_uuid}/bind":{"post":{"tags":["xero"],"summary":"Bind Tenant","operationId":"bind_tenant_api_v1_xero_tenants__xero_tenant_uuid__bind_post","parameters":[{"name":"xero_tenant_uuid","in":"path","required":true,"schema":{"type":"string","title":"Xero Tenant Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroTenantBindRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroTenantBindResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/clients/{client_uuid}/status":{"get":{"tags":["xero"],"summary":"Client Status","operationId":"client_status_api_v1_xero_clients__client_uuid__status_get","parameters":[{"name":"client_uuid","in":"path","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroClientStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/sync/trial-balance":{"post":{"tags":["xero"],"summary":"Sync Trial Balance","operationId":"sync_trial_balance_api_v1_xero_sync_trial_balance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroSyncTrialBalanceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroSyncJobSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/sync/{xero_sync_job_uuid}":{"get":{"tags":["xero"],"summary":"Sync Status","operationId":"sync_status_api_v1_xero_sync__xero_sync_job_uuid__get","parameters":[{"name":"xero_sync_job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Xero Sync Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroSyncJobSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/jobs/{job_uuid}/trial-balance":{"get":{"tags":["xero"],"summary":"Trial Balance For Job","description":"Return parsed trial balance rows for the latest sync of this job.","operationId":"trial_balance_for_job_api_v1_xero_jobs__job_uuid__trial_balance_get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XeroTrialBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/grid-prefs/{grid_table}":{"get":{"tags":["grid-prefs"],"summary":"Get Prefs","operationId":"get_prefs_api_v1_grid_prefs__grid_table__get","parameters":[{"name":"grid_table","in":"path","required":true,"schema":{"type":"string","title":"Grid Table"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GridPrefsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["grid-prefs"],"summary":"Save Prefs","operationId":"save_prefs_api_v1_grid_prefs__grid_table__put","parameters":[{"name":"grid_table","in":"path","required":true,"schema":{"type":"string","title":"Grid Table"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GridPrefsBody"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/xpm/auth":{"post":{"tags":["xero-xpm"],"summary":"Xpm Auth","description":"Mint an XPM OAuth state and return the Xero authorize URL.\n\nThe frontend opens this URL in a popup window.  On completion Xero\nredirects to /xero/xpm/callback.","operationId":"xpm_auth_api_v1_xero_xpm_auth_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/xpm/auth-status":{"get":{"tags":["xero-xpm"],"summary":"Xpm Auth Status","description":"Poll endpoint: returns {connected: bool} for the popup to check after close.","operationId":"xpm_auth_status_api_v1_xero_xpm_auth_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/xpm/sync":{"post":{"tags":["xero-xpm"],"summary":"Xpm Sync","description":"Sync PRACTICEMANAGER tenants + pull XPM jobs into org_jobs.","operationId":"xpm_sync_api_v1_xero_xpm_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/xpm/organizations":{"get":{"tags":["xero-xpm"],"summary":"Xpm Organizations","description":"List PRACTICEMANAGER tenants connected to this firm.","operationId":"xpm_organizations_api_v1_xero_xpm_organizations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/xpm/refresh-token":{"post":{"tags":["xero-xpm"],"summary":"Xpm Refresh Token","description":"Manually force an XPM token refresh.","operationId":"xpm_refresh_token_api_v1_xero_xpm_refresh_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/xpm/disconnect":{"post":{"tags":["xero-xpm"],"summary":"Xpm Disconnect","description":"Deactivate the XPM credential and mark all PRACTICEMANAGER tenants offline.","operationId":"xpm_disconnect_api_v1_xero_xpm_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/partner-sync/organisations":{"get":{"tags":["xero-partner-sync"],"summary":"List Organisations","description":"List ORGANISATION tenants accessible via the Xero GL token.","operationId":"list_organisations_api_v1_xero_partner_sync_organisations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/partner-sync/add-clients":{"post":{"tags":["xero-partner-sync"],"summary":"Add Clients","description":"Create Zato clients from selected Xero ORGANISATION tenants.","operationId":"add_clients_api_v1_xero_partner_sync_add_clients_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddClientsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/partner-sync/connected-clients":{"get":{"tags":["xero-partner-sync"],"summary":"Connected Clients","description":"Zato clients that have a blue Xero tenant bound.","operationId":"connected_clients_api_v1_xero_partner_sync_connected_clients_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/partner-sync/xpm-clients":{"get":{"tags":["xero-partner-sync"],"summary":"Xpm Clients","description":"XPM practice client list (XML, green side).","operationId":"xpm_clients_api_v1_xero_partner_sync_xpm_clients_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/partner-sync/client-mappings":{"get":{"tags":["xero-partner-sync"],"summary":"Get Client Mappings","description":"Return existing Zato ↔ XPM client mappings.","operationId":"get_client_mappings_api_v1_xero_partner_sync_client_mappings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["xero-partner-sync"],"summary":"Save Client Mappings","description":"Persist confirmed Zato ↔ XPM client mappings (sets linked_with_xpm).","operationId":"save_client_mappings_api_v1_xero_partner_sync_client_mappings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveClientMappingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/partner-sync/xpm-jobs":{"get":{"tags":["xero-partner-sync"],"summary":"Xpm Jobs","description":"List all XPM jobs.  Side-effect: seeds GST into client.flags for linked clients.","operationId":"xpm_jobs_api_v1_xero_partner_sync_xpm_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/partner-sync/map-jobs":{"post":{"tags":["xero-partner-sync"],"summary":"Map Jobs","description":"Import + assign XPM jobs to Zato clients.","operationId":"map_jobs_api_v1_xero_partner_sync_map_jobs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapJobsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/partner-sync/synced-jobs":{"get":{"tags":["xero-partner-sync"],"summary":"Synced Jobs","description":"Return all XPM-sourced jobs for this firm.","operationId":"synced_jobs_api_v1_xero_partner_sync_synced_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/partner-sync/xpm-jobs-for-client":{"get":{"tags":["xero-partner-sync"],"summary":"Xpm Jobs For Client","description":"Return XPM jobs assigned to a specific Zato client.","operationId":"xpm_jobs_for_client_api_v1_xero_partner_sync_xpm_jobs_for_client_get","parameters":[{"name":"client_uuid","in":"query","required":true,"schema":{"type":"string","title":"Client Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/partner-sync/disconnect-clients":{"post":{"tags":["xero-partner-sync"],"summary":"Disconnect Client","description":"Remove XPM mapping for a single Zato client.","operationId":"disconnect_client_api_v1_xero_partner_sync_disconnect_clients_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectClientRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/xero/partner-sync/disconnect-xero":{"post":{"tags":["xero-partner-sync"],"summary":"Disconnect Xero","description":"Deactivate the Xero GL credential + mark ORGANISATION tenants offline.","operationId":"disconnect_xero_api_v1_xero_partner_sync_disconnect_xero_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/xero/partner-sync/disconnect-xpm":{"post":{"tags":["xero-partner-sync"],"summary":"Disconnect Xpm","description":"Deactivate the XPM credential + mark PRACTICEMANAGER tenants offline.","operationId":"disconnect_xpm_api_v1_xero_partner_sync_disconnect_xpm_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/zbox/tree":{"get":{"tags":["zbox"],"summary":"Get Tree","operationId":"get_tree_api_v1_zbox_tree_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/zbox/integrations/tree":{"get":{"tags":["zbox"],"summary":"Get Integration Tree","operationId":"get_integration_tree_api_v1_zbox_integrations_tree_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/zbox/integrations/link":{"post":{"tags":["zbox"],"summary":"Link Integration Node","operationId":"link_integration_node_api_v1_zbox_integrations_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkNodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zbox/files":{"get":{"tags":["zbox"],"summary":"List Files","operationId":"list_files_api_v1_zbox_files_get","parameters":[{"name":"client_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uuid"}},{"name":"job_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"State"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Category"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Provider"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Q"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"updated_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Order"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zbox/files/{file_uuid}":{"get":{"tags":["zbox"],"summary":"Get File","operationId":"get_file_api_v1_zbox_files__file_uuid__get","parameters":[{"name":"file_uuid","in":"path","required":true,"schema":{"type":"string","title":"File Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["zbox"],"summary":"Delete File","operationId":"delete_file_api_v1_zbox_files__file_uuid__delete","parameters":[{"name":"file_uuid","in":"path","required":true,"schema":{"type":"string","title":"File Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zbox/files/{file_uuid}/view-url":{"get":{"tags":["zbox"],"summary":"File View Url","operationId":"file_view_url_api_v1_zbox_files__file_uuid__view_url_get","parameters":[{"name":"file_uuid","in":"path","required":true,"schema":{"type":"string","title":"File Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zbox/files/{file_uuid}/link":{"post":{"tags":["zbox"],"summary":"Link File","operationId":"link_file_api_v1_zbox_files__file_uuid__link_post","parameters":[{"name":"file_uuid","in":"path","required":true,"schema":{"type":"string","title":"File Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zbox/files/link":{"post":{"tags":["zbox"],"summary":"Bulk Link Files","operationId":"bulk_link_files_api_v1_zbox_files_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/zbox/files/upload":{"post":{"tags":["zbox"],"summary":"Upload File","operationId":"upload_file_api_v1_zbox_files_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_v1_zbox_files_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Healthz Healthz Get"}}}}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"token":{"type":"string","maxLength":512,"minLength":8,"title":"Token"},"email":{"type":"string","format":"email","title":"Email"},"new_password":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"New Password"}},"type":"object","required":["token","email"],"title":"AcceptInviteRequest"},"AddClientsRequest":{"properties":{"tenant_external_ids":{"items":{"type":"string"},"type":"array","title":"Tenant External Ids"}},"type":"object","required":["tenant_external_ids"],"title":"AddClientsRequest"},"AddSectionIn":{"properties":{"base_parent_key":{"type":"string","maxLength":255,"minLength":1,"title":"Base Parent Key"}},"type":"object","required":["base_parent_key"],"title":"AddSectionIn"},"AiGatewayIn":{"properties":{"prompt":{"type":"string","maxLength":4000,"minLength":1,"title":"Prompt"},"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System"},"max_tokens":{"type":"integer","maximum":4096.0,"minimum":16.0,"title":"Max Tokens","default":512},"temperature":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Temperature","default":0.2}},"type":"object","required":["prompt"],"title":"AiGatewayIn"},"AssignRequest":{"properties":{"user_uuid":{"type":"string","title":"User Uuid"},"type":{"type":"string","title":"Type","default":"member"}},"type":"object","required":["user_uuid"],"title":"AssignRequest"},"AssignRequestPayload":{"properties":{"assignee_user_uuid":{"type":"string","title":"Assignee User Uuid"}},"type":"object","required":["assignee_user_uuid"],"title":"AssignRequestPayload"},"Body_upload_document_api_v1_practice_firm_me_documents_post":{"properties":{"document_type":{"type":"string","title":"Document Type"},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["document_type","file"],"title":"Body_upload_document_api_v1_practice_firm_me_documents_post"},"Body_upload_file_api_v1_zbox_files_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"job_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Uuid"},"client_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uuid"}},"type":"object","required":["file"],"title":"Body_upload_file_api_v1_zbox_files_upload_post"},"Body_upload_tb_api_v1_coa_jobs__job_uuid__tb_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"upload_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Kind"}},"type":"object","required":["file"],"title":"Body_upload_tb_api_v1_coa_jobs__job_uuid__tb_upload_post"},"BranchCreate":{"properties":{"branch_name":{"type":"string","maxLength":255,"minLength":1,"title":"Branch Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["branch_name"],"title":"BranchCreate","description":"One branch/office row in the onboarding form."},"BranchRequest":{"properties":{"branch_name":{"type":"string","maxLength":255,"minLength":1,"title":"Branch Name"},"branch_code":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Branch Code"},"contact_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Phone"},"is_primary":{"type":"boolean","title":"Is Primary","default":false},"manager_user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manager User Uuid"}},"type":"object","required":["branch_name"],"title":"BranchRequest"},"BulkLinkRequest":{"properties":{"file_uuids":{"items":{"type":"string"},"type":"array","title":"File Uuids"},"job_uuid":{"type":"string","title":"Job Uuid"}},"type":"object","required":["file_uuids","job_uuid"],"title":"BulkLinkRequest"},"BulkUploadIn":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"csv_text":{"type":"string","maxLength":1000000,"minLength":1,"title":"Csv Text"}},"type":"object","required":["filename","csv_text"],"title":"BulkUploadIn"},"CallToolRequest":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments"}},"type":"object","required":["name"],"title":"CallToolRequest"},"ClientCreateRequest":{"properties":{"client_name":{"type":"string","title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"client_mobile_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Mobile Number"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"business_structure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Structure"},"ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ird Number"},"balance_month":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Month"},"balance_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Balance Date"},"is_xero":{"type":"boolean","title":"Is Xero","default":false},"group_id_ref":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id Ref"},"client_type_id_ref":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Type Id Ref"},"client_entity_type_id_ref":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Entity Type Id Ref"},"external_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Info"},"branch_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Uuid"},"send_portal_invite":{"type":"boolean","title":"Send Portal Invite","default":false}},"type":"object","required":["client_name"],"title":"ClientCreateRequest"},"ClientMappingItem":{"properties":{"zatoClientUuid":{"type":"string","title":"Zatoclientuuid"},"xpmClientXeroId":{"type":"string","title":"Xpmclientxeroid"}},"type":"object","required":["zatoClientUuid","xpmClientXeroId"],"title":"ClientMappingItem"},"ClientPatchRequest":{"properties":{"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"client_mobile_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Mobile Number"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"business_structure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Structure"},"ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ird Number"},"balance_month":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Month"},"balance_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Balance Date"},"is_xero":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Xero"},"group_id_ref":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id Ref"},"client_type_id_ref":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Type Id Ref"},"client_entity_type_id_ref":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Entity Type Id Ref"},"external_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Info"},"branch_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Uuid"},"is_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Deleted"}},"type":"object","title":"ClientPatchRequest"},"ClientQuestionnaireSubmit":{"properties":{"template_id":{"type":"string","title":"Template Id"},"answers":{"items":{"$ref":"#/components/schemas/QuestionnaireAnswer"},"type":"array","title":"Answers"},"submit":{"type":"boolean","title":"Submit","default":false}},"type":"object","required":["template_id","answers"],"title":"ClientQuestionnaireSubmit"},"ColOverride":{"properties":{"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"text_align":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Align"},"editable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Editable"},"show_info":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Info"}},"type":"object","title":"ColOverride","description":"Per-column display overrides set via the Grid Settings drawer."},"ComputeRequest":{"properties":{"a":{"type":"integer","maximum":1000000000.0,"minimum":-1000000000.0,"title":"A"},"b":{"type":"integer","maximum":1000000000.0,"minimum":-1000000000.0,"title":"B"}},"type":"object","required":["a","b"],"title":"ComputeRequest"},"CreateJobIn":{"properties":{"client_uuid":{"type":"string","minLength":1,"title":"Client Uuid"},"job_name":{"type":"string","maxLength":255,"minLength":1,"title":"Job Name"},"financial_year":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Financial Year"},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End"},"job_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Job Type"}},"type":"object","required":["client_uuid","job_name"],"title":"CreateJobIn"},"CreateRequestPayload":{"properties":{"subject":{"type":"string","title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"priority":{"type":"string","title":"Priority","default":"normal"}},"type":"object","required":["subject"],"title":"CreateRequestPayload"},"CreateSupportUserPayload":{"properties":{"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role_key":{"type":"string","title":"Role Key"}},"type":"object","required":["email","full_name","role_key"],"title":"CreateSupportUserPayload"},"DisconnectClientRequest":{"properties":{"client_uuid":{"type":"string","title":"Client Uuid"}},"type":"object","required":["client_uuid"],"title":"DisconnectClientRequest"},"DocumentAgentIn":{"properties":{"text":{"type":"string","maxLength":50000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"DocumentAgentIn"},"FirmCreateRequest":{"properties":{"practice_name":{"type":"string","maxLength":255,"minLength":1,"title":"Practice Name"},"engagement_type":{"type":"string","enum":["pilot","evaluation","dev","staging","uat","production"],"title":"Engagement Type","default":"pilot"},"agreement_signed":{"type":"boolean","title":"Agreement Signed","default":false},"gocardless_signed":{"type":"boolean","title":"Gocardless Signed","default":false},"request_support_access":{"type":"boolean","title":"Request Support Access","default":false},"billing_contact_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Billing Contact Name"},"billing_contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Billing Contact Email"},"customer_success_manager_uuid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Customer Success Manager Uuid"},"start_date":{"type":"string","format":"date","title":"Start Date"},"number_of_jobs":{"type":"integer","multipleOf":5.0,"minimum":5.0,"title":"Number Of Jobs","default":5},"branches":{"items":{"$ref":"#/components/schemas/BranchCreate"},"type":"array","title":"Branches","default":[]},"partners":{"items":{"$ref":"#/components/schemas/PartnerCreate"},"type":"array","title":"Partners","default":[]}},"type":"object","required":["practice_name","start_date"],"title":"FirmCreateRequest"},"FirmDetailsUpdateRequest":{"properties":{"firm_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Firm Name"},"firm_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Firm Email"},"firm_primary_phone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Firm Primary Phone"},"firm_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firm Address"},"suburb":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Suburb"},"firm_pincode":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Firm Pincode"}},"type":"object","title":"FirmDetailsUpdateRequest"},"FirmUpdateRequest":{"properties":{"firm_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Firm Name"},"billing_contact_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Billing Contact Name"},"billing_contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Billing Contact Email"},"number_of_jobs":{"anyOf":[{"type":"integer","multipleOf":5.0,"minimum":5.0},{"type":"null"}],"title":"Number Of Jobs"},"is_pilot_agreement_signed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pilot Agreement Signed"},"is_gocardless_mandate_signed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Gocardless Mandate Signed"},"is_support_request_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Support Request Access"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"users":{"items":{"$ref":"#/components/schemas/UserUpdateInFirm"},"type":"array","title":"Users","default":[]}},"type":"object","title":"FirmUpdateRequest"},"FirmUserPatchRequest":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"},"role_level":{"anyOf":[{"type":"integer","enum":[1,2,3,4,5,6]},{"type":"null"}],"title":"Role Level"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"auth_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Type"},"branch_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Uuid"},"is_branch_head":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Branch Head"}},"type":"object","title":"FirmUserPatchRequest"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"GrantSupportRequest":{"properties":{"user_uuid":{"type":"string","maxLength":64,"minLength":1,"title":"User Uuid"},"role_name":{"type":"string","maxLength":128,"minLength":1,"title":"Role Name"}},"type":"object","required":["user_uuid","role_name"],"title":"GrantSupportRequest"},"GridPrefsBody":{"properties":{"col_order":{"items":{"type":"string"},"type":"array","title":"Col Order"},"col_hidden":{"items":{"type":"string"},"type":"array","title":"Col Hidden"},"col_widths":{"additionalProperties":{"type":"number"},"type":"object","title":"Col Widths"},"col_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ColOverride"},"type":"object","title":"Col Overrides"},"panel_group_by":{"type":"string","title":"Panel Group By","default":""},"panel_agg_funcs":{"additionalProperties":{"type":"string"},"type":"object","title":"Panel Agg Funcs"},"show_grid_lines":{"type":"boolean","title":"Show Grid Lines","default":true},"show_search":{"type":"boolean","title":"Show Search","default":true},"saved_at":{"type":"string","title":"Saved At","default":""},"grid_version":{"type":"integer","title":"Grid Version","default":1}},"type":"object","title":"GridPrefsBody"},"GridPrefsResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"grid_table":{"type":"string","title":"Grid Table"},"prefs":{"$ref":"#/components/schemas/GridPrefsBody"}},"type":"object","required":["user_id","grid_table","prefs"],"title":"GridPrefsResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobCreateRequest":{"properties":{"client_uuid":{"type":"string","title":"Client Uuid"},"job_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Code"},"job_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Name"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"status":{"type":"string","title":"Status","default":"open"},"financial_year":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Financial Year"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"},"job_source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Source Name"},"external_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Info"},"request_support":{"type":"boolean","title":"Request Support","default":false}},"type":"object","required":["client_uuid"],"title":"JobCreateRequest"},"JobMappingItem":{"properties":{"zatoClientUuid":{"type":"string","title":"Zatoclientuuid"},"xpmJobXeroId":{"type":"string","title":"Xpmjobxeroid"},"jobData":{"additionalProperties":true,"type":"object","title":"Jobdata","default":{}}},"type":"object","required":["zatoClientUuid","xpmJobXeroId"],"title":"JobMappingItem"},"JobPatchRequest":{"properties":{"job_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Name"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"financial_year":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Financial Year"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"coa_file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coa File Name"},"is_zato":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Zato"},"is_processing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Processing"},"is_ready_for_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ready For Review"},"is_ready_for_signoff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ready For Signoff"},"external_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"External Info"},"is_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Deleted"}},"type":"object","title":"JobPatchRequest"},"LinkFileRequest":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"}},"type":"object","required":["job_uuid"],"title":"LinkFileRequest"},"LinkNodeRequest":{"properties":{"provider":{"type":"string","title":"Provider"},"folder_ids":{"items":{"type":"string"},"type":"array","title":"Folder Ids"},"job_uuid":{"type":"string","title":"Job Uuid"}},"type":"object","required":["provider","folder_ids","job_uuid"],"title":"LinkNodeRequest"},"LoginBeginRequest":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"google|microsoft|apple|cognito"}},"type":"object","title":"LoginBeginRequest"},"LoginPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":255,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginPasswordRequest"},"MapJobsRequest":{"properties":{"jobMappings":{"items":{"$ref":"#/components/schemas/JobMappingItem"},"type":"array","title":"Jobmappings"}},"type":"object","required":["jobMappings"],"title":"MapJobsRequest"},"PartnerAddRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"role_level":{"type":"integer","enum":[1,2,3,4,5,6],"title":"Role Level"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"}},"type":"object","required":["name","email","role_level"],"title":"PartnerAddRequest"},"PartnerCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"role_level":{"type":"integer","enum":[1,2,3,4,5,6],"title":"Role Level"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"},"branch_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Index"}},"type":"object","required":["name","email","role_level"],"title":"PartnerCreate","description":"One row of the legacy partners table on the Add-Practice modal."},"PipelineIn":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"csv_text":{"type":"string","maxLength":1000000,"minLength":1,"title":"Csv Text"},"sample_text_for_classifier":{"type":"string","maxLength":10000,"minLength":1,"title":"Sample Text For Classifier"},"ai_prompt":{"type":"string","maxLength":2000,"minLength":1,"title":"Ai Prompt"}},"type":"object","required":["filename","csv_text","sample_text_for_classifier","ai_prompt"],"title":"PipelineIn","description":"Chains bulk-upload -> document-agent -> ai-gateway in one orchestration."},"QuestionnaireAnswer":{"properties":{"id":{"type":"string","title":"Id"},"answer":{"type":"string","title":"Answer"}},"type":"object","required":["id","answer"],"title":"QuestionnaireAnswer"},"ResetPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","maxLength":16,"minLength":4,"title":"Code"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["email","code","new_password"],"title":"ResetPasswordRequest"},"ResolveRequestPayload":{"properties":{"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Note"}},"type":"object","title":"ResolveRequestPayload"},"SaveClientMappingsRequest":{"properties":{"mappings":{"items":{"$ref":"#/components/schemas/ClientMappingItem"},"type":"array","title":"Mappings"}},"type":"object","required":["mappings"],"title":"SaveClientMappingsRequest"},"SetNewPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"},"session_token":{"type":"string","maxLength":4096,"minLength":8,"title":"Session Token"}},"type":"object","required":["email","new_password","session_token"],"title":"SetNewPasswordRequest","description":"Used to complete Cognito's NEW_PASSWORD_REQUIRED challenge (first login\nafter a temp password from the welcome / invite email)."},"TeammateInviteRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"role_level":{"type":"integer","enum":[1,2,3,4,5,6],"title":"Role Level"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"},"auth_type":{"type":"string","maxLength":32,"title":"Auth Type","default":"manual"},"branch_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Uuid"},"is_branch_head":{"type":"boolean","title":"Is Branch Head","default":false}},"type":"object","required":["name","email","role_level"],"title":"TeammateInviteRequest"},"UpdateClientThresholdsRequest":{"properties":{"threshold_type":{"type":"string","enum":["GL_MATERIALITY_THRESHOLDS","WORKPAPER_THRESHOLDS"],"title":"Threshold Type","default":"GL_MATERIALITY_THRESHOLDS"},"threshold_data":{"additionalProperties":true,"type":"object","title":"Threshold Data"}},"type":"object","required":["threshold_data"],"title":"UpdateClientThresholdsRequest"},"UpdateJobThresholdsRequest":{"properties":{"threshold_type":{"type":"string","enum":["GL_MATERIALITY_THRESHOLDS","WORKPAPER_THRESHOLDS"],"title":"Threshold Type","default":"GL_MATERIALITY_THRESHOLDS"},"threshold_data":{"additionalProperties":true,"type":"object","title":"Threshold Data"}},"type":"object","required":["threshold_data"],"title":"UpdateJobThresholdsRequest"},"UpdateJobTypeThresholdsRequest":{"properties":{"threshold_type":{"type":"string","enum":["GL_MATERIALITY_THRESHOLDS","WORKPAPER_THRESHOLDS"],"title":"Threshold Type","default":"GL_MATERIALITY_THRESHOLDS"},"threshold_data":{"additionalProperties":true,"type":"object","title":"Threshold Data"}},"type":"object","required":["threshold_data"],"title":"UpdateJobTypeThresholdsRequest"},"UpdateMappingIn":{"properties":{"parent_key":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Parent Key"},"section":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Section"}},"type":"object","title":"UpdateMappingIn"},"UpdateOrgThresholdsRequest":{"properties":{"threshold_type":{"type":"string","enum":["GL_MATERIALITY_THRESHOLDS","WORKPAPER_THRESHOLDS"],"title":"Threshold Type","default":"GL_MATERIALITY_THRESHOLDS"},"threshold_data":{"additionalProperties":true,"type":"object","title":"Threshold Data"}},"type":"object","required":["threshold_data"],"title":"UpdateOrgThresholdsRequest"},"UserUpdateInFirm":{"properties":{"user_uuid":{"type":"string","title":"User Uuid"},"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name"},"role_level":{"anyOf":[{"type":"integer","enum":[1,2,3,4,5,6]},{"type":"null"}],"title":"Role Level"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","required":["user_uuid"],"title":"UserUpdateInFirm"},"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"},"VerifyOtpRequest":{"properties":{"code":{"type":"string","maxLength":10,"minLength":4,"title":"Code"}},"type":"object","required":["code"],"title":"VerifyOtpRequest"},"XeroClientStatusResponse":{"properties":{"client_uuid":{"type":"string","title":"Client Uuid"},"is_connected":{"type":"boolean","title":"Is Connected"},"xero_tenant_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xero Tenant Uuid"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"tenant_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Type"},"bound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bound At"}},"type":"object","required":["client_uuid","is_connected","xero_tenant_uuid","tenant_name","tenant_type","bound_at"],"title":"XeroClientStatusResponse"},"XeroConnectRequest":{"properties":{"client_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uuid","description":"Optional. If provided, the FIRST tenant returned by Xero gets auto-bound to this client on callback (so the user doesn't have to pick afterwards)."},"token_type":{"type":"string","title":"Token Type","description":"'XERO' for accounting GL flow, 'XPM' for Practice Manager flow.","default":"XERO"}},"type":"object","title":"XeroConnectRequest","description":"Body of POST /xero/connect."},"XeroConnectResponse":{"properties":{"authorize_url":{"type":"string","title":"Authorize Url"},"state":{"type":"string","title":"State"}},"type":"object","required":["authorize_url","state"],"title":"XeroConnectResponse"},"XeroSyncJobSummary":{"properties":{"xero_sync_job_uuid":{"type":"string","title":"Xero Sync Job Uuid"},"status":{"type":"string","title":"Status"},"resource_type":{"type":"string","title":"Resource Type"},"report_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Report Date"},"trace_id":{"type":"string","title":"Trace Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["xero_sync_job_uuid","status","resource_type","report_date","trace_id","error_message","started_at","finished_at","created_at","updated_at"],"title":"XeroSyncJobSummary"},"XeroSyncTrialBalanceRequest":{"properties":{"client_uuid":{"type":"string","title":"Client Uuid"},"job_uuid":{"type":"string","title":"Job Uuid"},"xero_tenant_uuid":{"type":"string","title":"Xero Tenant Uuid"},"report_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Report Date"}},"type":"object","required":["client_uuid","job_uuid","xero_tenant_uuid"],"title":"XeroSyncTrialBalanceRequest"},"XeroTenantBindRequest":{"properties":{"client_uuid":{"type":"string","title":"Client Uuid"}},"type":"object","required":["client_uuid"],"title":"XeroTenantBindRequest"},"XeroTenantBindResponse":{"properties":{"xero_tenant_uuid":{"type":"string","title":"Xero Tenant Uuid"},"client_uuid":{"type":"string","title":"Client Uuid"},"bound_at":{"type":"string","format":"date-time","title":"Bound At"}},"type":"object","required":["xero_tenant_uuid","client_uuid","bound_at"],"title":"XeroTenantBindResponse"},"XeroTenantListResponse":{"properties":{"tenants":{"items":{"$ref":"#/components/schemas/XeroTenantSummary"},"type":"array","title":"Tenants"}},"type":"object","required":["tenants"],"title":"XeroTenantListResponse"},"XeroTenantSummary":{"properties":{"xero_tenant_uuid":{"type":"string","title":"Xero Tenant Uuid"},"xero_tenant_external_id":{"type":"string","title":"Xero Tenant External Id"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"tenant_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Type"},"client_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uuid"},"is_active":{"type":"boolean","title":"Is Active"},"bound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bound At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["xero_tenant_uuid","xero_tenant_external_id","tenant_name","tenant_type","client_uuid","is_active","bound_at","created_at"],"title":"XeroTenantSummary"},"XeroTrialBalanceResponse":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"report_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Date"},"rows":{"items":{"$ref":"#/components/schemas/XeroTrialBalanceRow"},"type":"array","title":"Rows"},"totals":{"additionalProperties":{"type":"number"},"type":"object","title":"Totals"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Status"}},"type":"object","required":["job_uuid","report_date","rows","totals","last_synced_at","sync_status"],"title":"XeroTrialBalanceResponse"},"XeroTrialBalanceRow":{"properties":{"xero_trial_balance_uuid":{"type":"string","title":"Xero Trial Balance Uuid"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"account_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Code"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"},"debit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Debit"},"credit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit"},"ytd_debit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ytd Debit"},"ytd_credit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ytd Credit"},"balance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Type"}},"type":"object","required":["xero_trial_balance_uuid","section","account_code","account_name","debit","credit","ytd_debit","ytd_credit","balance_type"],"title":"XeroTrialBalanceRow"},"app__modules__organization__org_data_service__BranchUpdateRequest":{"properties":{"branch_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Branch Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"is_primary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Primary"}},"type":"object","title":"BranchUpdateRequest"},"app__modules__practice__schemas__BranchUpdateRequest":{"properties":{"branch_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Branch Name"},"branch_code":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Branch Code"},"contact_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Phone"},"is_primary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Primary"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"manager_user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manager User Uuid"}},"type":"object","title":"BranchUpdateRequest"}}}}