{"openapi":"3.1.0","info":{"title":"Gumruk AI API","description":"Kaynakli mevzuat ve GTIP arastirma copilot'u - Saha V3 (vergi/GTIP arama + güvenlik V1 + ops hardening).","version":"0.3.0"},"paths":{"/rag/source/{chunk_id}/context":{"get":{"summary":"Rag Source Context","description":"Atıf yapılan chunk'ı belgenin içinde komşu chunk'larla (±window) döndürür.\n\nFrontend bunu 'kaynak okuyucu' önizlemesinde kullanır: atıf pasajını\nvurgular, komşuları bağlam için gösterir. Yerel dosya varsa indirilebilir.","operationId":"rag_source_context_rag_source__chunk_id__context_get","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"default","title":"Tenant Id"}},{"name":"window","in":"query","required":false,"schema":{"type":"integer","maximum":6,"minimum":0,"default":2,"title":"Window"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/source/{chunk_id}/file":{"get":{"summary":"Rag Source File","description":"Atıf kaynağının diskteki orijinal dosyasını (PDF/HTML) serve eder.\n\n`download=1` → tarayıcı indirir (attachment); aksi halde inline (önizleme).\nYerel dosya yoksa 404 (frontend `source_url` canlı linke düşer).","operationId":"rag_source_file_rag_source__chunk_id__file_get","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"default","title":"Tenant Id"}},{"name":"download","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Download"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/query":{"post":{"summary":"Rag Query","operationId":"rag_query_rag_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RagQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RagQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/feedback":{"post":{"summary":"Feedback","operationId":"feedback_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login/2fa":{"post":{"tags":["auth"],"summary":"Login 2Fa","operationId":"login_2fa_auth_login_2fa_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login2FARequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Logout Auth Logout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/auth/2fa/enroll":{"post":{"tags":["auth"],"summary":"Totp Enroll","operationId":"totp_enroll_auth_2fa_enroll_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpEnrollResponse"}}}}}}},"/auth/2fa/verify":{"post":{"tags":["auth"],"summary":"Totp Verify","operationId":"totp_verify_auth_2fa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Totp Verify Auth 2Fa Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/2fa/disable":{"post":{"tags":["auth"],"summary":"Totp Disable","operationId":"totp_disable_auth_2fa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpDisableRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Totp Disable Auth 2Fa Disable Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/2fa/recovery-codes/regenerate":{"post":{"tags":["auth"],"summary":"Totp Regenerate Recovery Codes","operationId":"totp_regenerate_recovery_codes_auth_2fa_recovery_codes_regenerate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpRecoveryRegenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpRecoveryRegenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signup":{"post":{"tags":["onboarding"],"summary":"Signup","operationId":"signup_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signup/verify":{"post":{"tags":["onboarding"],"summary":"Signup Verify","operationId":"signup_verify_signup_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Verify Signup Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signup/resend-verification":{"post":{"tags":["onboarding"],"summary":"Signup Resend Verification","operationId":"signup_resend_verification_signup_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Resend Verification Signup Resend Verification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/password/forgot":{"post":{"tags":["onboarding"],"summary":"Password Forgot","operationId":"password_forgot_password_forgot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Password Forgot Password Forgot Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/password/reset":{"post":{"tags":["onboarding"],"summary":"Password Reset","operationId":"password_reset_password_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Password Reset Password Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations":{"get":{"tags":["onboarding"],"summary":"List Invitations","operationId":"list_invitations_invitations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationListResponse"}}}}}},"post":{"tags":["onboarding"],"summary":"Create Invitation","operationId":"create_invitation_invitations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{invitation_id}":{"delete":{"tags":["onboarding"],"summary":"Revoke Invitation","operationId":"revoke_invitation_invitations__invitation_id__delete","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Invitation Invitations  Invitation Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{token}/accept":{"post":{"tags":["onboarding"],"summary":"Accept Invitation","operationId":"accept_invitation_invitations__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":512,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/{tenant_id}/members":{"get":{"tags":["onboarding"],"summary":"List Tenant Members","operationId":"list_tenant_members_tenants__tenant_id__members_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/{tenant_id}/members/{user_id}":{"patch":{"tags":["onboarding"],"summary":"Patch Tenant Member","operationId":"patch_tenant_member_tenants__tenant_id__members__user_id__patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["onboarding"],"summary":"Remove Tenant Member","operationId":"remove_tenant_member_tenants__tenant_id__members__user_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Tenant Member Tenants  Tenant Id  Members  User Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/{tenant_id}/suspend":{"post":{"tags":["onboarding"],"summary":"Suspend Tenant Endpoint","operationId":"suspend_tenant_endpoint_tenants__tenant_id__suspend_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantLifecycleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/{tenant_id}/reactivate":{"post":{"tags":["onboarding"],"summary":"Reactivate Tenant Endpoint","operationId":"reactivate_tenant_endpoint_tenants__tenant_id__reactivate_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantLifecycleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/legal":{"get":{"tags":["legal"],"summary":"List Legal Documents","description":"Return the list of published legal documents with versions + summaries.\n\nNo body_markdown is returned — clients should hit ``/legal/{kind}`` for\nthe Markdown source.","operationId":"list_legal_documents_legal_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalIndexResponse"}}}}}}},"/legal/sub-processors/structured":{"get":{"tags":["legal"],"summary":"List Sub Processors","description":"Return the parsed sub-processor table as JSON (UI-friendly).","operationId":"list_sub_processors_legal_sub_processors_structured_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubProcessorListResponse"}}}}}}},"/legal/{kind}":{"get":{"tags":["legal"],"summary":"Get Legal Document","description":"Return a single legal document including its Markdown body.","operationId":"get_legal_document_legal__kind__get","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":32,"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/legal/consent":{"get":{"tags":["legal"],"summary":"List My Consents","description":"Return the consent history for the authenticated user.","operationId":"list_my_consents_legal_consent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentListResponse"}}}}}},"post":{"tags":["legal"],"summary":"Record User Consent","description":"Persist a consent record for the authenticated user.","operationId":"record_user_consent_legal_consent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/legal/consent/{kind}":{"delete":{"tags":["legal"],"summary":"Withdraw User Consent","description":"Mark all active consents of ``kind`` for the user as withdrawn.","operationId":"withdraw_user_consent_legal_consent__kind__delete","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":32,"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Withdraw User Consent Legal Consent  Kind  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/retention/policies":{"get":{"tags":["retention"],"summary":"Get Policies","operationId":"get_policies_retention_policies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPolicyListResponse"}}}}}}},"/retention/policies/{kind}":{"patch":{"tags":["retention"],"summary":"Patch Policy","operationId":"patch_policy_retention_policies__kind__patch","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPolicyPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPolicyModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/retention/purge":{"post":{"tags":["retention"],"summary":"Post Purge","operationId":"post_purge_retention_purge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeReportResponse"}}}}}}},"/retention/archive":{"post":{"tags":["retention"],"summary":"Post Archive","operationId":"post_archive_retention_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditArchiveRunResponse"}}}}}}},"/retention/audit-archives":{"get":{"tags":["retention"],"summary":"Get Audit Archives","operationId":"get_audit_archives_retention_audit_archives_get","parameters":[{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditArchiveListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/retention/audit-archives/{archive_id}":{"get":{"tags":["retention"],"summary":"Get Audit Archive","operationId":"get_audit_archive_retention_audit_archives__archive_id__get","parameters":[{"name":"archive_id","in":"path","required":true,"schema":{"type":"integer","title":"Archive Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditArchiveModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me":{"delete":{"tags":["erasure"],"summary":"Delete My Account","operationId":"delete_my_account_users_me_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErasureResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me/restore":{"post":{"tags":["erasure"],"summary":"Restore My Account","operationId":"restore_my_account_users_me_restore_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErasureResponseModel"}}}}}}},"/users/me/erasure-requests":{"get":{"tags":["erasure"],"summary":"List My Erasure Requests","operationId":"list_my_erasure_requests_users_me_erasure_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErasureListResponse"}}}}}}},"/tenants/{tenant_id}":{"delete":{"tags":["erasure"],"summary":"Delete Tenant","operationId":"delete_tenant_tenants__tenant_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErasureResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/{tenant_id}/restore":{"post":{"tags":["erasure"],"summary":"Restore Tenant Route","operationId":"restore_tenant_route_tenants__tenant_id__restore_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErasureResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/{tenant_id}/erasure-requests":{"get":{"tags":["erasure"],"summary":"List Tenant Erasure Requests Route","operationId":"list_tenant_erasure_requests_route_tenants__tenant_id__erasure_requests_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErasureListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me/export":{"post":{"tags":["erasure"],"summary":"Request My Export","operationId":"request_my_export_users_me_export_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequestModel"}}}}}}},"/users/me/exports":{"get":{"tags":["erasure"],"summary":"List My Exports","operationId":"list_my_exports_users_me_exports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportListResponse"}}}}}}},"/tenants/{tenant_id}/export":{"post":{"tags":["erasure"],"summary":"Request Tenant Export Route","operationId":"request_tenant_export_route_tenants__tenant_id__export_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequestModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenants/{tenant_id}/exports":{"get":{"tags":["erasure"],"summary":"List Tenant Exports Route","operationId":"list_tenant_exports_route_tenants__tenant_id__exports_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exports/{request_id}/download":{"get":{"tags":["erasure"],"summary":"Download Export","operationId":"download_export_exports__request_id__download_get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Download Export Exports  Request Id  Download Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans":{"get":{"tags":["billing"],"summary":"List Plans Endpoint","description":"Public plan catalog. Only active + public plans.","operationId":"list_plans_endpoint_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanListResponse"}}}}}}},"/plans/{plan_id}":{"get":{"tags":["billing"],"summary":"Get Plan Endpoint","operationId":"get_plan_endpoint_plans__plan_id__get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Start a checkout session.\n\n- Free plan: directly create the subscription without provider call.\n- Paid plan: open a hosted checkout via the provider; client navigates\n  to `payment_page_url` and posts back through `/billing/checkout/complete`.","operationId":"create_checkout_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout/complete":{"post":{"tags":["billing"],"summary":"Complete Checkout","description":"Finalize a hosted checkout.\n\nRetrieves card details from the provider session, persists a payment\nmethod, then creates the subscription.","operationId":"complete_checkout_billing_checkout_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Active Subscription","operationId":"get_active_subscription_billing_subscription_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionModel"},{"type":"null"}],"title":"Response Get Active Subscription Billing Subscription Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscriptions":{"get":{"tags":["billing"],"summary":"List Subscriptions Endpoint","operationId":"list_subscriptions_endpoint_billing_subscriptions_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription/upgrade":{"post":{"tags":["billing"],"summary":"Upgrade Subscription","operationId":"upgrade_subscription_billing_subscription_upgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription/cancel":{"post":{"tags":["billing"],"summary":"Cancel Subscription Endpoint","operationId":"cancel_subscription_endpoint_billing_subscription_cancel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription/reactivate":{"post":{"tags":["billing"],"summary":"Reactivate Subscription Endpoint","description":"Undo a `cancel_at_period_end` flag — keeps subscription active.","operationId":"reactivate_subscription_endpoint_billing_subscription_reactivate_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/payment-methods":{"get":{"tags":["billing"],"summary":"List Payment Methods","operationId":"list_payment_methods_billing_payment_methods_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/payment-methods/{payment_method_id}/default":{"post":{"tags":["billing"],"summary":"Set Default Payment Method","operationId":"set_default_payment_method_billing_payment_methods__payment_method_id__default_post","parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"integer","title":"Payment Method Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/payment-methods/{payment_method_id}":{"delete":{"tags":["billing"],"summary":"Delete Payment Method","operationId":"delete_payment_method_billing_payment_methods__payment_method_id__delete","parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"integer","title":"Payment Method Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/addresses":{"get":{"tags":["billing"],"summary":"List Billing Addresses","operationId":"list_billing_addresses_billing_addresses_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["billing"],"summary":"Create Billing Address","operationId":"create_billing_address_billing_addresses_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/addresses/{address_id}":{"patch":{"tags":["billing"],"summary":"Update Billing Address","operationId":"update_billing_address_billing_addresses__address_id__patch","parameters":[{"name":"address_id","in":"path","required":true,"schema":{"type":"integer","title":"Address Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["billing"],"summary":"Delete Billing Address","operationId":"delete_billing_address_billing_addresses__address_id__delete","parameters":[{"name":"address_id","in":"path","required":true,"schema":{"type":"integer","title":"Address Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/addresses/{address_id}/default":{"post":{"tags":["billing"],"summary":"Set Default Billing Address","operationId":"set_default_billing_address_billing_addresses__address_id__default_post","parameters":[{"name":"address_id","in":"path","required":true,"schema":{"type":"integer","title":"Address Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/invoices":{"get":{"tags":["billing"],"summary":"List Invoices Endpoint","operationId":"list_invoices_endpoint_billing_invoices_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/invoices/{invoice_id}":{"get":{"tags":["billing"],"summary":"Get Invoice Endpoint","operationId":"get_invoice_endpoint_billing_invoices__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/invoices/{invoice_id}/pdf":{"get":{"tags":["billing"],"summary":"Get Invoice Pdf","operationId":"get_invoice_pdf_billing_invoices__invoice_id__pdf_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/usage":{"get":{"tags":["billing"],"summary":"Get Usage","operationId":"get_usage_billing_usage_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"YYYY-MM (default: current month UTC)","title":"Period"},"description":"YYYY-MM (default: current month UTC)"},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/webhooks/iyzico":{"post":{"tags":["billing"],"summary":"Iyzico Webhook","description":"Inbound webhook receiver.\n\n1. Read raw body (signature verification needs the exact bytes).\n2. Pull signature from `X-Iyzico-Signature` header.\n3. Pass to `webhooks.parse_webhook_event` -> raises on signature failure.\n4. `store_webhook_event` -> idempotent on `(provider, event_id)`.\n5. `process_webhook_event` synchronously (V4-D will queue).","operationId":"iyzico_webhook_billing_webhooks_iyzico_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookProcessResponse"}}}}}}},"/cases/precheck":{"post":{"tags":["cases"],"summary":"Precheck","description":"Build a structured customs file precheck.\n\nPersistence is best-effort so the workflow still works in demo/test\nenvironments where the database is not reachable. When persistence fails,\nthe response is explicitly marked `completed_unpersisted`.","operationId":"precheck_cases_precheck_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrecheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrecheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases":{"get":{"tags":["cases"],"summary":"List Cases","description":"Page through cases for the authenticated tenant.\n\nFiltreler hepsi opsiyoneldir; null degerler atlanir. Toplam kayit\nsayisi tek SELECT icinde `COUNT(*) OVER()` window fonksiyonu ile\naliniyor.","operationId":"list_cases_cases_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Status"}},{"name":"regime","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Regime"}},{"name":"declared_gtip","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Declared Gtip"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"default","title":"Tenant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"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":{"$ref":"#/components/schemas/CaseListResponseE11"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}":{"get":{"tags":["cases"],"summary":"Get Case","operationId":"get_case_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Case Cases  Case Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["cases"],"summary":"Update Case Status","description":"Dosya durumunu ve/veya musteri adini guncelle (E11 yasam dongusu).\n\nDurum icin yalniz `ALLOWED_CASE_STATUSES` icindeki degerler kabul edilir;\ntenant-scoped UPDATE ile baska calisma alaninin dosyasi degistirilemez.\n`customer_name` gonderildiyse guncellenir (bos string → NULL/temizle).","operationId":"update_case_status_cases__case_id__patch","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"default","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseStatusUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Case Status Cases  Case Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}/items":{"post":{"tags":["cases"],"summary":"Create Case Item","description":"Dosyaya tipli kayit ekle (E11): GTİP onerisi / vergi hesabi / not.\n\nKONTRAT SABIT: govde {\"kind\": \"tax_calc\"|\"gtip\"|\"note\", \"payload\": {...}}.\nTenant-scoped — dosya baska calisma alanina aitse 404 doner (varligi\nsizdirilmaz).","operationId":"create_case_item_cases__case_id__items_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"default","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseItemCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Case Item Cases  Case Id  Items Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}/documents":{"get":{"tags":["cases"],"summary":"List Case Documents","description":"Dosyanin kalici belgeleri (E11) — sayfa yenilense de kaybolmaz.\n\n`uploaded_documents` + (varsa) son cikarim ozeti. Tenant-scoped;\ndosya bu calisma alanina ait degilse 404.","operationId":"list_case_documents_cases__case_id__documents_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"default","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Case Documents Cases  Case Id  Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}/crosscheck":{"get":{"tags":["cases"],"summary":"Crosscheck Case","description":"Belge ↔ beyan çapraz kontrolü (Faz C) — SALT SELECT, yazma yok.\n\nDosyanın beyan alanları (GTİP / kıymet / para birimi / menşe) yüklü\nbelgelerin en güncel çıkarım (document_extracts) verileriyle\nkarşılaştırılır. GTİP prefix-toleranslı (ortak önek ≥6 hane = uyumlu),\nkıymet ±%5 toleranslı. Çıkarım verisi olmayan alan dürüstçe\n'belge_verisi_yok' işaretlenir. Tenant-scoped; dosya bu çalışma\nalanına ait değilse 404.","operationId":"crosscheck_case_cases__case_id__crosscheck_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"default","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Crosscheck Case Cases  Case Id  Crosscheck Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/upload":{"post":{"tags":["documents"],"summary":"Upload Document","operationId":"upload_document_documents_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_documents_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{document_id}/extract":{"post":{"tags":["documents"],"summary":"Extract Document","operationId":"extract_document_documents__document_id__extract_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentExtractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}/validate-documents":{"post":{"tags":["documents"],"summary":"Validate Case Documents","operationId":"validate_case_documents_cases__case_id__validate_documents_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateDocumentsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gtip/search":{"post":{"tags":["gtip"],"summary":"Gtip Search","operationId":"gtip_search_gtip_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GtipSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GtipSearchResponseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gtip/{code}":{"get":{"tags":["gtip"],"summary":"Gtip Code Lookup","description":"Deterministik kod-lookup: cetvel satırı + alt kırılımlar + vergi alanları.\n\nMüşavirin \"elimdeki kodu doğrula\" refleksi — LLM yok, SQL tam/prefix\neşleşmesi var. Kod cetvelde yoksa en yakın üst kırılım önerilir.","operationId":"gtip_code_lookup_gtip__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GtipCodeLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/taxes/calculate":{"post":{"tags":["taxes"],"summary":"Taxes Calculate","operationId":"taxes_calculate_taxes_calculate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCalculationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCalculationResponse-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/taxes/fx-rate":{"get":{"tags":["taxes"],"summary":"Taxes Fx Rate","description":"TCMB günlük döviz satış kurunu döndürür (30 dk cache'li).\n\nBilinçli sınır: bu uç /taxes/calculate'e otomatik ENJEKTE EDİLMEZ —\nbeyan tarihindeki gümrük kuru farklı olabilir; kur müşavirin gözü\nönünde form alanına yazılır, hesap kararı müşavirde kalır.","operationId":"taxes_fx_rate_taxes_fx_rate_get","parameters":[{"name":"currency","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":8,"default":"USD","title":"Currency"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxRateSuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/taxes/rates/{gtip}":{"get":{"tags":["taxes"],"summary":"Taxes Rates","description":"E5 oran kartı: tutar GEREKMEDEN, GTİP için tüm menşe gruplarının\nGV/İGV/ÖTV/KKDF/KDV oranlarını tek matriste döndürür.\n\nDeterministik SQL — LLM/hesap dolayımı yok. Kaynak/tarih alanları satır\nbazında döner; kısa GTİP'te alt kırılım listesiyle \"aşağı genişletme\".","operationId":"taxes_rates_taxes_rates__gtip__get","parameters":[{"name":"gtip","in":"path","required":true,"schema":{"type":"string","title":"Gtip"}},{"name":"regime","in":"query","required":false,"schema":{"type":"string","maxLength":64,"default":"serbest_dolasima_giris","title":"Regime"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateMatrixResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications":{"get":{"tags":["notifications"],"summary":"Get Notifications","operationId":"get_notifications_notifications_get","parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}},{"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"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications/unread-count":{"get":{"tags":["notifications"],"summary":"Get Unread Count","operationId":"get_unread_count_notifications_unread_count_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications/{notification_id}/read":{"post":{"tags":["notifications"],"summary":"Post Mark Read","operationId":"post_mark_read_notifications__notification_id__read_post","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"integer","title":"Notification Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkReadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications/read-all":{"post":{"tags":["notifications"],"summary":"Post Mark All Read","operationId":"post_mark_all_read_notifications_read_all_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkAllReadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications/scan":{"post":{"tags":["notifications"],"summary":"Post Scan","operationId":"post_scan_notifications_scan_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScanRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/status":{"get":{"tags":["ops"],"summary":"Ops Status","operationId":"ops_status_ops_status_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/sources":{"get":{"tags":["ops"],"summary":"Ops Sources","description":"Documents + chunks join. Enabled state ve registry uyeligi satirda doner.","operationId":"ops_sources_ops_sources_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","title":"Tenant Id"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Kind"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsSourcesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/query-debug":{"post":{"tags":["ops"],"summary":"Ops Query Debug","description":"Retrieval debug: final answer + aday chunk listesi.\n\nDisabled dokumanlar retriever tarafinda zaten elendigi icin candidate\nlistesinde gorunmez; response `retrieval.disabled_document_count` ile\no an kac dokumanin kapali oldugunu yazar (kullaniciya baglamla anlam\nkazansin).","operationId":"ops_query_debug_ops_query_debug_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsQueryDebugRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/retrieval/debug":{"post":{"tags":["ops"],"summary":"Ops Retrieval Debug","description":"V4-G hybrid pipeline ara katmanlari + final RetrievedChunk listesi.\n\nDonus alanlari:\n- `expanded`: query expansion ciktisi (canonical, synonyms_added, lexical/dense varyantlari).\n- `dense_results`: top 10 pgvector adayi (chunk_id + distance).\n- `lexical_results`: top 10 ts_rank adayi (chunk_id + ts_rank).\n- `fused`: top 10 RRF fused (rank_dense, rank_lexical, fused_score).\n- `reranked`: LLM rerank sonucu (kapaliysa null).\n- `final`: pipeline sonu top_k.","operationId":"ops_retrieval_debug_ops_retrieval_debug_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalDebugRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalDebugResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/eval/status":{"get":{"tags":["ops"],"summary":"Ops Eval Status","operationId":"ops_eval_status_ops_eval_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsEvalStatusResponse"}}}}}}},"/ops/sources/add":{"post":{"tags":["ops"],"summary":"Ops Sources Add","description":"Manuel URL ile kaynak ekle. URL allowlist zorunlu.","operationId":"ops_sources_add_ops_sources_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsManualAddRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/sources/upload":{"post":{"tags":["ops"],"summary":"Ops Sources Upload","description":"Multipart dosya yukleme + ingest.\n\nDesteklenen tipler: `.pdf`, `.html`/`.htm`, `.txt`, `.md`/`.markdown`.\nBoyut limiti `MAX_UPLOAD_BYTES` (25 MiB).","operationId":"ops_sources_upload_ops_sources_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ops_sources_upload_ops_sources_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"}}}}}}},"/ops/sources/fetch-ingest":{"post":{"tags":["ops"],"summary":"Ops Sources Fetch Ingest","description":"Registry'deki tek kaynagi (source_id) indir + ingest et.","operationId":"ops_sources_fetch_ingest_ops_sources_fetch_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsFetchIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/sources/toggle":{"post":{"tags":["ops"],"summary":"Ops Sources Toggle","description":"Document-level enable/disable. Retriever bu state'e uyacak.","operationId":"ops_sources_toggle_ops_sources_toggle_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsToggleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/policy":{"get":{"tags":["ops"],"summary":"Ops Policy","description":"Yazma aksiyonlarinin guvenlik sinirlari (UI'da gosterilir).","operationId":"ops_policy_ops_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ops/audit":{"get":{"tags":["ops"],"summary":"Ops Audit","description":"Audit event listesi (admin).\n\nTenant kuralı: owner herhangi bir tenant'i sorgulayabilir; digerleri\n`resolve_tenant` ile kendi tenant'ina baglanir.","operationId":"ops_audit_ops_audit_get","parameters":[{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Event Type"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Entity Type"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Entity Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"User Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsAuditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/jobs":{"get":{"tags":["ops"],"summary":"Ops Jobs List","description":"List recent job_runs with status/function/tenant filters.\n\nOwner principals may pass any tenant_id; other admin tokens are\nconstrained to their own tenant via `resolve_tenant`.","operationId":"ops_jobs_list_ops_jobs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Status"}},{"name":"function_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Function Name"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/jobs/{job_id}":{"get":{"tags":["ops"],"summary":"Ops Jobs Get","operationId":"ops_jobs_get_ops_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRunModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/jobs/{job_id}/cancel":{"post":{"tags":["ops"],"summary":"Ops Jobs Cancel","description":"Best-effort cancel via the active dispatcher.\n\nMemory backend always returns False (jobs already ran inline);\narq backend attempts `Job.abort()` and returns True on success.","operationId":"ops_jobs_cancel_ops_jobs__job_id__cancel_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/cache/stats":{"get":{"tags":["ops"],"summary":"Ops Cache Stats","description":"Inspect the active cache backend (hits/misses/size + healthcheck).","operationId":"ops_cache_stats_ops_cache_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ops/cache/clear":{"post":{"tags":["ops"],"summary":"Ops Cache Clear","description":"Flush cache entries.\n\nBody: `{\"namespace\": null}`  -> entire current top-level namespace.\nBody: `{\"namespace\": \"plans\"}` -> only `plans:*` keys.","operationId":"ops_cache_clear_ops_cache_clear_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheClearRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exports/precheck":{"post":{"tags":["exports"],"summary":"Export Precheck","operationId":"export_precheck_exports_precheck_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrecheckExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exports/declaration-draft":{"post":{"tags":["exports"],"summary":"Export Declaration Draft","description":"Dosyadan BİLGE-ready 'Beyanname Taslağı (Özet)' PDF üretir (resmî değil).","operationId":"export_declaration_draft_exports_declaration_draft_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrecheckExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exports/taxes":{"post":{"tags":["exports"],"summary":"Export Taxes","operationId":"export_taxes_exports_taxes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exports/gtip":{"post":{"tags":["exports"],"summary":"Export Gtip","operationId":"export_gtip_exports_gtip_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GtipExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exports/cases":{"post":{"tags":["exports"],"summary":"Export Cases","operationId":"export_cases_exports_cases_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CasesExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/status":{"get":{"tags":["status"],"summary":"Status Aggregator","operationId":"status_aggregator_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Status Aggregator Status Get"}}}}}}},"/auth/oauth/providers":{"get":{"tags":["oauth"],"summary":"Oauth Providers","description":"Public — list the OAuth providers enabled in this deployment.","operationId":"oauth_providers_auth_oauth_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Oauth Providers Auth Oauth Providers Get"}}}}}}},"/auth/oauth/{provider}/start":{"get":{"tags":["oauth"],"summary":"Oauth Start","description":"Begin the Authorization Code flow — redirect to the provider.","operationId":"oauth_start_auth_oauth__provider__start_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":2,"maxLength":24,"title":"Provider"}},{"name":"invite_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Invite Token"}},{"name":"locale","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Locale"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/{provider}/callback":{"get":{"tags":["oauth"],"summary":"Oauth Callback","description":"Provider callback — completes the flow.\n\nOn success returns either a 302 to the SPA landing page (default) or\na JSON body when ``Accept: application/json`` is set.\n\nProvider-side errors (``error=access_denied`` etc.) are surfaced via\nthe same landing-page error fragment.","operationId":"oauth_callback_auth_oauth__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":2,"maxLength":24,"title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/disconnect/{provider}":{"post":{"tags":["oauth"],"summary":"Oauth Disconnect","description":"Remove an OAuth account binding for the authenticated user.","operationId":"oauth_disconnect_auth_oauth_disconnect__provider__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","minLength":2,"maxLength":24,"title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Oauth Disconnect Auth Oauth Disconnect  Provider  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/support/contact":{"post":{"tags":["support"],"summary":"Submit Contact","description":"Public contact form submission.\n\nHoneypot: if ``website`` is non-empty we treat it as a spam bot,\nreturn a generic 200, and skip the persist + email steps entirely.","operationId":"submit_contact_support_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/support/messages":{"get":{"tags":["support"],"summary":"List Messages","operationId":"list_messages_ops_support_messages_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Status"}},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"}},{"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":{"$ref":"#/components/schemas/SupportMessageListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/support/messages/{message_id}":{"get":{"tags":["support"],"summary":"Get Message","operationId":"get_message_ops_support_messages__message_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportMessageModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["support"],"summary":"Update Message Status","operationId":"update_message_status_ops_support_messages__message_id__patch","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportMessagePatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportMessageModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/corpus/drift":{"get":{"tags":["ops-corpus"],"summary":"List Drift Alerts","operationId":"list_drift_alerts_ops_corpus_drift_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAlertListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/corpus/drift/{alert_id}":{"get":{"tags":["ops-corpus"],"summary":"Get Drift Alert","operationId":"get_drift_alert_ops_corpus_drift__alert_id__get","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAlertModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/corpus/drift/{alert_id}/approve":{"post":{"tags":["ops-corpus"],"summary":"Approve Drift Alert","operationId":"approve_drift_alert_ops_corpus_drift__alert_id__approve_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAlertModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/corpus/drift/{alert_id}/reject":{"post":{"tags":["ops-corpus"],"summary":"Reject Drift Alert","operationId":"reject_drift_alert_ops_corpus_drift__alert_id__reject_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftRejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAlertModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ops/corpus/drift/scan":{"post":{"tags":["ops-corpus"],"summary":"Trigger Scan","description":"Schedule an RG scrape via the queue dispatcher.\n\nFalls back to inline subprocess invocation if the queue isn't\nconfigured (memory mode); returns scheduled=False in that case so\nthe caller knows the work happened synchronously.","operationId":"trigger_scan_ops_corpus_drift_scan_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftScanResponse"}}}}}}},"/corpus/library":{"get":{"tags":["corpus-library"],"summary":"Corpus Library","description":"Mevzuat kütüphanesi: korpustaki doküman envanterini listeler.\n\nSalt SELECT. Erişim kuralı routes_rag ile aynı: resmî korpus\n(tenant 'default') + istekçinin kendi tenant'ına yüklenmiş belgeler.\n`q` source_name üzerinde ILIKE arama; `kind` tür filtresi.","operationId":"corpus_library_corpus_library_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"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"}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"default","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorpusLibraryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/db/health":{"get":{"summary":"Db Health","operationId":"db_health_db_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcceptInvitationResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"role":{"type":"string","title":"Role"},"already_member":{"type":"boolean","title":"Already Member","default":false}},"type":"object","required":["tenant_id","role"],"title":"AcceptInvitationResponse"},"AssessmentModel":{"properties":{"product_restated":{"type":"string","title":"Product Restated"},"likely_chapter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Likely Chapter"},"likely_position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Likely Position"},"confidence":{"type":"string","enum":["low","medium","high"],"title":"Confidence","default":"low"},"reasoning":{"type":"string","title":"Reasoning","default":""}},"type":"object","required":["product_restated"],"title":"AssessmentModel","description":"Urun sorularinda 'on degerlendirme' - tahmin + confidence.\n\nBu blok asla kesin mevzuat sonucu gibi gosterilmemelidir. UI ayri bir\nbolumde \"Ön değerlendirme\" basligiyla renk kodlu confidence rozetiyle\nrender eder."},"AuditArchiveListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/AuditArchiveModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"AuditArchiveListResponse"},"AuditArchiveModel":{"properties":{"id":{"type":"integer","title":"Id"},"archive_path":{"type":"string","title":"Archive Path"},"destination":{"type":"string","title":"Destination"},"from_date":{"type":"string","format":"date","title":"From Date"},"to_date":{"type":"string","format":"date","title":"To Date"},"row_count":{"type":"integer","title":"Row Count"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"sha256":{"type":"string","title":"Sha256"},"archived_at":{"type":"string","format":"date-time","title":"Archived At"},"db_purged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Db Purged At"}},"type":"object","required":["id","archive_path","destination","from_date","to_date","row_count","sha256","archived_at"],"title":"AuditArchiveModel"},"AuditArchiveRunResponse":{"properties":{"count":{"type":"integer","title":"Count"},"results":{"items":{"$ref":"#/components/schemas/AuditArchiveRunResult"},"type":"array","title":"Results"}},"type":"object","required":["count"],"title":"AuditArchiveRunResponse"},"AuditArchiveRunResult":{"properties":{"archive_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Archive Id"},"archive_path":{"type":"string","title":"Archive Path"},"destination":{"type":"string","title":"Destination"},"from_date":{"type":"string","format":"date","title":"From Date"},"to_date":{"type":"string","format":"date","title":"To Date"},"row_count":{"type":"integer","title":"Row Count"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"sha256":{"type":"string","title":"Sha256"},"db_purged":{"type":"boolean","title":"Db Purged"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["archive_path","destination","from_date","to_date","row_count","file_size_bytes","sha256","db_purged"],"title":"AuditArchiveRunResult"},"AuditEventModel":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"event_type":{"type":"string","title":"Event Type"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","event_type","created_at"],"title":"AuditEventModel"},"BillingAddressCreateRequest":{"properties":{"company_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Company Name"},"full_name":{"type":"string","maxLength":256,"minLength":1,"title":"Full Name"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Phone"},"tax_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Tax Id"},"tax_id_type":{"anyOf":[{"type":"string","enum":["vkn","tckn","foreign"]},{"type":"null"}],"title":"Tax Id Type"},"tax_office":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tax Office"},"address_line":{"type":"string","maxLength":512,"minLength":1,"title":"Address Line"},"city":{"type":"string","maxLength":128,"minLength":1,"title":"City"},"district":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"District"},"postal_code":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Postal Code"},"country":{"type":"string","maxLength":8,"title":"Country","default":"TR"}},"type":"object","required":["full_name","email","address_line","city"],"title":"BillingAddressCreateRequest"},"BillingAddressListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/BillingAddressModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"BillingAddressListResponse"},"BillingAddressModel":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"tax_id_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id Type"},"tax_office":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Office"},"address_line":{"type":"string","title":"Address Line"},"city":{"type":"string","title":"City"},"district":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"District"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"type":"string","title":"Country","default":"TR"},"is_default":{"type":"boolean","title":"Is Default","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","full_name","email","address_line","city","created_at"],"title":"BillingAddressModel"},"BillingAddressUpdateRequest":{"properties":{"company_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Company Name"},"full_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Full Name"},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Phone"},"tax_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Tax Id"},"tax_id_type":{"anyOf":[{"type":"string","enum":["vkn","tckn","foreign"]},{"type":"null"}],"title":"Tax Id Type"},"tax_office":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tax Office"},"address_line":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Address Line"},"city":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"City"},"district":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"District"},"postal_code":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Country"}},"type":"object","title":"BillingAddressUpdateRequest"},"Body_ops_sources_upload_ops_sources_upload_post":{"properties":{"source_name":{"type":"string","maxLength":256,"minLength":1,"title":"Source Name"},"source_kind":{"type":"string","title":"Source Kind","default":"unknown"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["source_name","file"],"title":"Body_ops_sources_upload_ops_sources_upload_post"},"Body_upload_document_documents_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"tenant_id":{"type":"string","title":"Tenant Id","default":"default"},"case_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Case Id"},"document_type":{"type":"string","title":"Document Type","default":"auto"}},"type":"object","required":["file"],"title":"Body_upload_document_documents_upload_post"},"CacheClearRequest":{"properties":{"namespace":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Namespace"}},"type":"object","title":"CacheClearRequest","description":"`/ops/cache/clear` body.\n\n`namespace=None` -> tum (current top-level) namespace temizlenir.\n`namespace='plans'` gibi bir deger sadece o sub-namespace altini siler."},"CancelRequest":{"properties":{"immediate":{"type":"boolean","title":"Immediate","default":false},"tenant_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},"type":"object","title":"CancelRequest"},"CaseDocumentInput":{"properties":{"document_type":{"type":"string","maxLength":80,"minLength":1,"title":"Document Type"},"document_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Document Name"},"document_number":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Document Number"},"issuer":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Issuer"}},"type":"object","required":["document_type"],"title":"CaseDocumentInput"},"CaseItemCreateRequest":{"properties":{"kind":{"type":"string","maxLength":32,"minLength":1,"title":"Kind"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"tenant_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["kind"],"title":"CaseItemCreateRequest","description":"POST /cases/{id}/items govdesi — kontrat: {\"kind\": ..., \"payload\": {}}.\n\n`tenant_id` opsiyoneldir (govdede ya da query'de verilebilir; govde\noncelikli). Baska ajanlarin cagirdigi sekil degistirilmemeli."},"CaseListItemE11":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"product_description":{"type":"string","title":"Product Description"},"declared_gtip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Declared Gtip"},"origin_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination"},"regime":{"type":"string","title":"Regime"},"transport_mode":{"type":"string","title":"Transport Mode"},"risk_level":{"type":"string","enum":["low","medium","high"],"title":"Risk Level"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"}},"type":"object","required":["id","tenant_id","product_description","regime","transport_mode","risk_level","status","created_at"],"title":"CaseListItemE11"},"CaseListResponseE11":{"properties":{"count":{"type":"integer","title":"Count"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/CaseListItemE11"},"type":"array","title":"Items"}},"type":"object","required":["count","limit","offset"],"title":"CaseListResponseE11"},"CaseStatusUpdateRequest":{"properties":{"status":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Status"},"customer_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Customer Name"}},"type":"object","title":"CaseStatusUpdateRequest","description":"PATCH /cases/{id} govdesi.\n\nE11: `status` ve/veya `customer_name` guncellenebilir; en az biri\ngonderilmelidir. `customer_name` bos string gonderilirse alan temizlenir\n(NULL). Eski istemciler yalniz {\"status\": ...} gondermeye devam edebilir."},"CasesExportRequest":{"properties":{"case_ids":{"items":{"type":"integer"},"type":"array","title":"Case Ids","description":"Empty = use status/regime filters across the tenant."},"format":{"type":"string","const":"excel","title":"Format"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regime"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["format"],"title":"CasesExportRequest"},"CheckoutCompleteRequest":{"properties":{"session_id":{"type":"string","maxLength":512,"minLength":1,"title":"Session Id"},"plan_id":{"type":"string","maxLength":64,"minLength":1,"title":"Plan Id"},"billing_address_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billing Address Id"},"with_trial":{"type":"boolean","title":"With Trial","default":true},"tenant_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["session_id","plan_id"],"title":"CheckoutCompleteRequest"},"CheckoutSessionRequest":{"properties":{"plan_id":{"type":"string","maxLength":64,"minLength":1,"title":"Plan Id"},"billing_address_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billing Address Id"},"payment_method_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Method Id"},"with_trial":{"type":"boolean","title":"With Trial","default":true},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"tenant_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["plan_id"],"title":"CheckoutSessionRequest"},"CheckoutSessionResponse":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"payment_page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Page Url"},"plan_id":{"type":"string","title":"Plan Id"},"requires_payment":{"type":"boolean","title":"Requires Payment"}},"type":"object","required":["plan_id","requires_payment"],"title":"CheckoutSessionResponse"},"CitationModel":{"properties":{"source_id":{"type":"string","title":"Source Id"},"source_name":{"type":"string","title":"Source Name"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"excerpt":{"type":"string","title":"Excerpt"},"grounding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grounding"},"auto_injected":{"type":"boolean","title":"Auto Injected","default":false}},"type":"object","required":["source_id","source_name","excerpt"],"title":"CitationModel"},"ConsentListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/ConsentRecordResponse"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"ConsentListResponse"},"ConsentRecordResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"kind":{"type":"string","title":"Kind"},"version":{"type":"string","title":"Version"},"accepted":{"type":"boolean","title":"Accepted"},"accepted_at":{"type":"string","format":"date-time","title":"Accepted At"},"withdrawn_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Withdrawn At"}},"type":"object","required":["id","kind","version","accepted","accepted_at"],"title":"ConsentRecordResponse"},"ConsentRequest":{"properties":{"kind":{"type":"string","enum":["privacy_policy","terms_of_service","cookie_policy","dpa","marketing_emails","analytics"],"title":"Kind"},"version":{"type":"string","maxLength":64,"minLength":1,"title":"Version"},"accepted":{"type":"boolean","title":"Accepted","default":true},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["kind","version"],"title":"ConsentRequest"},"CorpusLibraryItem":{"properties":{"id":{"type":"integer","title":"Id"},"source_name":{"type":"string","title":"Source Name"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"chunk_count":{"type":"integer","title":"Chunk Count"},"first_chunk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Chunk Id"},"kind":{"type":"string","enum":["kanun","yonetmelik","genelge","teblig","diger"],"title":"Kind"}},"type":"object","required":["id","source_name","chunk_count","kind"],"title":"CorpusLibraryItem"},"CorpusLibraryResponse":{"properties":{"total":{"type":"integer","title":"Total"},"count":{"type":"integer","title":"Count"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"kind_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Kind Counts"},"items":{"items":{"$ref":"#/components/schemas/CorpusLibraryItem"},"type":"array","title":"Items"}},"type":"object","required":["total","count","limit","offset","kind_counts","items"],"title":"CorpusLibraryResponse"},"DocumentExtractResponse":{"properties":{"document_id":{"type":"integer","title":"Document Id"},"document_type":{"type":"string","title":"Document Type"},"extracted_fields":{"additionalProperties":true,"type":"object","title":"Extracted Fields"},"confidence":{"type":"string","enum":["low","medium","high"],"title":"Confidence","default":"low"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["document_id","document_type"],"title":"DocumentExtractResponse"},"DocumentUploadResponse":{"properties":{"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Document Id"},"status":{"type":"string","enum":["uploaded","uploaded_unpersisted"],"title":"Status"},"file_name":{"type":"string","title":"File Name"},"document_type":{"type":"string","title":"Document Type"},"content_hash":{"type":"string","title":"Content Hash"},"size_bytes":{"type":"integer","title":"Size Bytes"},"tenant_id":{"type":"string","title":"Tenant Id"}},"type":"object","required":["status","file_name","document_type","content_hash","size_bytes","tenant_id"],"title":"DocumentUploadResponse"},"DocumentValidationResponse":{"properties":{"case_id":{"type":"integer","title":"Case Id"},"provided_documents":{"items":{"$ref":"#/components/schemas/RequiredDocumentModel"},"type":"array","title":"Provided Documents"},"missing_documents":{"items":{"$ref":"#/components/schemas/RequiredDocumentModel"},"type":"array","title":"Missing Documents"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"risk_level":{"type":"string","enum":["low","medium","high"],"title":"Risk Level","default":"medium"}},"type":"object","required":["case_id"],"title":"DocumentValidationResponse"},"DriftAlertListResponse":{"properties":{"count":{"type":"integer","minimum":0.0,"title":"Count"},"items":{"items":{"$ref":"#/components/schemas/DriftAlertModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"DriftAlertListResponse"},"DriftAlertModel":{"properties":{"id":{"type":"integer","title":"Id"},"source_id":{"type":"string","title":"Source Id"},"source_name":{"type":"string","title":"Source Name"},"previous_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Hash"},"current_hash":{"type":"string","title":"Current Hash"},"status":{"type":"string","enum":["pending","approved","rejected","ingested","failed"],"title":"Status"},"detected_at":{"type":"string","format":"date-time","title":"Detected At"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At"},"ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ingested At"},"approved_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By User Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"ingest_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ingest Result"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","source_id","source_name","current_hash","status","detected_at"],"title":"DriftAlertModel"},"DriftRejectRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"DriftRejectRequest"},"DriftScanResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"scheduled":{"type":"boolean","title":"Scheduled","default":false},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","title":"DriftScanResponse"},"EnforcementReportModelOut":{"properties":{"total_notes":{"type":"integer","minimum":0.0,"title":"Total Notes"},"ok_count":{"type":"integer","minimum":0.0,"title":"Ok Count"},"flagged_count":{"type":"integer","minimum":0.0,"title":"Flagged Count"},"dropped_count":{"type":"integer","minimum":0.0,"title":"Dropped Count"},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Threshold"},"mode":{"type":"string","enum":["warn","drop","block"],"title":"Mode"}},"type":"object","required":["total_notes","ok_count","flagged_count","dropped_count","threshold","mode"],"title":"EnforcementReportModelOut","description":"V4-G citation enforcement summary attached to /rag/query responses."},"ErasureListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/ErasureResponseModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"ErasureListResponse"},"ErasureResponseModel":{"properties":{"id":{"type":"integer","title":"Id"},"scope":{"type":"string","enum":["user","tenant"],"title":"Scope"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"requested_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested By User Id"},"status":{"type":"string","enum":["pending_grace","restored","purging","purged","failed"],"title":"Status"},"grace_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Until"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"restored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Restored At"},"purged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Purged At"},"immediate":{"type":"boolean","title":"Immediate","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","scope","status","requested_at"],"title":"ErasureResponseModel"},"ExportListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/ExportRequestModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"ExportListResponse"},"ExportRequestModel":{"properties":{"id":{"type":"integer","title":"Id"},"scope":{"type":"string","enum":["user","tenant"],"title":"Scope"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"requested_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested By User Id"},"status":{"type":"string","enum":["pending","processing","completed","failed","expired"],"title":"Status"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["id","scope","status","requested_at"],"title":"ExportRequestModel"},"FeedbackRequest":{"properties":{"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"answer":{"type":"string","maxLength":20000,"minLength":1,"title":"Answer"},"rating":{"type":"string","enum":["useful","not_useful"],"title":"Rating"},"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Note"},"tenant_id":{"type":"string","maxLength":128,"title":"Tenant Id","default":"default"}},"type":"object","required":["question","answer","rating"],"title":"FeedbackRequest"},"FeedbackResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true}},"type":"object","title":"FeedbackResponse"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"FxRateSuggestionResponse":{"properties":{"currency":{"type":"string","title":"Currency"},"rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Rate"},"source":{"type":"string","title":"Source","default":"TCMB döviz satış"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"fetched_at":{"type":"string","title":"Fetched At"}},"type":"object","required":["currency","rate","fetched_at"],"title":"FxRateSuggestionResponse","description":"TCMB günlük döviz satış kuru — SADECE öneri/prefill amaçlı."},"GtipCandidateModel":{"properties":{"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"confidence":{"type":"string","enum":["low","medium","high"],"title":"Confidence"},"rationale":{"type":"string","title":"Rationale"}},"type":"object","required":["code","label","confidence","rationale"],"title":"GtipCandidateModel"},"GtipCodeLookupResponse":{"properties":{"code":{"type":"string","title":"Code"},"found":{"type":"boolean","title":"Found"},"exact_match":{"type":"boolean","title":"Exact Match"},"entry":{"anyOf":[{"$ref":"#/components/schemas/GtipLookupEntryModel"},{"type":"null"}]},"children":{"items":{"$ref":"#/components/schemas/GtipLookupEntryModel"},"type":"array","title":"Children"},"nearest":{"anyOf":[{"$ref":"#/components/schemas/GtipLookupEntryModel"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"source":{"type":"string","title":"Source","default":"TGTC 2026 (Karar 10781)"},"source_url":{"type":"string","title":"Source Url","default":"https://ggm.ticaret.gov.tr/duyurular/istatistik-pozisyonlarina-bolunmus-turk-gumruk-tarife-cetveli-karar-sayisi-10781-yayimlanmistir"},"disclaimer":{"type":"string","title":"Disclaimer","default":""}},"type":"object","required":["code","found","exact_match"],"title":"GtipCodeLookupResponse"},"GtipExportRequest":{"properties":{"payload":{"$ref":"#/components/schemas/GtipSearchResponse"},"format":{"type":"string","const":"pdf","title":"Format"}},"type":"object","required":["payload","format"],"title":"GtipExportRequest"},"GtipLookupEntryModel":{"properties":{"gtip":{"type":"string","title":"Gtip"},"code_norm":{"type":"string","title":"Code Norm"},"chapter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chapter"},"description":{"type":"string","title":"Description"},"olcu_birimi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Olcu Birimi"},"vergi_haddi_474":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vergi Haddi 474"},"gv_oranlari":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gv Oranlari"},"gv_liste":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gv Liste"}},"type":"object","required":["gtip","code_norm","description"],"title":"GtipLookupEntryModel"},"GtipSearchCandidate":{"properties":{"gtip":{"type":"string","title":"Gtip"},"confidence":{"type":"string","enum":["low","medium","high"],"title":"Confidence"},"rationale":{"type":"string","title":"Rationale"},"chapter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chapter"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"citations":{"items":{"$ref":"#/components/schemas/CitationModel"},"type":"array","title":"Citations"},"rerank_score":{"type":"number","title":"Rerank Score","default":0.0}},"type":"object","required":["gtip","confidence","rationale"],"title":"GtipSearchCandidate"},"GtipSearchCandidateOut":{"properties":{"gtip":{"type":"string","title":"Gtip"},"confidence":{"type":"string","enum":["low","medium","high"],"title":"Confidence"},"rationale":{"type":"string","title":"Rationale"},"chapter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chapter"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"citations":{"items":{"$ref":"#/components/schemas/CitationModel"},"type":"array","title":"Citations"},"rerank_score":{"type":"number","title":"Rerank Score","default":0.0},"gv_oranlari":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gv Oranlari"},"gv_liste":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gv Liste"}},"type":"object","required":["gtip","confidence","rationale"],"title":"GtipSearchCandidateOut"},"GtipSearchRequest":{"properties":{"product_description":{"type":"string","maxLength":2000,"minLength":2,"title":"Product Description"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"top_k":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top K","default":5},"hint_chapter":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Hint Chapter"}},"type":"object","required":["product_description"],"title":"GtipSearchRequest"},"GtipSearchResponse":{"properties":{"product_description":{"type":"string","title":"Product Description"},"candidates":{"items":{"$ref":"#/components/schemas/GtipSearchCandidate"},"type":"array","title":"Candidates"},"suggested_next_steps":{"items":{"type":"string"},"type":"array","title":"Suggested Next Steps"},"disclaimer":{"type":"string","title":"Disclaimer"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["product_description","candidates","suggested_next_steps","disclaimer"],"title":"GtipSearchResponse"},"GtipSearchResponseOut":{"properties":{"product_description":{"type":"string","title":"Product Description"},"candidates":{"items":{"$ref":"#/components/schemas/GtipSearchCandidateOut"},"type":"array","title":"Candidates"},"suggested_next_steps":{"items":{"type":"string"},"type":"array","title":"Suggested Next Steps"},"disclaimer":{"type":"string","title":"Disclaimer"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["product_description","candidates","suggested_next_steps","disclaimer"],"title":"GtipSearchResponseOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvitationCreateRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"role":{"type":"string","enum":["admin","advisor","operator","viewer"],"title":"Role"}},"type":"object","required":["email","role"],"title":"InvitationCreateRequest"},"InvitationListItem":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"sent_at":{"type":"string","format":"date-time","title":"Sent At"},"invited_by_user_id":{"type":"string","title":"Invited By User Id"}},"type":"object","required":["id","tenant_id","email","role","expires_at","sent_at","invited_by_user_id"],"title":"InvitationListItem"},"InvitationListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/InvitationListItem"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"InvitationListResponse"},"InvitationResponse":{"properties":{"invitation_id":{"type":"integer","title":"Invitation Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"sent_at":{"type":"string","format":"date-time","title":"Sent At"},"invited_by_user_id":{"type":"string","title":"Invited By User Id"}},"type":"object","required":["invitation_id","tenant_id","email","role","expires_at","sent_at","invited_by_user_id"],"title":"InvitationResponse"},"InvoiceLineItemModel":{"properties":{"description":{"type":"string","title":"Description"},"quantity":{"type":"integer","title":"Quantity","default":1},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"}},"type":"object","required":["description","unit_price","amount"],"title":"InvoiceLineItemModel"},"InvoiceListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/InvoiceModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"InvoiceListResponse"},"InvoiceModel":{"properties":{"id":{"type":"integer","title":"Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"tenant_id":{"type":"string","title":"Tenant Id"},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id"},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End"},"issue_date":{"type":"string","format":"date","title":"Issue Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"subtotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal"},"tax_rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Rate"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"line_items":{"items":{"$ref":"#/components/schemas/InvoiceLineItemModel"},"type":"array","title":"Line Items"},"pdf_available":{"type":"boolean","title":"Pdf Available","default":false}},"type":"object","required":["id","invoice_number","tenant_id","issue_date","subtotal","tax_rate","tax_amount","total","currency","status"],"title":"InvoiceModel"},"JobCancelResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"canceled":{"type":"boolean","title":"Canceled"},"backend":{"type":"string","title":"Backend"}},"type":"object","required":["job_id","canceled","backend"],"title":"JobCancelResponse"},"JobRunListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/JobRunModel"},"type":"array","title":"Items"}},"type":"object","required":["count","limit","offset"],"title":"JobRunListResponse"},"JobRunModel":{"properties":{"id":{"type":"integer","title":"Id"},"job_id":{"type":"string","title":"Job Id"},"queue":{"type":"string","title":"Queue"},"function_name":{"type":"string","title":"Function Name"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"status":{"type":"string","title":"Status"},"args":{"items":{},"type":"array","title":"Args"},"kwargs":{"additionalProperties":true,"type":"object","title":"Kwargs"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Class"},"retry_count":{"type":"integer","title":"Retry Count","default":0},"max_retries":{"type":"integer","title":"Max Retries","default":0},"enqueued_at":{"type":"string","format":"date-time","title":"Enqueued At"},"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"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","job_id","queue","function_name","status","enqueued_at"],"title":"JobRunModel","description":"Single row from `job_runs` exposed through `/ops/jobs`."},"LegalDocumentResponse":{"properties":{"kind":{"type":"string","title":"Kind"},"version":{"type":"string","title":"Version"},"title":{"type":"string","title":"Title"},"body_markdown":{"type":"string","title":"Body Markdown"},"last_updated":{"type":"string","title":"Last Updated"}},"type":"object","required":["kind","version","title","body_markdown","last_updated"],"title":"LegalDocumentResponse"},"LegalDocumentSummary":{"properties":{"kind":{"type":"string","title":"Kind"},"version":{"type":"string","title":"Version"},"title":{"type":"string","title":"Title"},"last_updated":{"type":"string","title":"Last Updated"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["kind","version","title","last_updated"],"title":"LegalDocumentSummary"},"LegalIndexResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/LegalDocumentSummary"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"LegalIndexResponse"},"Login2FARequest":{"properties":{"partial_token":{"type":"string","title":"Partial Token"},"totp_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Totp Code"},"recovery_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recovery Code"}},"type":"object","required":["partial_token"],"title":"Login2FARequest"},"LoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"totp_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Totp Code"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":0},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}]},"requires_2fa":{"type":"boolean","title":"Requires 2Fa","default":false},"partial_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partial Token"}},"type":"object","title":"LoginResponse"},"LogoutRequest":{"properties":{"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","title":"LogoutRequest"},"MarkAllReadResponse":{"properties":{"updated":{"type":"integer","title":"Updated"}},"type":"object","required":["updated"],"title":"MarkAllReadResponse"},"MarkReadResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"id":{"type":"integer","title":"Id"},"already_read":{"type":"boolean","title":"Already Read","default":false}},"type":"object","required":["ok","id"],"title":"MarkReadResponse"},"MeResponse":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"tenant_id":{"type":"string","title":"Tenant Id"},"role":{"type":"string","title":"Role"},"authenticated":{"type":"boolean","title":"Authenticated"},"source":{"type":"string","title":"Source"}},"type":"object","required":["tenant_id","role","authenticated","source"],"title":"MeResponse"},"MemberItem":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"joined_via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Joined Via"},"invited_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By User Id"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","email","role","status","created_at"],"title":"MemberItem"},"MemberListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/MemberItem"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"MemberListResponse"},"MemberPatchRequest":{"properties":{"role":{"anyOf":[{"type":"string","enum":["admin","advisor","operator","viewer"]},{"type":"null"}],"title":"Role"},"status":{"anyOf":[{"type":"string","enum":["active","suspended"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"MemberPatchRequest"},"NotificationItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"kind":{"type":"string","title":"Kind"},"severity":{"type":"string","title":"Severity"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"read_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read At"},"dedupe_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dedupe Key"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","tenant_id","user_id","kind","severity","title","body","reference_type","reference_id","payload","read_at","dedupe_key","created_at"],"title":"NotificationItemResponse"},"NotificationListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/NotificationItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["count","items"],"title":"NotificationListResponse"},"OpsAuditResponse":{"properties":{"count":{"type":"integer","title":"Count"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/AuditEventModel"},"type":"array","title":"Items"}},"type":"object","required":["count","limit","offset"],"title":"OpsAuditResponse"},"OpsEvalStatusResponse":{"properties":{"reports_dir":{"type":"string","title":"Reports Dir"},"reports":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reports"}},"type":"object","required":["reports_dir"],"title":"OpsEvalStatusResponse"},"OpsFetchIngestRequest":{"properties":{"source_id":{"type":"string","maxLength":128,"minLength":1,"title":"Source Id"},"tenant_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["source_id"],"title":"OpsFetchIngestRequest","description":"Registry'deki tek kaynagi (source_id) indir + ingest et."},"OpsManualAddRequest":{"properties":{"source_name":{"type":"string","maxLength":256,"minLength":1,"title":"Source Name"},"source_url":{"type":"string","maxLength":2048,"minLength":8,"title":"Source Url"},"source_kind":{"type":"string","enum":["law","regulation","circular","communique","tariff","unknown"],"title":"Source Kind","default":"unknown"},"document_type":{"type":"string","enum":["pdf","html","txt","md","auto"],"title":"Document Type","default":"auto"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"tenant_id":{"type":"string","maxLength":128,"title":"Tenant Id","default":"default"}},"type":"object","required":["source_name","source_url"],"title":"OpsManualAddRequest","description":"Manuel URL ile kaynak ekleme (host allowlist zorunlu).\n\nBackend tarafi: `app.sources.service.fetch_url_and_ingest`. Allowlist\ndisi URL `400`, asiri buyuk dosya `413`, desteklenmeyen tip `415`,\nyukari HTTP hatalari `502/504` doner."},"OpsQueryDebugRequest":{"properties":{"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"tenant_id":{"type":"string","maxLength":128,"title":"Tenant Id","default":"default"},"candidate_limit":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Candidate Limit","default":10}},"type":"object","required":["question"],"title":"OpsQueryDebugRequest"},"OpsSourcesResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"filter":{"additionalProperties":{"type":"string"},"type":"object","title":"Filter"},"count":{"type":"integer","title":"Count"},"sources":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sources"}},"type":"object","required":["tenant_id","filter","count","sources"],"title":"OpsSourcesResponse"},"OpsStatusResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"corpus_mode":{"type":"string","enum":["sample","official","expanded","official-expanded","unknown"],"title":"Corpus Mode"},"totals":{"additionalProperties":{"type":"integer"},"type":"object","title":"Totals"},"sources_by_kind":{"additionalProperties":{"type":"integer"},"type":"object","title":"Sources By Kind"},"embedding":{"additionalProperties":true,"type":"object","title":"Embedding"},"retrieval":{"additionalProperties":true,"type":"object","title":"Retrieval"},"database":{"additionalProperties":true,"type":"object","title":"Database"},"eval_reports":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Eval Reports"}},"type":"object","required":["tenant_id","corpus_mode","totals","sources_by_kind","embedding","retrieval","database"],"title":"OpsStatusResponse"},"OpsToggleRequest":{"properties":{"document_id":{"type":"integer","minimum":1.0,"title":"Document Id"},"enabled":{"type":"boolean","title":"Enabled"},"source_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Source Name"},"tenant_id":{"type":"string","maxLength":128,"title":"Tenant Id","default":"default"}},"type":"object","required":["document_id","enabled"],"title":"OpsToggleRequest","description":"Kaynak enable/disable (document-level).\n\n`document_id` DB'deki primary key'dir. `enabled=False` durumunda\nretriever bu dokumani query'ye dahil etmez."},"PaymentMethodListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/PaymentMethodModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"PaymentMethodListResponse"},"PaymentMethodModel":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"type":{"type":"string","title":"Type"},"provider":{"type":"string","title":"Provider"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"exp_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Month"},"exp_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Year"},"holder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Name"},"is_default":{"type":"boolean","title":"Is Default","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","type","provider","created_at"],"title":"PaymentMethodModel"},"PermitFlagModel":{"properties":{"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"severity":{"type":"string","enum":["low","medium","high"],"title":"Severity"},"reason":{"type":"string","title":"Reason"},"source_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hint"}},"type":"object","required":["code","label","severity","reason"],"title":"PermitFlagModel"},"PlanListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/PlanModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"PlanListResponse"},"PlanModel":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"billing_period":{"type":"string","title":"Billing Period"},"price_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Amount"},"currency":{"type":"string","title":"Currency"},"tax_rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Rate"},"quota_max_cases":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Max Cases"},"quota_max_documents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Max Documents"},"quota_max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Max Users"},"quota_max_exports_per_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Max Exports Per Month"},"rate_limit_overrides":{"additionalProperties":true,"type":"object","title":"Rate Limit Overrides"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"is_active":{"type":"boolean","title":"Is Active","default":true},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["id","name","billing_period","price_amount","currency","tax_rate"],"title":"PlanModel"},"PrecheckExportRequest":{"properties":{"case_id":{"type":"integer","minimum":1.0,"title":"Case Id"},"format":{"type":"string","enum":["pdf","excel"],"title":"Format"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["case_id","format"],"title":"PrecheckExportRequest"},"PrecheckRequest":{"properties":{"product_description":{"type":"string","maxLength":2000,"minLength":1,"title":"Product Description"},"declared_gtip":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Declared Gtip"},"origin_country":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Origin Country"},"destination":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Destination","default":"TR"},"regime":{"type":"string","enum":["serbest_dolasima_giris","ihracat","transit","antrepo","gecici_ithalat","dahilde_isleme","unknown"],"title":"Regime","default":"serbest_dolasima_giris"},"transport_mode":{"type":"string","enum":["sea","air","road","rail","postal","unknown"],"title":"Transport Mode","default":"unknown"},"invoice_value":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Invoice Value"},"currency":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Currency"},"fx_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Fx Rate"},"documents":{"items":{"$ref":"#/components/schemas/CaseDocumentInput"},"type":"array","title":"Documents"},"tenant_id":{"type":"string","maxLength":128,"title":"Tenant Id","default":"default"},"user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"User Id"}},"type":"object","required":["product_description"],"title":"PrecheckRequest"},"PrecheckResponse":{"properties":{"case_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Case Id"},"status":{"type":"string","enum":["completed","completed_unpersisted"],"title":"Status","default":"completed"},"risk_level":{"type":"string","enum":["low","medium","high"],"title":"Risk Level"},"gtip_candidates":{"items":{"$ref":"#/components/schemas/GtipCandidateModel"},"type":"array","title":"Gtip Candidates"},"required_documents":{"items":{"$ref":"#/components/schemas/RequiredDocumentModel"},"type":"array","title":"Required Documents"},"permit_flags":{"items":{"$ref":"#/components/schemas/PermitFlagModel"},"type":"array","title":"Permit Flags"},"tax_data_status":{"$ref":"#/components/schemas/TaxDataStatusModel"},"tax_preview":{"anyOf":[{"$ref":"#/components/schemas/PrecheckTaxPreviewModel"},{"type":"null"}]},"source_evidence":{"items":{"$ref":"#/components/schemas/SourceEvidenceModel"},"type":"array","title":"Source Evidence"},"unknowns":{"items":{"type":"string"},"type":"array","title":"Unknowns"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Bu on kontrol bilgilendirme amaclidir; nihai GTIP, belge ve beyan karari yetkili gumruk musaviri tarafindan verilmelidir."}},"type":"object","required":["risk_level","tax_data_status"],"title":"PrecheckResponse"},"PrecheckTaxLineModel":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"confidence":{"type":"string","title":"Confidence","default":"unverified"}},"type":"object","required":["code","name","amount"],"title":"PrecheckTaxLineModel","description":"Precheck vergi bloğu kalemi — TaxLineModel'in kompakt hali."},"PrecheckTaxPreviewModel":{"properties":{"gtip":{"type":"string","title":"Gtip"},"origin_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country"},"regime":{"type":"string","title":"Regime","default":"serbest_dolasima_giris"},"cif_value_try":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Cif Value Try"},"invoice_value":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Invoice Value"},"invoice_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Currency"},"fx_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Fx Rate"},"lines":{"items":{"$ref":"#/components/schemas/PrecheckTaxLineModel"},"type":"array","title":"Lines"},"total_tax_try":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Tax Try"},"landed_cost_try":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Landed Cost Try"},"fallback_used":{"type":"boolean","title":"Fallback Used","default":false},"is_illustrative":{"type":"boolean","title":"Is Illustrative","default":false},"confidence":{"type":"string","title":"Confidence","default":"unverified"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"disclaimer":{"type":"string","title":"Disclaimer","default":""}},"type":"object","required":["gtip","cif_value_try","total_tax_try","landed_cost_try"],"title":"PrecheckTaxPreviewModel","description":"B2: precheck yanıtına gömülü gerçek vergi ön hesabı.\n\n`app.taxes.calculator.calculate_tax` çıktısının kompakt izdüşümü:\ntoplamlar + kalem listesi + uyarılar. Detaylı hesap /taxes ekranında."},"PurgeKindResult":{"properties":{"kind":{"type":"string","title":"Kind"},"deleted":{"type":"integer","title":"Deleted"},"cutoff":{"type":"string","format":"date-time","title":"Cutoff"},"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["kind","deleted","cutoff","success"],"title":"PurgeKindResult"},"PurgeReportResponse":{"properties":{"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"},"total_deleted":{"type":"integer","title":"Total Deleted"},"results":{"items":{"$ref":"#/components/schemas/PurgeKindResult"},"type":"array","title":"Results"}},"type":"object","required":["started_at","finished_at","total_deleted"],"title":"PurgeReportResponse"},"RagQueryRequest":{"properties":{"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"tenant_id":{"type":"string","maxLength":128,"title":"Tenant Id","default":"default"}},"type":"object","required":["question"],"title":"RagQueryRequest"},"RagQueryResponse":{"properties":{"answer":{"type":"string","title":"Answer"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"citations":{"items":{"$ref":"#/components/schemas/CitationModel"},"type":"array","title":"Citations"},"status":{"type":"string","enum":["answered","insufficient_sources","clarify"],"title":"Status"},"answer_kind":{"type":"string","enum":["answer","clarify","redirect"],"title":"Answer Kind","default":"answer"},"intent":{"type":"string","enum":["product","legal","out_of_scope","general"],"title":"Intent","default":"general"},"summary":{"type":"string","title":"Summary","default":""},"assessment":{"anyOf":[{"$ref":"#/components/schemas/AssessmentModel"},{"type":"null"}]},"regulation_notes":{"items":{"$ref":"#/components/schemas/RegulationNoteModel"},"type":"array","title":"Regulation Notes"},"unknowns":{"items":{"type":"string"},"type":"array","title":"Unknowns"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"},"clarifying_questions":{"items":{"type":"string"},"type":"array","title":"Clarifying Questions"},"enforcement_report":{"anyOf":[{"$ref":"#/components/schemas/EnforcementReportModelOut"},{"type":"null"}]},"unverified_citations":{"type":"boolean","title":"Unverified Citations","default":false}},"type":"object","required":["answer","confidence","citations","status"],"title":"RagQueryResponse"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"role":{"type":"string","title":"Role","default":"viewer"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"RegisterResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"tenant_id":{"type":"string","title":"Tenant Id"},"role":{"type":"string","title":"Role"}},"type":"object","required":["user_id","email","tenant_id","role"],"title":"RegisterResponse"},"RegulationNoteModel":{"properties":{"claim":{"type":"string","title":"Claim"},"source_index":{"type":"integer","minimum":0.0,"title":"Source Index"},"overlap":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Overlap"}},"type":"object","required":["claim","source_index"],"title":"RegulationNoteModel","description":"Yalniz RAG chunk'ina dayali somut iddia."},"RequiredDocumentModel":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["required","conditional","recommended","not_applicable"],"title":"Status"},"reason":{"type":"string","title":"Reason"},"source_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Hint"},"provided":{"type":"boolean","title":"Provided","default":false}},"type":"object","required":["code","name","status","reason"],"title":"RequiredDocumentModel"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","maxLength":512,"minLength":8,"title":"Token"},"new_password":{"type":"string","maxLength":256,"minLength":12,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"RetentionPolicyListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/RetentionPolicyModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"RetentionPolicyListResponse"},"RetentionPolicyModel":{"properties":{"kind":{"type":"string","title":"Kind"},"retention_days":{"type":"integer","title":"Retention Days"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"last_purge_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Purge At"},"last_purge_deleted_count":{"type":"integer","title":"Last Purge Deleted Count","default":0}},"type":"object","required":["kind","retention_days"],"title":"RetentionPolicyModel"},"RetentionPolicyPatchRequest":{"properties":{"retention_days":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Retention Days"}},"type":"object","required":["retention_days"],"title":"RetentionPolicyPatchRequest"},"RetrievalDebugRequest":{"properties":{"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"tenant_id":{"type":"string","maxLength":128,"title":"Tenant Id","default":"default"},"top_k":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Top K","default":6}},"type":"object","required":["question"],"title":"RetrievalDebugRequest","description":"V4-G: Hybrid retrieval debug request (admin-only)."},"RetrievalDebugResponse":{"properties":{"question":{"type":"string","title":"Question"},"expanded":{"additionalProperties":true,"type":"object","title":"Expanded"},"dense_results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Dense Results"},"lexical_results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Lexical Results"},"fused":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Fused"},"reranked":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reranked"},"final":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Final"}},"type":"object","required":["question","expanded"],"title":"RetrievalDebugResponse","description":"V4-G: Hybrid pipeline ara katmanlari + final cevap."},"ScanRequest":{"properties":{"tenant_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},"type":"object","title":"ScanRequest"},"ScanResponse":{"properties":{"scanned_at":{"type":"string","title":"Scanned At"},"tenant_id":{"type":"string","title":"Tenant Id"},"new_source_versions":{"type":"integer","title":"New Source Versions"},"new_legal_effects":{"type":"integer","title":"New Legal Effects"},"notifications_created":{"type":"integer","title":"Notifications Created"},"last_seen_source_version_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Seen Source Version Id"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["scanned_at","tenant_id","new_source_versions","new_legal_effects","notifications_created","last_seen_source_version_id","warnings"],"title":"ScanResponse"},"SignupRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":256,"minLength":12,"title":"Password"},"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Display Name"},"workspace_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Workspace Name"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"},"invite_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invite Token"},"consent_privacy_version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Consent Privacy Version"},"consent_terms_version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Consent Terms Version"},"consent_cookie_version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Consent Cookie Version"}},"type":"object","required":["email","password"],"title":"SignupRequest"},"SignupResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"requires_verification":{"type":"boolean","title":"Requires Verification"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type"},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"user":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"User"}},"type":"object","required":["user_id","tenant_id","requires_verification"],"title":"SignupResponse","description":"Signup sonucu.\n\n`requires_verification=True` olagan akistir; access_token vb. alanlari\nnull kalir. Davet token'i ile gelinmis ve davet email'i imzaliysa\n`requires_verification=False` doner ve direkt /auth/login cevabiyla\nayni sekil (LoginResponse) doldurulur (kullanici turnike yemeden tek\nadimda icerideymis gibi devam eder)."},"SourceContextChunk":{"properties":{"chunk_index":{"type":"integer","title":"Chunk Index"},"content":{"type":"string","title":"Content"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"is_cited":{"type":"boolean","title":"Is Cited","default":false}},"type":"object","required":["chunk_index","content"],"title":"SourceContextChunk","description":"Kaynak okuyucu için tek bir chunk (atıf yapılan + komşuları)."},"SourceContextResponse":{"properties":{"chunk_id":{"type":"integer","title":"Chunk Id"},"document_id":{"type":"integer","title":"Document Id"},"source_name":{"type":"string","title":"Source Name"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"},"file_available":{"type":"boolean","title":"File Available","default":false},"file_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Kind"},"chunks":{"items":{"$ref":"#/components/schemas/SourceContextChunk"},"type":"array","title":"Chunks"}},"type":"object","required":["chunk_id","document_id","source_name"],"title":"SourceContextResponse","description":"`/rag/source/{chunk_id}/context` yanıtı — atıf pasajını belgenin içinde\nkomşu chunk'larla birlikte gösterir; indirilebilir yerel dosya var mı bildirir."},"SourceEvidenceModel":{"properties":{"source_name":{"type":"string","title":"Source Name"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"claim":{"type":"string","title":"Claim"}},"type":"object","required":["source_name","claim"],"title":"SourceEvidenceModel"},"SubProcessorItem":{"properties":{"provider":{"type":"string","title":"Provider"},"service":{"type":"string","title":"Service"},"location":{"type":"string","title":"Location"},"data_types":{"items":{"type":"string"},"type":"array","title":"Data Types"},"dpa_available":{"type":"boolean","title":"Dpa Available","default":false},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["provider","service","location"],"title":"SubProcessorItem"},"SubProcessorListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/SubProcessorItem"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"SubProcessorListResponse"},"SubscriptionListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/SubscriptionModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"SubscriptionListResponse"},"SubscriptionModel":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"plan_id":{"type":"string","title":"Plan Id"},"status":{"type":"string","title":"Status"},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Ends At"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"type":"string","format":"date-time","title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Canceled At"},"payment_method_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Method Id"},"billing_address_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billing Address Id"},"past_due_grace_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Past Due Grace Until"}},"type":"object","required":["id","tenant_id","plan_id","status","current_period_start","current_period_end"],"title":"SubscriptionModel"},"SupportContactRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"email":{"type":"string","maxLength":200,"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"subject":{"type":"string","maxLength":200,"minLength":2,"title":"Subject"},"body":{"type":"string","maxLength":4000,"minLength":10,"title":"Body"},"category":{"type":"string","enum":["genel","teknik","fatura","kvkk","pilot","diger"],"title":"Category","default":"genel"},"locale":{"type":"string","maxLength":8,"title":"Locale","default":"tr"},"website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Website"}},"type":"object","required":["name","email","subject","body"],"title":"SupportContactRequest"},"SupportContactResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"message_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Message Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["ok"],"title":"SupportContactResponse"},"SupportMessageListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/SupportMessageModel"},"type":"array","title":"Items"}},"type":"object","required":["count"],"title":"SupportMessageListResponse"},"SupportMessageModel":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"category":{"type":"string","title":"Category"},"locale":{"type":"string","title":"Locale"},"status":{"type":"string","title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"replied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Replied At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","name","email","subject","body","category","locale","status"],"title":"SupportMessageModel"},"SupportMessagePatchRequest":{"properties":{"status":{"anyOf":[{"type":"string","enum":["open","in_progress","resolved","spam"]},{"type":"null"}],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Assigned To"}},"type":"object","title":"SupportMessagePatchRequest"},"TaxCalculationRequest":{"properties":{"gtip":{"type":"string","maxLength":12,"minLength":4,"title":"Gtip"},"origin_country":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Origin Country"},"regime":{"type":"string","enum":["serbest_dolasima_giris","ihracat","transit","antrepo","gecici_ithalat","dahilde_isleme"],"title":"Regime","default":"serbest_dolasima_giris"},"invoice_value":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Invoice Value"},"invoice_currency":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Invoice Currency"},"cif_value_try":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cif Value Try"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Fx Rate"},"quantity":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Quantity"},"quantity_unit":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Quantity Unit"},"is_deferred_payment":{"type":"boolean","title":"Is Deferred Payment","default":false},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["gtip"],"title":"TaxCalculationRequest"},"TaxCalculationResponse-Input":{"properties":{"gtip":{"type":"string","title":"Gtip"},"gtip_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gtip Description"},"origin_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country"},"regime":{"type":"string","title":"Regime"},"cif_value_try":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Cif Value Try"},"invoice_value":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Invoice Value"},"invoice_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Currency"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Fx Rate"},"lines":{"items":{"$ref":"#/components/schemas/TaxLineModel-Input"},"type":"array","title":"Lines"},"total_tax_try":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Total Tax Try"},"landed_cost_try":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Landed Cost Try"},"fallback_used":{"type":"boolean","title":"Fallback Used"},"is_illustrative":{"type":"boolean","title":"Is Illustrative","default":false},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"},"sources":{"items":{"$ref":"#/components/schemas/SourceEvidenceModel"},"type":"array","title":"Sources"},"disclaimer":{"type":"string","title":"Disclaimer"},"confidence":{"type":"string","enum":["manual_curated","llm_extracted","unverified"],"title":"Confidence"}},"type":"object","required":["gtip","origin_country","regime","cif_value_try","invoice_value","invoice_currency","fx_rate","lines","total_tax_try","landed_cost_try","fallback_used","disclaimer","confidence"],"title":"TaxCalculationResponse"},"TaxCalculationResponse-Output":{"properties":{"gtip":{"type":"string","title":"Gtip"},"gtip_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gtip Description"},"origin_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country"},"regime":{"type":"string","title":"Regime"},"cif_value_try":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Cif Value Try"},"invoice_value":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Invoice Value"},"invoice_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Currency"},"fx_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Fx Rate"},"lines":{"items":{"$ref":"#/components/schemas/TaxLineModel-Output"},"type":"array","title":"Lines"},"total_tax_try":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Tax Try"},"landed_cost_try":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Landed Cost Try"},"fallback_used":{"type":"boolean","title":"Fallback Used"},"is_illustrative":{"type":"boolean","title":"Is Illustrative","default":false},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"},"sources":{"items":{"$ref":"#/components/schemas/SourceEvidenceModel"},"type":"array","title":"Sources"},"disclaimer":{"type":"string","title":"Disclaimer"},"confidence":{"type":"string","enum":["manual_curated","llm_extracted","unverified"],"title":"Confidence"}},"type":"object","required":["gtip","origin_country","regime","cif_value_try","invoice_value","invoice_currency","fx_rate","lines","total_tax_try","landed_cost_try","fallback_used","disclaimer","confidence"],"title":"TaxCalculationResponse"},"TaxDataStatusModel":{"properties":{"available":{"type":"boolean","title":"Available","default":false},"status":{"type":"string","enum":["calculated","missing_fx","missing_value","no_data","engine_error","not_in_scope","needs_gtip","needs_external_lookup"],"title":"Status","default":"not_in_scope"},"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"TaxDataStatusModel"},"TaxExportRequest":{"properties":{"payload":{"$ref":"#/components/schemas/TaxCalculationResponse-Input"},"format":{"type":"string","enum":["pdf","excel"],"title":"Format"}},"type":"object","required":["payload","format"],"title":"TaxExportRequest"},"TaxLineModel-Input":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"basis":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Basis"},"basis_explanation":{"type":"string","title":"Basis Explanation"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"confidence":{"type":"string","enum":["manual_curated","llm_extracted","unverified"],"title":"Confidence"},"otv_unit_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Otv Unit Amount"},"otv_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Otv Unit"}},"type":"object","required":["code","name","rate","amount","basis","basis_explanation","confidence"],"title":"TaxLineModel"},"TaxLineModel-Output":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"basis":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Basis"},"basis_explanation":{"type":"string","title":"Basis Explanation"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"confidence":{"type":"string","enum":["manual_curated","llm_extracted","unverified"],"title":"Confidence"},"otv_unit_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Otv Unit Amount"},"otv_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Otv Unit"}},"type":"object","required":["code","name","rate","amount","basis","basis_explanation","confidence"],"title":"TaxLineModel"},"TaxRateMatrixResponse":{"properties":{"gtip":{"type":"string","title":"Gtip"},"gtip_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gtip Description"},"regime":{"type":"string","title":"Regime"},"match_kind":{"type":"string","enum":["exact","prefix","needs_subselection","chapter_missing","none"],"title":"Match Kind"},"matched_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Prefix"},"rows":{"items":{"$ref":"#/components/schemas/TaxRateMatrixRow"},"type":"array","title":"Rows"},"sub_breakouts":{"items":{"$ref":"#/components/schemas/TaxRateSubBreakout"},"type":"array","title":"Sub Breakouts"},"covered_chapter_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Covered Chapter Count"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"disclaimer":{"type":"string","title":"Disclaimer","default":"Hesaplanan vergiler ön bilgilendirme amaçlıdır; nihai matrah ve oran resmi karar metnine ve müşavir teyidine bağlıdır."}},"type":"object","required":["gtip","regime","match_kind"],"title":"TaxRateMatrixResponse"},"TaxRateMatrixRow":{"properties":{"origin_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country"},"origin_label":{"type":"string","title":"Origin Label"},"gtip_prefix":{"type":"string","title":"Gtip Prefix"},"customs_duty_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Customs Duty Rate"},"additional_duty_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Additional Duty Rate"},"igv_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Igv Rate"},"igv_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Igv Amount"},"igv_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Igv Unit"},"otv_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Otv Rate"},"otv_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Otv Basis"},"anti_dumping_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Anti Dumping Rate"},"anti_dumping_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anti Dumping Unit"},"kkdf_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Kkdf Rate"},"kdv_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Kdv Rate"},"source_citation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Citation"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"effective_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective From"},"confidence":{"type":"string","title":"Confidence","default":"unverified"},"is_illustrative":{"type":"boolean","title":"Is Illustrative","default":false}},"type":"object","required":["origin_label","gtip_prefix"],"title":"TaxRateMatrixRow","description":"Tek menşe grubunun oran satırı (menşe-grubu × vergi-türü matrisi)."},"TaxRateSubBreakout":{"properties":{"code":{"type":"string","title":"Code"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["code"],"title":"TaxRateSubBreakout"},"TenantDeletionRequest":{"properties":{"immediate":{"type":"boolean","title":"Immediate","default":false},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"TenantDeletionRequest"},"TenantLifecycleResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"status":{"type":"string","title":"Status"},"suspended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspended At"}},"type":"object","required":["tenant_id","status"],"title":"TenantLifecycleResponse"},"TotpDisableRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"TotpDisableRequest"},"TotpEnrollResponse":{"properties":{"secret":{"type":"string","title":"Secret"},"provisioning_uri":{"type":"string","title":"Provisioning Uri"},"qr_png_base64":{"type":"string","title":"Qr Png Base64"},"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"}},"type":"object","required":["secret","provisioning_uri","qr_png_base64","recovery_codes"],"title":"TotpEnrollResponse"},"TotpRecoveryRegenRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"TotpRecoveryRegenRequest"},"TotpRecoveryRegenResponse":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"}},"type":"object","required":["recovery_codes"],"title":"TotpRecoveryRegenResponse"},"TotpVerifyRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"TotpVerifyRequest"},"UnreadCountResponse":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"UnreadCountResponse"},"UpgradeRequest":{"properties":{"new_plan_id":{"type":"string","maxLength":64,"minLength":1,"title":"New Plan Id"},"tenant_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["new_plan_id"],"title":"UpgradeRequest"},"UsageSummaryResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"period":{"type":"string","title":"Period"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"quota":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object","title":"Quota"},"usage":{"additionalProperties":{"type":"integer"},"type":"object","title":"Usage"}},"type":"object","required":["tenant_id","period"],"title":"UsageSummaryResponse"},"UserDeletionRequest":{"properties":{"immediate":{"type":"boolean","title":"Immediate","default":false},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"UserDeletionRequest"},"UserSummary":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"tenant_id":{"type":"string","title":"Tenant Id"},"role":{"type":"string","title":"Role"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["user_id","tenant_id","role"],"title":"UserSummary"},"ValidateDocumentsRequest":{"properties":{"document_ids":{"items":{"type":"integer"},"type":"array","title":"Document Ids"},"tenant_id":{"type":"string","maxLength":128,"title":"Tenant Id","default":"default"}},"type":"object","title":"ValidateDocumentsRequest"},"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"},"VerifyRequest":{"properties":{"token":{"type":"string","maxLength":512,"minLength":8,"title":"Token"}},"type":"object","required":["token"],"title":"VerifyRequest"},"WebhookProcessResponse":{"properties":{"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id"},"processed":{"type":"boolean","title":"Processed","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"WebhookProcessResponse"}}}}