{"openapi":"3.1.0","info":{"title":"TinyBill","version":"0.1.0"},"paths":{"/api/auth/signup":{"post":{"tags":["Auth"],"summary":"Signup","operationId":"signup_api_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["Auth"],"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/forgot-password":{"post":{"tags":["Auth"],"summary":"Forgot Password","operationId":"forgot_password_api_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/reset-password":{"post":{"tags":["Auth"],"summary":"Reset Password","operationId":"reset_password_api_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/profile":{"get":{"tags":["Profile"],"summary":"Get Profile","operationId":"get_profile_api_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileRead"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Profile"],"summary":"Update Profile","operationId":"update_profile_api_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/profile/logo":{"post":{"tags":["Profile"],"summary":"Upload Logo","operationId":"upload_logo_api_profile_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_logo_api_profile_logo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/profile/test-slack":{"post":{"tags":["Profile"],"summary":"Test Slack","operationId":"test_slack_api_profile_test_slack_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/profile/logo/{filename}":{"get":{"tags":["Profile"],"summary":"Serve Logo","description":"Serve logo files from storage (works with both local and GCS).","operationId":"serve_logo_api_profile_logo__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/profile/email-templates":{"get":{"tags":["Profile"],"summary":"Get Email Templates","operationId":"get_email_templates_api_profile_email_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Profile"],"summary":"Update Email Templates","operationId":"update_email_templates_api_profile_email_templates_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplatesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/profile/email-templates/reset":{"post":{"tags":["Profile"],"summary":"Reset Email Templates","operationId":"reset_email_templates_api_profile_email_templates_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/clients":{"get":{"tags":["Clients"],"summary":"List Clients","operationId":"list_clients_api_clients_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClientRead"},"type":"array","title":"Response List Clients Api Clients Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Clients"],"summary":"Create Client","operationId":"create_client_api_clients_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/clients/{client_id}":{"get":{"tags":["Clients"],"summary":"Get Client","operationId":"get_client_api_clients__client_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"integer","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Clients"],"summary":"Update Client","operationId":"update_client_api_clients__client_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"integer","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Clients"],"summary":"Delete Client","operationId":"delete_client_api_clients__client_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"integer","title":"Client Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices":{"get":{"tags":["Invoices"],"summary":"List Invoices","operationId":"list_invoices_api_invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"client_id","in":"query","required":false,"schema":{"type":"integer","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceRead"},"title":"Response List Invoices Api Invoices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Invoices"],"summary":"Create Invoice","operationId":"create_invoice_api_invoices_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/export/csv":{"get":{"tags":["Invoices"],"summary":"Export Invoices Csv","operationId":"export_invoices_csv_api_invoices_export_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/invoices/batch/remind":{"post":{"tags":["Invoices"],"summary":"Batch Remind","description":"Send reminder emails to all specified invoices that are sent/overdue.","operationId":"batch_remind_api_invoices_batch_remind_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchInvoiceIds"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/invoices/batch/status":{"post":{"tags":["Invoices"],"summary":"Batch Status Update","description":"Batch update invoice status to paid or draft.","operationId":"batch_status_update_api_invoices_batch_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchStatusUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/invoices/batch/export-pdf":{"post":{"tags":["Invoices"],"summary":"Batch Export Pdf","description":"Generate PDFs for all specified invoices and return as a zip file.","operationId":"batch_export_pdf_api_invoices_batch_export_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchInvoiceIds"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/invoices/batch":{"delete":{"tags":["Invoices"],"summary":"Batch Delete","description":"Delete all specified invoices (only draft status).","operationId":"batch_delete_api_invoices_batch_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchInvoiceIds"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/invoices/{invoice_id}/duplicate":{"post":{"tags":["Invoices"],"summary":"Duplicate Invoice","operationId":"duplicate_invoice_api_invoices__invoice_id__duplicate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/{invoice_id}/deposit":{"post":{"tags":["Invoices"],"summary":"Create Deposit Invoice","description":"Create a deposit/milestone invoice as a percentage of the parent.","operationId":"create_deposit_invoice_api_invoices__invoice_id__deposit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"percent","in":"query","required":true,"schema":{"type":"number","maximum":100,"exclusiveMinimum":0,"title":"Percent"}},{"name":"label","in":"query","required":false,"schema":{"type":"string","description":"deposit, milestone, or final","default":"Deposit","title":"Label"},"description":"deposit, milestone, or final"}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/{invoice_id}":{"get":{"tags":["Invoices"],"summary":"Get Invoice","operationId":"get_invoice_api_invoices__invoice_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Invoices"],"summary":"Update Invoice","operationId":"update_invoice_api_invoices__invoice_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Invoices"],"summary":"Delete Invoice","operationId":"delete_invoice_api_invoices__invoice_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/{invoice_id}/pdf":{"get":{"tags":["Invoices"],"summary":"Download Pdf","operationId":"download_pdf_api_invoices__invoice_id__pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/{invoice_id}/send":{"post":{"tags":["Invoices"],"summary":"Send Invoice","operationId":"send_invoice_api_invoices__invoice_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invoices/ai-draft":{"post":{"tags":["Invoices"],"summary":"Ai Draft Invoice","description":"Use Claude AI to parse a natural-language prompt into structured invoice data. Pro plan only.","operationId":"ai_draft_invoice_api_invoices_ai_draft_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/invoices/parse-text":{"post":{"tags":["Invoices"],"summary":"Parse Invoice Text","description":"Parse plain text into structured invoice data. No AI needed — just regex.","operationId":"parse_invoice_text_api_invoices_parse_text_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/invoices/{invoice_id}/status":{"patch":{"tags":["Invoices"],"summary":"Update Status","operationId":"update_status_api_invoices__invoice_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/stats":{"get":{"tags":["Dashboard"],"summary":"Get Stats","operationId":"get_stats_api_dashboard_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dashboard/analytics":{"get":{"tags":["Dashboard"],"summary":"Get Analytics","description":"Revenue chart data, top clients, and quick stats.","operationId":"get_analytics_api_dashboard_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/dashboard/cashflow":{"get":{"tags":["Dashboard"],"summary":"Cashflow Forecast","description":"Forecast cash flow based on historical invoices, recurring templates, and expenses.","operationId":"cashflow_forecast_api_dashboard_cashflow_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":6,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/dashboard/seed":{"post":{"tags":["Dashboard"],"summary":"Seed Test Data","description":"Generate realistic test data for charts and dashboard.","operationId":"seed_test_data_api_dashboard_seed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/status":{"get":{"tags":["Billing"],"summary":"Billing Status","operationId":"billing_status_api_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/promo":{"post":{"tags":["Billing"],"summary":"Apply Promo","operationId":"apply_promo_api_billing_promo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create Checkout","operationId":"create_checkout_api_billing_checkout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/portal":{"post":{"tags":["Billing"],"summary":"Customer Portal","operationId":"customer_portal_api_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/webhook":{"post":{"tags":["Billing"],"summary":"Stripe Webhook","operationId":"stripe_webhook_api_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/stats":{"get":{"tags":["Admin"],"summary":"Admin Stats","operationId":"admin_stats_api_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/free-invoice":{"post":{"tags":["free-invoice"],"summary":"Create Free Invoice","operationId":"create_free_invoice_api_free_invoice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeInvoiceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pay/{token}":{"get":{"tags":["Payments"],"summary":"Payment Page","operationId":"payment_page_pay__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pay/{token}/checkout":{"post":{"tags":["Payments"],"summary":"Create Payment Checkout","operationId":"create_payment_checkout_pay__token__checkout_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents":{"get":{"tags":["Documents"],"summary":"List Documents","operationId":"list_documents_api_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Documents"],"summary":"Upload Document","operationId":"upload_document_api_documents_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_api_documents_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/documents/{doc_id}/send":{"post":{"tags":["Documents"],"summary":"Send For Signing","operationId":"send_for_signing_api_documents__doc_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{doc_id}/pdf":{"get":{"tags":["Documents"],"summary":"Download Document","operationId":"download_document_api_documents__doc_id__pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{doc_id}":{"delete":{"tags":["Documents"],"summary":"Delete Document","operationId":"delete_document_api_documents__doc_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{doc_id}/fields":{"get":{"tags":["Documents"],"summary":"Get Fields","operationId":"get_fields_api_documents__doc_id__fields_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Documents"],"summary":"Save Fields","operationId":"save_fields_api_documents__doc_id__fields_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{doc_id}/auto-detect":{"post":{"tags":["Documents"],"summary":"Auto Detect Fields","operationId":"auto_detect_fields_api_documents__doc_id__auto_detect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sign/{token}/fields":{"get":{"tags":["Signing"],"summary":"Get Sign Fields","description":"Public endpoint — returns fields for signing UI.","operationId":"get_sign_fields_sign__token__fields_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sign/{token}":{"get":{"tags":["Signing"],"summary":"Signing Page","operationId":"signing_page_sign__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Signing"],"summary":"Submit Signature","operationId":"submit_signature_sign__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureSubmission"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sign/{token}/preview":{"get":{"tags":["Signing"],"summary":"Preview Pdf","operationId":"preview_pdf_sign__token__preview_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sign/{token}/download":{"get":{"tags":["Signing"],"summary":"Download Signed","operationId":"download_signed_sign__token__download_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recurring-invoices":{"get":{"tags":["Recurring"],"summary":"List Recurring","operationId":"list_recurring_api_recurring_invoices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Recurring"],"summary":"Create Recurring","operationId":"create_recurring_api_recurring_invoices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/recurring-invoices/{rec_id}":{"get":{"tags":["Recurring"],"summary":"Get Recurring","operationId":"get_recurring_api_recurring_invoices__rec_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rec_id","in":"path","required":true,"schema":{"type":"integer","title":"Rec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Recurring"],"summary":"Update Recurring","operationId":"update_recurring_api_recurring_invoices__rec_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rec_id","in":"path","required":true,"schema":{"type":"integer","title":"Rec Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Recurring"],"summary":"Delete Recurring","operationId":"delete_recurring_api_recurring_invoices__rec_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rec_id","in":"path","required":true,"schema":{"type":"integer","title":"Rec Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recurring-invoices/{rec_id}/toggle":{"patch":{"tags":["Recurring"],"summary":"Toggle Recurring","operationId":"toggle_recurring_api_recurring_invoices__rec_id__toggle_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rec_id","in":"path","required":true,"schema":{"type":"integer","title":"Rec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recurring-invoices/{rec_id}/run":{"post":{"tags":["Recurring"],"summary":"Run Recurring Now","description":"Manually trigger invoice generation from this template.","operationId":"run_recurring_now_api_recurring_invoices__rec_id__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rec_id","in":"path","required":true,"schema":{"type":"integer","title":"Rec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects":{"get":{"tags":["Projects & Time"],"summary":"List Projects","operationId":"list_projects_api_projects_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Projects & Time"],"summary":"Create Project","operationId":"create_project_api_projects_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{project_id}":{"get":{"tags":["Projects & Time"],"summary":"Get Project","operationId":"get_project_api_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Projects & Time"],"summary":"Update Project","operationId":"update_project_api_projects__project_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects & Time"],"summary":"Delete Project","operationId":"delete_project_api_projects__project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/time-entries":{"get":{"tags":["Projects & Time"],"summary":"List Time Entries","operationId":"list_time_entries_api_time_entries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"type":"integer","title":"Project Id"}},{"name":"invoiced","in":"query","required":false,"schema":{"type":"boolean","title":"Invoiced"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Projects & Time"],"summary":"Create Time Entry","operationId":"create_time_entry_api_time_entries_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/time-entries/{entry_id}/stop":{"post":{"tags":["Projects & Time"],"summary":"Stop Timer","description":"Stop a running timer.","operationId":"stop_timer_api_time_entries__entry_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/time-entries/{entry_id}":{"put":{"tags":["Projects & Time"],"summary":"Update Time Entry","operationId":"update_time_entry_api_time_entries__entry_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects & Time"],"summary":"Delete Time Entry","operationId":"delete_time_entry_api_time_entries__entry_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/time-entries/invoice":{"post":{"tags":["Projects & Time"],"summary":"Invoice Time Entries","description":"Convert selected time entries into an invoice.","operationId":"invoice_time_entries_api_time_entries_invoice_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer"},"title":"Entry Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses":{"get":{"tags":["Expenses"],"summary":"List Expenses","operationId":"list_expenses_api_expenses_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","title":"Category"}},{"name":"month","in":"query","required":false,"schema":{"type":"string","title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Expenses"],"summary":"Create Expense","operationId":"create_expense_api_expenses_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses/summary":{"get":{"tags":["Expenses"],"summary":"Expense Summary","description":"Get expense totals by category and month.","operationId":"expense_summary_api_expenses_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"integer","title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses/export/csv":{"get":{"tags":["Expenses"],"summary":"Export Expenses Csv","operationId":"export_expenses_csv_api_expenses_export_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/expenses/{expense_id}/receipt":{"post":{"tags":["Expenses"],"summary":"Upload Receipt","description":"Upload a receipt image for an expense.","operationId":"upload_receipt_api_expenses__expense_id__receipt_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"integer","title":"Expense Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_receipt_api_expenses__expense_id__receipt_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses/{expense_id}":{"get":{"tags":["Expenses"],"summary":"Get Expense","operationId":"get_expense_api_expenses__expense_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"integer","title":"Expense Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Expenses"],"summary":"Update Expense","operationId":"update_expense_api_expenses__expense_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"integer","title":"Expense Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Expenses"],"summary":"Delete Expense","operationId":"delete_expense_api_expenses__expense_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"integer","title":"Expense Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/expenses/categories/list":{"get":{"tags":["Expenses"],"summary":"List Categories","description":"Return available expense categories.","operationId":"list_categories_api_expenses_categories_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/clients/{client_id}/portal-link":{"post":{"tags":["Portal"],"summary":"Generate Portal Link","description":"Generate or regenerate a portal link for a client.","operationId":"generate_portal_link_api_clients__client_id__portal_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"integer","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/{token}":{"get":{"tags":["Portal"],"summary":"Client Portal","description":"Public client portal page.","operationId":"client_portal_portal__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/intake":{"post":{"tags":["Portal"],"summary":"Submit Intake","description":"Public endpoint — new client submits their info.","operationId":"submit_intake_api_intake_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/intake/{user_id}":{"get":{"tags":["Portal"],"summary":"Intake Form Page","operationId":"intake_form_page_intake__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contracts":{"get":{"tags":["Contracts"],"summary":"List Contracts","operationId":"list_contracts_api_contracts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Contracts"],"summary":"Create Contract","operationId":"create_contract_api_contracts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/contracts/templates":{"get":{"tags":["Contracts"],"summary":"Get Templates","description":"Return available contract templates.","operationId":"get_templates_api_contracts_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/contracts/from-template":{"post":{"tags":["Contracts"],"summary":"Create From Template","description":"Create a contract from a template.","operationId":"create_from_template_api_contracts_from_template_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_type","in":"query","required":true,"schema":{"type":"string","title":"Template Type"}},{"name":"client_id","in":"query","required":false,"schema":{"type":"integer","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contracts/{contract_id}":{"get":{"tags":["Contracts"],"summary":"Get Contract","operationId":"get_contract_api_contracts__contract_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Contracts"],"summary":"Update Contract","operationId":"update_contract_api_contracts__contract_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Contracts"],"summary":"Delete Contract","operationId":"delete_contract_api_contracts__contract_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"integer","title":"Contract Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sign-contract/{token}":{"get":{"tags":["Contracts"],"summary":"Contract Sign Page","description":"Public page where client can view and sign a contract.","operationId":"contract_sign_page_sign_contract__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contracts/sign/{token}":{"post":{"tags":["Contracts"],"summary":"Sign Contract","operationId":"sign_contract_api_contracts_sign__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tax-forms":{"get":{"tags":["Contracts"],"summary":"List Tax Forms","operationId":"list_tax_forms_api_tax_forms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Contracts"],"summary":"Request Tax Form","operationId":"request_tax_form_api_tax_forms_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tax-forms/{form_id}":{"delete":{"tags":["Contracts"],"summary":"Delete Tax Form","operationId":"delete_tax_form_api_tax_forms__form_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer","title":"Form Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tax-form/{token}":{"get":{"tags":["Contracts"],"summary":"Tax Form Page","description":"Public tax form fill page.","operationId":"tax_form_page_tax_form__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tax-forms/submit/{token}":{"post":{"tags":["Contracts"],"summary":"Submit Tax Form","operationId":"submit_tax_form_api_tax_forms_submit__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks":{"get":{"tags":["Webhooks"],"summary":"List Webhooks","operationId":"list_webhooks_api_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Webhooks"],"summary":"Create Webhook","operationId":"create_webhook_api_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/webhooks/{webhook_id}":{"put":{"tags":["Webhooks"],"summary":"Update Webhook","operationId":"update_webhook_api_webhooks__webhook_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","operationId":"delete_webhook_api_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/events":{"get":{"tags":["Webhooks"],"summary":"List Valid Events","operationId":"list_valid_events_api_webhooks_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/referrals":{"get":{"tags":["Referrals"],"summary":"Get Referral Info","operationId":"get_referral_info_api_referrals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/referrals/apply":{"post":{"tags":["Referrals"],"summary":"Apply Referral","operationId":"apply_referral_api_referrals_apply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","description":"Referral code to apply","title":"Code"},"description":"Referral code to apply"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proposals":{"get":{"tags":["Proposals"],"summary":"List Proposals","operationId":"list_proposals_api_proposals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Proposals"],"summary":"Create Proposal","operationId":"create_proposal_api_proposals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/proposals/{proposal_id}":{"get":{"tags":["Proposals"],"summary":"Get Proposal","operationId":"get_proposal_api_proposals__proposal_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Proposals"],"summary":"Update Proposal","operationId":"update_proposal_api_proposals__proposal_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Proposals"],"summary":"Delete Proposal","operationId":"delete_proposal_api_proposals__proposal_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proposals/{proposal_id}/send":{"post":{"tags":["Proposals"],"summary":"Send Proposal","operationId":"send_proposal_api_proposals__proposal_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proposals/{proposal_id}/convert":{"post":{"tags":["Proposals"],"summary":"Convert To Invoice","operationId":"convert_to_invoice_api_proposals__proposal_id__convert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/proposal/{token}":{"get":{"tags":["Proposals"],"summary":"Proposal Public Page","description":"Public page where client can view and accept/decline a proposal.","operationId":"proposal_public_page_proposal__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proposals/{token}/respond":{"post":{"tags":["Proposals"],"summary":"Respond To Proposal","description":"Public endpoint — no auth. Client accepts or declines.","operationId":"respond_to_proposal_api_proposals__token__respond_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"action","in":"query","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog":{"get":{"tags":["blog"],"summary":"List Posts","operationId":"list_posts_api_blog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blog/{slug}":{"get":{"tags":["blog"],"summary":"Get Post","operationId":"get_post_api_blog__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/import/clients":{"post":{"tags":["Import"],"summary":"Import Clients","operationId":"import_clients_api_import_clients_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_clients_api_import_clients_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/import/invoices":{"post":{"tags":["Import"],"summary":"Import Invoices","operationId":"import_invoices_api_import_invoices_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_invoices_api_import_invoices_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/import/expenses":{"post":{"tags":["Import"],"summary":"Import Expenses","operationId":"import_expenses_api_import_expenses_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_expenses_api_import_expenses_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/insights":{"get":{"tags":["Insights"],"summary":"Get Insights","operationId":"get_insights_api_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/receipts/scan":{"post":{"tags":["receipts"],"summary":"Scan Receipt","operationId":"scan_receipt_api_receipts_scan_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_scan_receipt_api_receipts_scan_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/reports/profit-by-client":{"get":{"tags":["Reports"],"summary":"Profit By Client","description":"Per-client profitability: revenue, costs, profit, margin.","operationId":"profit_by_client_api_reports_profit_by_client_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/reports/aging":{"get":{"tags":["Reports"],"summary":"Invoice Aging","description":"Invoice aging report — bucket unpaid invoices by days overdue.","operationId":"invoice_aging_api_reports_aging_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"BatchInvoiceIds":{"properties":{"invoice_ids":{"items":{"type":"integer"},"type":"array","title":"Invoice Ids"}},"type":"object","required":["invoice_ids"],"title":"BatchInvoiceIds"},"BatchStatusUpdate":{"properties":{"invoice_ids":{"items":{"type":"integer"},"type":"array","title":"Invoice Ids"},"status":{"type":"string","title":"Status"}},"type":"object","required":["invoice_ids","status"],"title":"BatchStatusUpdate"},"Body_import_clients_api_import_clients_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_clients_api_import_clients_post"},"Body_import_expenses_api_import_expenses_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_expenses_api_import_expenses_post"},"Body_import_invoices_api_import_invoices_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_invoices_api_import_invoices_post"},"Body_scan_receipt_api_receipts_scan_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"}},"type":"object","required":["image"],"title":"Body_scan_receipt_api_receipts_scan_post"},"Body_upload_document_api_documents_post":{"properties":{"title":{"type":"string","title":"Title"},"signer_name":{"type":"string","title":"Signer Name"},"signer_email":{"type":"string","title":"Signer Email","default":""},"expires_days":{"type":"integer","title":"Expires Days","default":0},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["title","signer_name","file"],"title":"Body_upload_document_api_documents_post"},"Body_upload_logo_api_profile_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_logo_api_profile_logo_post"},"Body_upload_receipt_api_expenses__expense_id__receipt_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_receipt_api_expenses__expense_id__receipt_post"},"ClientCreate":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","default":""},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","default":""},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","default":""},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""}},"type":"object","required":["name"],"title":"ClientCreate"},"ClientRead":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"},"address":{"type":"string","title":"Address"},"notes":{"type":"string","title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","email","phone","address","notes","created_at"],"title":"ClientRead"},"ClientUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ClientUpdate"},"ContractCreate":{"properties":{"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"title":{"type":"string","title":"Title"},"template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type","default":"custom"},"content":{"type":"string","title":"Content"},"signer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Name","default":""},"signer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Email","default":""}},"type":"object","required":["title","content"],"title":"ContractCreate"},"ContractUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"signer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Name"},"signer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Email"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"ContractUpdate"},"DashboardStats":{"properties":{"total_outstanding":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Outstanding"},"total_paid":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Paid"},"overdue_count":{"type":"integer","title":"Overdue Count"},"draft_count":{"type":"integer","title":"Draft Count"},"total_invoices":{"type":"integer","title":"Total Invoices"}},"type":"object","required":["total_outstanding","total_paid","overdue_count","draft_count","total_invoices"],"title":"DashboardStats"},"EmailTemplatesUpdate":{"properties":{"invoice_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Subject"},"invoice_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Body"},"reminder_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reminder Subject"},"reminder_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reminder Body"},"receipt_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Subject"},"receipt_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Body"}},"type":"object","title":"EmailTemplatesUpdate"},"ExpenseCreate":{"properties":{"date":{"type":"null","title":"Date"},"description":{"type":"string","title":"Description"},"amount":{"type":"number","title":"Amount"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","default":""},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor","default":""},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""},"is_billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Billable","default":false},"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["description","amount"],"title":"ExpenseCreate"},"ExpenseUpdate":{"properties":{"date":{"type":"null","title":"Date"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Billable"},"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"}},"type":"object","title":"ExpenseUpdate"},"FieldCreate":{"properties":{"field_type":{"type":"string","title":"Field Type"},"page":{"type":"integer","title":"Page"},"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y"},"width":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Width"},"height":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Height"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","default":""}},"type":"object","required":["field_type","page","x","y","width","height"],"title":"FieldCreate"},"FieldsPayload":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/FieldCreate"},"type":"array","title":"Fields"}},"type":"object","required":["fields"],"title":"FieldsPayload"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"FreeInvoiceRequest":{"properties":{"business_name":{"type":"string","title":"Business Name"},"business_email":{"type":"string","title":"Business Email","default":""},"business_address":{"type":"string","title":"Business Address","default":""},"client_name":{"type":"string","title":"Client Name"},"client_email":{"type":"string","title":"Client Email","default":""},"client_address":{"type":"string","title":"Client Address","default":""},"invoice_number":{"type":"string","title":"Invoice Number","default":"INV-001"},"issue_date":{"type":"string","title":"Issue Date","default":""},"due_date":{"type":"string","title":"Due Date","default":""},"tax_rate":{"type":"number","title":"Tax Rate","default":0},"notes":{"type":"string","title":"Notes","default":""},"line_items":{"items":{"$ref":"#/components/schemas/FreeLineItem"},"type":"array","title":"Line Items"}},"type":"object","required":["business_name","client_name","line_items"],"title":"FreeInvoiceRequest"},"FreeLineItem":{"properties":{"description":{"type":"string","title":"Description"},"quantity":{"type":"number","title":"Quantity"},"rate":{"type":"number","title":"Rate"}},"type":"object","required":["description","quantity","rate"],"title":"FreeLineItem"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvoiceCreate":{"properties":{"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"client_name":{"type":"string","title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email","default":""},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address","default":""},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"due_date":{"type":"string","format":"date","title":"Due Date"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Rate","default":"0.00"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""},"internal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Notes","default":""},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","default":"USD"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id","default":"classic"},"deposit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deposit Type","default":""},"deposit_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deposit Percent"},"parent_invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Invoice Id"},"scheduled_send_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Scheduled Send Date"},"line_items":{"items":{"$ref":"#/components/schemas/LineItemCreate"},"type":"array","title":"Line Items"}},"type":"object","required":["client_name","due_date","line_items"],"title":"InvoiceCreate"},"InvoiceRead":{"properties":{"id":{"type":"integer","title":"Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"status":{"type":"string","title":"Status"},"issue_date":{"type":"string","format":"date","title":"Issue Date"},"due_date":{"type":"string","format":"date","title":"Due Date"},"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"client_name":{"type":"string","title":"Client Name"},"client_email":{"type":"string","title":"Client Email"},"client_address":{"type":"string","title":"Client Address"},"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"},"notes":{"type":"string","title":"Notes"},"currency":{"type":"string","title":"Currency"},"template_id":{"type":"string","title":"Template Id","default":"classic"},"internal_notes":{"type":"string","title":"Internal Notes"},"deposit_type":{"type":"string","title":"Deposit Type","default":""},"deposit_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deposit Percent"},"parent_invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Invoice Id"},"paid_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Paid Date"},"scheduled_send_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Scheduled Send Date"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"payment_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"line_items":{"items":{"$ref":"#/components/schemas/LineItemRead"},"type":"array","title":"Line Items","default":[]}},"type":"object","required":["id","invoice_number","status","issue_date","due_date","client_id","client_name","client_email","client_address","subtotal","tax_rate","tax_amount","total","notes","currency","internal_notes","paid_date","sent_at","created_at","updated_at"],"title":"InvoiceRead"},"InvoiceUpdate":{"properties":{"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Rate"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"internal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Notes"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"deposit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deposit Type"},"deposit_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deposit Percent"},"scheduled_send_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Scheduled Send Date"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItemCreate"},"type":"array"},{"type":"null"}],"title":"Line Items"}},"type":"object","title":"InvoiceUpdate"},"LineItemCreate":{"properties":{"description":{"type":"string","title":"Description"},"quantity":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity"},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Rate"}},"type":"object","required":["description","quantity","rate"],"title":"LineItemCreate"},"LineItemIn":{"properties":{"description":{"type":"string","title":"Description"},"quantity":{"type":"number","title":"Quantity"},"rate":{"type":"number","title":"Rate"}},"type":"object","required":["description","quantity","rate"],"title":"LineItemIn"},"LineItemInput":{"properties":{"description":{"type":"string","title":"Description","default":""},"quantity":{"type":"number","title":"Quantity","default":1},"rate":{"type":"number","title":"Rate","default":0}},"type":"object","title":"LineItemInput"},"LineItemRead":{"properties":{"id":{"type":"integer","title":"Id"},"description":{"type":"string","title":"Description"},"quantity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Quantity"},"rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Rate"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","description","quantity","rate","amount","sort_order"],"title":"LineItemRead"},"LoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"ProfileRead":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"business_name":{"type":"string","title":"Business Name"},"business_address":{"type":"string","title":"Business Address"},"business_email":{"type":"string","title":"Business Email"},"business_phone":{"type":"string","title":"Business Phone"},"logo_path":{"type":"string","title":"Logo Path"},"payment_info":{"type":"string","title":"Payment Info"},"invoice_prefix":{"type":"string","title":"Invoice Prefix"},"currency":{"type":"string","title":"Currency"},"slack_webhook_url":{"type":"string","title":"Slack Webhook Url","default":""}},"type":"object","required":["id","email","name","business_name","business_address","business_email","business_phone","logo_path","payment_info","invoice_prefix","currency"],"title":"ProfileRead"},"ProfileUpdate":{"properties":{"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"business_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Address"},"business_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Email"},"business_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Phone"},"payment_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Info"},"invoice_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Prefix"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"slack_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slack Webhook Url"}},"type":"object","title":"ProfileUpdate"},"ProjectCreate":{"properties":{"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"hourly_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Rate","default":0},"budget_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Amount"},"budget_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Hours"},"is_retainer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Retainer","default":false},"retainer_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Retainer Hours"}},"type":"object","required":["name"],"title":"ProjectCreate"},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hourly_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Rate"},"budget_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Amount"},"budget_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Hours"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"is_retainer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Retainer"},"retainer_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Retainer Hours"}},"type":"object","title":"ProjectUpdate"},"ProposalCreate":{"properties":{"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"title":{"type":"string","title":"Title"},"client_name":{"type":"string","title":"Client Name","default":""},"client_email":{"type":"string","title":"Client Email","default":""},"content":{"type":"string","title":"Content","default":""},"line_items":{"items":{"$ref":"#/components/schemas/LineItemInput"},"type":"array","title":"Line Items","default":[]},"tax_rate":{"type":"number","title":"Tax Rate","default":0},"currency":{"type":"string","title":"Currency","default":"USD"},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Until"}},"type":"object","required":["title"],"title":"ProposalCreate"},"ProposalUpdate":{"properties":{"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItemInput"},"type":"array"},{"type":"null"}],"title":"Line Items"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Valid Until"}},"type":"object","title":"ProposalUpdate"},"RecurringCreate":{"properties":{"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client Id"},"client_name":{"type":"string","title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email","default":""},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address","default":""},"line_items":{"items":{"$ref":"#/components/schemas/LineItemIn"},"type":"array","title":"Line Items"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","default":""},"frequency":{"type":"string","enum":["weekly","biweekly","monthly","quarterly","yearly"],"title":"Frequency"},"next_run_date":{"type":"string","format":"date","title":"Next Run Date"},"due_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Due Days","default":15},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true},"auto_send":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Send","default":false}},"type":"object","required":["client_name","line_items","frequency","next_run_date"],"title":"RecurringCreate"},"RecurringUpdate":{"properties":{"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"client_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Address"},"line_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineItemIn"},"type":"array"},{"type":"null"}],"title":"Line Items"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frequency"},"next_run_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Run Date"},"due_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Due Days"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"auto_send":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Send"}},"type":"object","title":"RecurringUpdate"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"SignatureSubmission":{"properties":{"field_values":{"additionalProperties":true,"type":"object","title":"Field Values"}},"type":"object","required":["field_values"],"title":"SignatureSubmission"},"SignupRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"name":{"type":"string","title":"Name"}},"type":"object","required":["email","password","name"],"title":"SignupRequest"},"StatusUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"StatusUpdate"},"TimeEntryCreate":{"properties":{"project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"hourly_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Rate","default":0}},"type":"object","title":"TimeEntryCreate"},"TimeEntryUpdate":{"properties":{"project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"hourly_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Rate"}},"type":"object","title":"TimeEntryUpdate"},"TokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"user_id":{"type":"integer","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["token","user_id","name","email"],"title":"TokenResponse"},"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"},"WebhookCreate":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"}},"type":"object","required":["url","events"],"title":"WebhookCreate"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"WebhookUpdate"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}