{"openapi":"3.1.0","info":{"title":"贸算盘 TradeAbacus","description":"Export quoting and document API: FOB/CFR/CIF/DDP calculations, quotes, PI/CI/PL documents.","version":"0.1.0"},"paths":{"/api/v1/health":{"get":{"tags":["system"],"summary":"Health","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Health Api V1 Health Get"}}}}}},"head":{"tags":["system"],"summary":"Health Head","description":"监控服务常用 HEAD 探测；显式返回 200，避免被当成宕机。","operationId":"health_head_api_v1_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","operationId":"verify_email_api_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","operationId":"resend_verification_api_v1_auth_resend_verification_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_api_v1_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}}}}},"/api/v1/auth/logout-all":{"post":{"tags":["auth"],"summary":"Logout All","operationId":"logout_all_api_v1_auth_logout_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}}}}},"/api/v1/auth/sessions":{"get":{"tags":["auth"],"summary":"List Sessions","operationId":"list_sessions_api_v1_auth_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListOut"}}}}}}},"/api/v1/auth/sessions/{session_id}":{"delete":{"tags":["auth"],"summary":"Revoke Session","operationId":"revoke_session_api_v1_auth_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","operationId":"change_password_api_v1_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/v1/auth/accept-invite":{"post":{"tags":["auth"],"summary":"Accept Invite","operationId":"accept_invite_api_v1_auth_accept_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/quotes/calculate":{"post":{"tags":["quotes"],"summary":"Calculate","operationId":"calculate_api_v1_quotes_calculate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteInput-Input"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fx/rate":{"get":{"tags":["fx"],"summary":"Rate","operationId":"rate_api_v1_fx_rate_get","parameters":[{"name":"base","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:AED|AUD|CAD|CNY|EUR|GBP|JPY|USD)$","default":"USD","title":"Base"}},{"name":"target","in":"query","required":false,"schema":{"type":"string","pattern":"^(?:AED|AUD|CAD|CNY|EUR|GBP|JPY|USD)$","default":"CNY","title":"Target"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Rate Api V1 Fx Rate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}":{"get":{"tags":["workspaces"],"summary":"Workspace Summary","operationId":"workspace_summary_api_v1_workspaces__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/stats":{"get":{"tags":["workspaces"],"summary":"Stats","operationId":"stats_api_v1_workspaces__tenant_id__stats_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/customers":{"get":{"tags":["workspaces"],"summary":"List Customers","operationId":"list_customers_api_v1_workspaces__tenant_id__customers_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workspaces"],"summary":"Create Customer","operationId":"create_customer_api_v1_workspaces__tenant_id__customers_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/customers/{customer_id}":{"patch":{"tags":["workspaces"],"summary":"Update Customer","operationId":"update_customer_api_v1_workspaces__tenant_id__customers__customer_id__patch","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Delete Customer","operationId":"delete_customer_api_v1_workspaces__tenant_id__customers__customer_id__delete","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Customer Api V1 Workspaces  Tenant Id  Customers  Customer Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/feedback":{"post":{"tags":["workspaces"],"summary":"Create Feedback","operationId":"create_feedback_api_v1_workspaces__tenant_id__feedback_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes":{"get":{"tags":["workspaces"],"summary":"List Quotes","operationId":"list_quotes_api_v1_workspaces__tenant_id__quotes_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Status"}},{"name":"approval_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Approval Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workspaces"],"summary":"Create Quote","operationId":"create_quote_api_v1_workspaces__tenant_id__quotes_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}":{"get":{"tags":["workspaces"],"summary":"Get Quote","operationId":"get_quote_api_v1_workspaces__tenant_id__quotes__quote_id__get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workspaces"],"summary":"Update Quote","operationId":"update_quote_api_v1_workspaces__tenant_id__quotes__quote_id__patch","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/duplicate":{"post":{"tags":["workspaces"],"summary":"Duplicate Quote","operationId":"duplicate_quote_api_v1_workspaces__tenant_id__quotes__quote_id__duplicate_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/status":{"post":{"tags":["workspaces"],"summary":"Update Quote Status","operationId":"update_quote_status_api_v1_workspaces__tenant_id__quotes__quote_id__status_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/share":{"post":{"tags":["workspaces"],"summary":"Share Quote","operationId":"share_quote_api_v1_workspaces__tenant_id__quotes__quote_id__share_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Revoke Quote Share","description":"关闭分享：当前链接立即失效，之后可重新生成。","operationId":"revoke_quote_share_api_v1_workspaces__tenant_id__quotes__quote_id__share_delete","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Revoke Quote Share Api V1 Workspaces  Tenant Id  Quotes  Quote Id  Share Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/share/rotate":{"post":{"tags":["workspaces"],"summary":"Rotate Quote Share","description":"重置分享链接：旧链接立即失效。","operationId":"rotate_quote_share_api_v1_workspaces__tenant_id__quotes__quote_id__share_rotate_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/checks":{"get":{"tags":["workspaces"],"summary":"Quote Checks","description":"报价生成 PI / CI / PL 前的数据体检。","operationId":"quote_checks_api_v1_workspaces__tenant_id__quotes__quote_id__checks_get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsistencyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/send":{"post":{"tags":["workspaces"],"summary":"Send Quote","description":"把报价邮件发给客户：生成/复用分享链接，并记录发送时间与收件人。","operationId":"send_quote_api_v1_workspaces__tenant_id__quotes__quote_id__send_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSendOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/approval/submit":{"post":{"tags":["workspaces"],"summary":"Submit Quote Approval","operationId":"submit_quote_approval_api_v1_workspaces__tenant_id__quotes__quote_id__approval_submit_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/approval/approve":{"post":{"tags":["workspaces"],"summary":"Approve Quote","operationId":"approve_quote_api_v1_workspaces__tenant_id__quotes__quote_id__approval_approve_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/approval/reject":{"post":{"tags":["workspaces"],"summary":"Reject Quote","operationId":"reject_quote_api_v1_workspaces__tenant_id__quotes__quote_id__approval_reject_post","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/quotes/{quote_id}/documents/{doc_type}":{"get":{"tags":["workspaces"],"summary":"Quote Document","operationId":"quote_document_api_v1_workspaces__tenant_id__quotes__quote_id__documents__doc_type__get","parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant 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/v1/workspaces/{tenant_id}/members":{"get":{"tags":["workspaces"],"summary":"List Members","operationId":"list_members_api_v1_workspaces__tenant_id__members_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberOut"},"title":"Response List Members Api V1 Workspaces  Tenant Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/members/invite":{"post":{"tags":["workspaces"],"summary":"Invite Member","operationId":"invite_member_api_v1_workspaces__tenant_id__members_invite_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/members/{membership_id}":{"patch":{"tags":["workspaces"],"summary":"Update Member Role","operationId":"update_member_role_api_v1_workspaces__tenant_id__members__membership_id__patch","parameters":[{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Remove Member","operationId":"remove_member_api_v1_workspaces__tenant_id__members__membership_id__delete","parameters":[{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Remove Member Api V1 Workspaces  Tenant Id  Members  Membership Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/billing":{"get":{"tags":["workspaces"],"summary":"Billing","operationId":"billing_api_v1_workspaces__tenant_id__billing_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/billing/redeem":{"post":{"tags":["workspaces"],"summary":"Redeem Code","operationId":"redeem_code_api_v1_workspaces__tenant_id__billing_redeem_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/settings":{"get":{"tags":["workspaces"],"summary":"Get Settings","operationId":"get_settings_api_v1_workspaces__tenant_id__settings_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workspaces"],"summary":"Update Settings","operationId":"update_settings_api_v1_workspaces__tenant_id__settings_patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/api-tokens":{"get":{"tags":["api-tokens"],"summary":"List Api Tokens","operationId":"list_api_tokens_api_v1_workspaces__tenant_id__api_tokens_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["api-tokens"],"summary":"Create Api Token","operationId":"create_api_token_api_v1_workspaces__tenant_id__api_tokens_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenCreatedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/api-tokens/{token_id}":{"delete":{"tags":["api-tokens"],"summary":"Revoke Api Token","operationId":"revoke_api_token_api_v1_workspaces__tenant_id__api_tokens__token_id__delete","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/webhooks":{"get":{"tags":["webhooks"],"summary":"List Webhooks","operationId":"list_webhooks_api_v1_workspaces__tenant_id__webhooks_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks"],"summary":"Create Webhook","operationId":"create_webhook_api_v1_workspaces__tenant_id__webhooks_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/webhooks/{webhook_id}":{"delete":{"tags":["webhooks"],"summary":"Delete Webhook","operationId":"delete_webhook_api_v1_workspaces__tenant_id__webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Webhook Api V1 Workspaces  Tenant Id  Webhooks  Webhook Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Test Webhook","operationId":"test_webhook_api_v1_workspaces__tenant_id__webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/webhooks/{webhook_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"List Webhook Deliveries","operationId":"list_webhook_deliveries_api_v1_workspaces__tenant_id__webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/catalog":{"get":{"tags":["catalog"],"summary":"List Catalog","description":"产品目录：按最近使用排序，支持按名称/型号/HS 搜索。","operationId":"list_catalog_api_v1_workspaces__tenant_id__catalog_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/catalog/{item_id}":{"delete":{"tags":["catalog"],"summary":"Delete Catalog Item","operationId":"delete_catalog_item_api_v1_workspaces__tenant_id__catalog__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/config":{"get":{"tags":["billing"],"summary":"Billing Config","description":"公开的收款配置：只暴露结账链接，不含 seller id 或 ping token。","operationId":"billing_config_api_v1_billing_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Billing Config Api V1 Billing Config Get"}}}}}}},"/api/v1/billing/gumroad/ping/{token}":{"post":{"tags":["billing"],"summary":"Gumroad Ping","operationId":"gumroad_ping_api_v1_billing_gumroad_ping__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Gumroad Ping Api V1 Billing Gumroad Ping  Token  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/events":{"post":{"tags":["events"],"summary":"Track Event","operationId":"track_event_api_v1_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Track Event Api V1 Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/documents/parse":{"post":{"tags":["documents","documents"],"summary":"Parse Document File","operationId":"parse_document_file_api_v1_workspaces__tenant_id__documents_parse_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_parse_document_file_api_v1_workspaces__tenant_id__documents_parse_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentParseResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/documents/import":{"post":{"tags":["documents","documents"],"summary":"Import Document","operationId":"import_document_api_v1_workspaces__tenant_id__documents_import_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"customer_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":160,"title":"Customer Name"}},{"name":"mapping","in":"query","required":true,"schema":{"type":"string","description":"JSON 字符串，例如 {\"product_name\":0,\"quantity\":1}","title":"Mapping"},"description":"JSON 字符串，例如 {\"product_name\":0,\"quantity\":1}"},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^(USD|EUR|CNY)$","default":"USD","title":"Currency"}},{"name":"incoterm","in":"query","required":false,"schema":{"type":"string","pattern":"^(FOB|CFR|CIF|EXW|DDP)$","default":"FOB","title":"Incoterm"}},{"name":"payment_terms","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Payment Terms"}},{"name":"shipping_terms","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Shipping Terms"}},{"name":"customer_address","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Customer Address"}},{"name":"notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_document_api_v1_workspaces__tenant_id__documents_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/documents":{"get":{"tags":["documents","documents"],"summary":"List Documents","operationId":"list_documents_api_v1_workspaces__tenant_id__documents_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/documents/{document_id}":{"get":{"tags":["documents","documents"],"summary":"Get Document","operationId":"get_document_api_v1_workspaces__tenant_id__documents__document_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["documents","documents"],"summary":"Delete Document","operationId":"delete_document_api_v1_workspaces__tenant_id__documents__document_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/documents/{document_id}/checks":{"get":{"tags":["documents","documents"],"summary":"Document Checks","description":"生成单证前的体检：行金额、合计、收货人信息、包装数据是否自洽。","operationId":"document_checks_api_v1_workspaces__tenant_id__documents__document_id__checks_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsistencyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/documents/{document_id}/render/{doc_type}":{"get":{"tags":["documents","documents"],"summary":"Render Document","operationId":"render_document_api_v1_workspaces__tenant_id__documents__document_id__render__doc_type__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/documents/{document_id}/pdf/{doc_type}":{"get":{"tags":["documents","documents"],"summary":"Document Pdf","description":"服务端生成 PDF，手机端也能一键下载，不依赖浏览器打印对话框。","operationId":"document_pdf_api_v1_workspaces__tenant_id__documents__document_id__pdf__doc_type__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/export/quotes.csv":{"get":{"tags":["export"],"summary":"Export Quotes","operationId":"export_quotes_api_v1_workspaces__tenant_id__export_quotes_csv_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/export/customers.csv":{"get":{"tags":["export"],"summary":"Export Customers","operationId":"export_customers_api_v1_workspaces__tenant_id__export_customers_csv_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{tenant_id}/export/catalog.csv":{"get":{"tags":["export"],"summary":"Export Catalog","operationId":"export_catalog_api_v1_workspaces__tenant_id__export_catalog_csv_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/quotes/{token}":{"get":{"tags":["public"],"summary":"Public Quote","operationId":"public_quote_api_v1_public_quotes__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicQuoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/quotes/{token}/accept":{"post":{"tags":["public"],"summary":"Accept Quote","description":"客户在分享页点击接受：幂等，重复提交不会覆盖首次接受时间。","operationId":"accept_quote_api_v1_public_quotes__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicQuoteAcceptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicQuoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/quotes/{token}/documents/{doc_type}":{"get":{"tags":["public"],"summary":"Public Document","operationId":"public_document_api_v1_public_quotes__token__documents__doc_type__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/waitlist":{"post":{"tags":["waitlist"],"summary":"Join Waitlist","description":"幂等登记：无论邮箱是否已存在都返回同一响应，避免被用来枚举留资名单。","operationId":"join_waitlist_api_v1_waitlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leads/quote":{"post":{"tags":["leads"],"summary":"Quote Lead","description":"访客留邮箱领取报价：落库 + 发邮件，不要求注册。","operationId":"quote_lead_api_v1_leads_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteLeadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"token":{"type":"string","maxLength":80,"minLength":10,"title":"Token"}},"type":"object","required":["token"],"title":"AcceptInviteRequest"},"ApiTokenCreate":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"ApiTokenCreate"},"ApiTokenCreatedOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"token":{"type":"string","title":"Token"}},"type":"object","required":["id","name","prefix","created_at","token"],"title":"ApiTokenCreatedOut"},"ApiTokenListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApiTokenOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ApiTokenListOut"},"ApiTokenOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","name","prefix","created_at"],"title":"ApiTokenOut"},"ApprovalDecision":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","title":"ApprovalDecision"},"AuthResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"$ref":"#/components/schemas/UserOut"},"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceOut"},"type":"array","title":"Workspaces"}},"type":"object","required":["access_token","user","workspaces"],"title":"AuthResponse"},"BillingOut":{"properties":{"plan":{"type":"string","title":"Plan"},"seats":{"type":"integer","title":"Seats"},"plan_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Expires At"},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Ends At"},"usage":{"$ref":"#/components/schemas/UsageOut"},"limits":{"$ref":"#/components/schemas/LimitsOut"}},"type":"object","required":["plan","seats","plan_expires_at","usage","limits"],"title":"BillingOut"},"Body_import_document_api_v1_workspaces__tenant_id__documents_import_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_import_document_api_v1_workspaces__tenant_id__documents_import_post"},"Body_parse_document_file_api_v1_workspaces__tenant_id__documents_parse_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_parse_document_file_api_v1_workspaces__tenant_id__documents_parse_post"},"CatalogItemOut":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"model":{"type":"string","maxLength":120,"title":"Model","default":""},"hs_code":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Hs Code"},"unit":{"type":"string","maxLength":16,"title":"Unit","default":"pcs"},"unit_cost_cny":{"type":"string","title":"Unit Cost Cny","default":"0"},"packaging_cost_cny_per_unit":{"type":"string","title":"Packaging Cost Cny Per Unit","default":"0"},"id":{"type":"string","title":"Id"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","id","updated_at"],"title":"CatalogItemOut"},"CatalogListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CatalogItemOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"CatalogListOut"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":8,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":10,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"CompanyProfile":{"properties":{"name":{"type":"string","title":"Name","default":""},"address":{"type":"string","title":"Address","default":""},"phone":{"type":"string","title":"Phone","default":""},"email":{"type":"string","title":"Email","default":""},"website":{"type":"string","title":"Website","default":""},"bank_info":{"type":"string","title":"Bank Info","default":""},"logo_url":{"type":"string","title":"Logo Url","default":""}},"type":"object","title":"CompanyProfile"},"ConsistencyIssue":{"properties":{"level":{"type":"string","enum":["error","warning","info"],"title":"Level"},"code":{"type":"string","title":"Code"},"field":{"type":"string","title":"Field"},"message":{"type":"string","title":"Message"}},"type":"object","required":["level","code","field","message"],"title":"ConsistencyIssue"},"ConsistencyOut":{"properties":{"passed":{"type":"boolean","title":"Passed"},"errors":{"type":"integer","title":"Errors"},"warnings":{"type":"integer","title":"Warnings"},"issues":{"items":{"$ref":"#/components/schemas/ConsistencyIssue"},"type":"array","title":"Issues"}},"type":"object","required":["passed","errors","warnings","issues"],"title":"ConsistencyOut"},"CostBreakdown":{"properties":{"product":{"type":"number","title":"Product"},"packaging":{"type":"number","title":"Packaging"},"inland_freight":{"type":"number","title":"Inland Freight"},"port_charges":{"type":"number","title":"Port Charges"},"ocean_freight":{"type":"number","title":"Ocean Freight"},"insurance":{"type":"number","title":"Insurance"},"bank_fee":{"type":"number","title":"Bank Fee"},"other":{"type":"number","title":"Other"},"rebate":{"type":"number","title":"Rebate"},"duty":{"type":"number","title":"Duty","default":0.0},"import_vat":{"type":"number","title":"Import Vat","default":0.0},"clearance":{"type":"number","title":"Clearance","default":0.0},"destination":{"type":"number","title":"Destination","default":0.0}},"type":"object","required":["product","packaging","inland_freight","port_charges","ocean_freight","insurance","bank_fee","other","rebate"],"title":"CostBreakdown"},"CustomerCreate":{"properties":{"name":{"type":"string","maxLength":160,"minLength":1,"title":"Name"},"contact_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Contact Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"country":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Country"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"},"tax_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Tax Id"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name"],"title":"CustomerCreate"},"CustomerListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"CustomerListOut"},"CustomerOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"quote_count":{"type":"integer","title":"Quote Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","contact_name","email","phone","country","address","tax_id","notes","created_at","updated_at"],"title":"CustomerOut"},"CustomerUpdate":{"properties":{"name":{"type":"string","maxLength":160,"minLength":1,"title":"Name"},"contact_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Contact Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"country":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Country"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"},"tax_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Tax Id"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name"],"title":"CustomerUpdate"},"DashboardStats":{"properties":{"total_quotes":{"type":"integer","title":"Total Quotes"},"quotes_this_month":{"type":"integer","title":"Quotes This Month"},"draft_quotes":{"type":"integer","title":"Draft Quotes"},"won_quotes":{"type":"integer","title":"Won Quotes"},"pending_approvals":{"type":"integer","title":"Pending Approvals"},"sent_quotes":{"type":"integer","title":"Sent Quotes","default":0},"awaiting_reply":{"type":"integer","title":"Awaiting Reply","default":0},"avg_margin_rate":{"type":"number","title":"Avg Margin Rate"},"profile_ready":{"type":"boolean","title":"Profile Ready","default":false},"documents_total":{"type":"integer","title":"Documents Total","default":0},"team_members":{"type":"integer","title":"Team Members","default":1}},"type":"object","required":["total_quotes","quotes_this_month","draft_quotes","won_quotes","pending_approvals","avg_margin_rate"],"title":"DashboardStats"},"DocumentDetail":{"properties":{"id":{"type":"string","title":"Id"},"doc_no":{"type":"string","title":"Doc No"},"customer_name":{"type":"string","title":"Customer Name"},"currency":{"type":"string","title":"Currency"},"incoterm":{"type":"string","title":"Incoterm"},"total_amount":{"type":"number","title":"Total Amount"},"item_count":{"type":"integer","title":"Item Count"},"source_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Filename"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"customer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Address"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"shipping_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Terms"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"items":{"items":{"$ref":"#/components/schemas/DocumentItemOut"},"type":"array","title":"Items"}},"type":"object","required":["id","doc_no","customer_name","currency","incoterm","total_amount","item_count","source_filename","created_at","customer_address","payment_terms","shipping_terms","notes","issued_at","items"],"title":"DocumentDetail"},"DocumentItemOut":{"properties":{"product_name":{"type":"string","maxLength":200,"minLength":1,"title":"Product Name"},"model":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Model"},"quantity":{"type":"string","title":"Quantity","default":"0"},"unit":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Unit"},"unit_price":{"type":"string","title":"Unit Price","default":"0"},"amount":{"type":"string","title":"Amount","default":"0"},"remark":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Remark"},"id":{"type":"string","title":"Id"},"line_no":{"type":"integer","title":"Line No"}},"type":"object","required":["product_name","id","line_no"],"title":"DocumentItemOut"},"DocumentListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"DocumentListOut"},"DocumentParseResult":{"properties":{"headers":{"items":{"type":"string"},"type":"array","title":"Headers"},"rows":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"Rows"},"suggested_mapping":{"additionalProperties":{"type":"integer"},"type":"object","title":"Suggested Mapping"},"field_labels":{"additionalProperties":{"type":"string"},"type":"object","title":"Field Labels"},"total_rows":{"type":"integer","title":"Total Rows"},"header_row":{"type":"integer","title":"Header Row"},"sheet_name":{"type":"string","title":"Sheet Name"}},"type":"object","required":["headers","rows","suggested_mapping","field_labels","total_rows","header_row","sheet_name"],"title":"DocumentParseResult"},"DocumentSummary":{"properties":{"id":{"type":"string","title":"Id"},"doc_no":{"type":"string","title":"Doc No"},"customer_name":{"type":"string","title":"Customer Name"},"currency":{"type":"string","title":"Currency"},"incoterm":{"type":"string","title":"Incoterm"},"total_amount":{"type":"number","title":"Total Amount"},"item_count":{"type":"integer","title":"Item Count"},"source_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Filename"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","doc_no","customer_name","currency","incoterm","total_amount","item_count","source_filename","created_at"],"title":"DocumentSummary"},"EventIn":{"properties":{"name":{"type":"string","maxLength":60,"minLength":1,"title":"Name"},"path":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Path"},"anon_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Anon Id"},"source":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Source"},"medium":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Medium"},"campaign":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Campaign"},"props":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Props"}},"type":"object","required":["name"],"title":"EventIn"},"FeedbackCreate":{"properties":{"category":{"type":"string","enum":["idea","bug","other"],"title":"Category","default":"idea"},"message":{"type":"string","maxLength":2000,"minLength":5,"title":"Message"},"page":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Page"}},"type":"object","required":["message"],"title":"FeedbackCreate"},"FeedbackOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"category":{"type":"string","title":"Category"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"},"message":{"type":"string","title":"Message"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","category","page","message","status","created_at"],"title":"FeedbackOut"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InviteOut":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"token":{"type":"string","title":"Token"},"invite_url":{"type":"string","title":"Invite Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"added_existing_user":{"type":"boolean","title":"Added Existing User"}},"type":"object","required":["email","role","token","invite_url","expires_at","added_existing_user"],"title":"InviteOut"},"InviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","enum":["admin","member","viewer"],"title":"Role","default":"member"}},"type":"object","required":["email"],"title":"InviteRequest"},"LimitsOut":{"properties":{"quotes_per_month":{"type":"integer","title":"Quotes Per Month"},"seats":{"type":"integer","title":"Seats"}},"type":"object","required":["quotes_per_month","seats"],"title":"LimitsOut"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MeResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserOut"},"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceOut"},"type":"array","title":"Workspaces"}},"type":"object","required":["user","workspaces"],"title":"MeResponse"},"MemberOut":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","email","name","role","created_at"],"title":"MemberOut"},"MemberRoleUpdate":{"properties":{"role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"Role"}},"type":"object","required":["role"],"title":"MemberRoleUpdate"},"MessageOut":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageOut"},"PublicCompany":{"properties":{"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address","default":""},"phone":{"type":"string","title":"Phone","default":""},"email":{"type":"string","title":"Email","default":""},"website":{"type":"string","title":"Website","default":""},"bank_info":{"type":"string","title":"Bank Info","default":""},"logo_url":{"type":"string","title":"Logo Url","default":""}},"type":"object","required":["name"],"title":"PublicCompany"},"PublicQuoteAcceptRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"}},"type":"object","title":"PublicQuoteAcceptRequest"},"PublicQuoteItem":{"properties":{"product_name":{"type":"string","title":"Product Name"},"model":{"type":"string","title":"Model","default":""},"hs_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hs Code"},"quantity":{"type":"number","title":"Quantity"},"unit":{"type":"string","title":"Unit","default":"pcs"},"unit_price":{"type":"number","title":"Unit Price"},"total_price":{"type":"number","title":"Total Price"}},"type":"object","required":["product_name","quantity","unit_price","total_price"],"title":"PublicQuoteItem"},"PublicQuoteOut":{"properties":{"quote_no":{"type":"string","title":"Quote No"},"customer_name":{"type":"string","title":"Customer Name"},"product_name":{"type":"string","title":"Product Name"},"quantity":{"type":"integer","title":"Quantity"},"currency":{"type":"string","title":"Currency"},"incoterm":{"type":"string","title":"Incoterm"},"unit_price":{"type":"number","title":"Unit Price"},"total_price":{"type":"number","title":"Total Price"},"items":{"items":{"$ref":"#/components/schemas/PublicQuoteItem"},"type":"array","title":"Items"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"company":{"$ref":"#/components/schemas/PublicCompany"}},"type":"object","required":["quote_no","customer_name","product_name","quantity","currency","incoterm","unit_price","total_price","notes","issued_at","company"],"title":"PublicQuoteOut"},"QuoteCreate":{"properties":{"customer_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Customer Id"},"customer_name":{"type":"string","maxLength":160,"minLength":1,"title":"Customer Name"},"product_name":{"type":"string","maxLength":200,"minLength":1,"title":"Product Name"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"packages":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":0.0},{"type":"null"}],"title":"Packages"},"gross_weight_kg":{"anyOf":[{"type":"number","maximum":10000000.0,"minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Gross Weight Kg"},"net_weight_kg":{"anyOf":[{"type":"number","maximum":10000000.0,"minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Net Weight Kg"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"items":{"items":{"$ref":"#/components/schemas/QuoteItemIn"},"type":"array","maxItems":30,"title":"Items"},"input":{"$ref":"#/components/schemas/QuoteInput-Input"}},"type":"object","required":["customer_name","product_name","input"],"title":"QuoteCreate"},"QuoteDetail":{"properties":{"id":{"type":"string","title":"Id"},"quote_no":{"type":"string","title":"Quote No"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"type":"string","title":"Customer Name"},"product_name":{"type":"string","title":"Product Name"},"currency":{"type":"string","title":"Currency"},"incoterm":{"type":"string","title":"Incoterm"},"status":{"type":"string","title":"Status"},"approval_status":{"type":"string","title":"Approval Status"},"total_price":{"type":"number","title":"Total Price"},"unit_price":{"type":"number","title":"Unit Price"},"profit_cny":{"type":"number","title":"Profit Cny"},"margin_rate":{"type":"number","title":"Margin Rate"},"item_count":{"type":"integer","title":"Item Count","default":1},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"version":{"type":"integer","title":"Version"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"sent_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent To"},"first_viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Viewed At"},"view_count":{"type":"integer","title":"View Count","default":0},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"packages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Packages"},"gross_weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Weight Kg"},"net_weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Weight Kg"},"input":{"$ref":"#/components/schemas/QuoteInput-Output"},"result":{"$ref":"#/components/schemas/QuoteResponse"},"items":{"items":{"$ref":"#/components/schemas/QuoteItemOut"},"type":"array","title":"Items"},"share_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Token"},"versions":{"items":{"$ref":"#/components/schemas/QuoteVersionOut"},"type":"array","title":"Versions"},"approval_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Note"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"accepted_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accepted By Name"},"customer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Note"},"watermark":{"type":"boolean","title":"Watermark"}},"type":"object","required":["id","quote_no","customer_name","product_name","currency","incoterm","status","approval_status","total_price","unit_price","profit_cny","margin_rate","version","created_at","updated_at","notes","packages","gross_weight_kg","net_weight_kg","input","result","share_token","versions","approval_note","approved_at","approved_by","watermark"],"title":"QuoteDetail"},"QuoteInput-Input":{"properties":{"quantity":{"type":"integer","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity"},"unit_cost_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Unit Cost Cny"},"fx_rate":{"anyOf":[{"type":"number","maximum":1000.0,"exclusiveMinimum":0.0},{"type":"string"}],"title":"Fx Rate"},"currency":{"type":"string","enum":["USD","EUR","CNY","GBP","AUD","CAD","JPY","AED"],"title":"Currency","default":"USD"},"locale":{"type":"string","enum":["zh","en","tr","vi"],"title":"Locale","default":"zh"},"packaging_cost_cny_per_unit":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":0.0},{"type":"string"}],"title":"Packaging Cost Cny Per Unit","default":"0"},"inland_freight_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Inland Freight Cny","default":"0"},"port_charges_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Port Charges Cny","default":"0"},"ocean_freight_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Ocean Freight Cny","default":"0"},"insurance_rate":{"anyOf":[{"type":"number","maximum":0.2,"minimum":0.0},{"type":"string"}],"title":"Insurance Rate","default":"0"},"commission_rate":{"anyOf":[{"type":"number","maximum":0.2,"minimum":0.0},{"type":"string"}],"title":"Commission Rate","default":"0"},"bank_fee_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Bank Fee Cny","default":"0"},"other_cost_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Other Cost Cny","default":"0"},"tax_rebate_rate":{"anyOf":[{"type":"number","maximum":0.2,"minimum":0.0},{"type":"string"}],"title":"Tax Rebate Rate","default":"0"},"target_margin_rate":{"anyOf":[{"type":"number","maximum":0.8,"minimum":0.0},{"type":"string"}],"title":"Target Margin Rate","default":"0.15"},"incoterm":{"type":"string","enum":["FOB","CFR","CIF","DDP"],"title":"Incoterm","default":"CIF"},"duty_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"string"}],"title":"Duty Rate","default":"0"},"import_vat_rate":{"anyOf":[{"type":"number","maximum":0.5,"minimum":0.0},{"type":"string"}],"title":"Import Vat Rate","default":"0"},"clearance_fee_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Clearance Fee Cny","default":"0"},"destination_fee_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Destination Fee Cny","default":"0"}},"type":"object","required":["quantity","unit_cost_cny","fx_rate"],"title":"QuoteInput"},"QuoteInput-Output":{"properties":{"quantity":{"type":"integer","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity"},"unit_cost_cny":{"type":"string","title":"Unit Cost Cny"},"fx_rate":{"type":"string","title":"Fx Rate"},"currency":{"type":"string","enum":["USD","EUR","CNY","GBP","AUD","CAD","JPY","AED"],"title":"Currency","default":"USD"},"locale":{"type":"string","enum":["zh","en","tr","vi"],"title":"Locale","default":"zh"},"packaging_cost_cny_per_unit":{"type":"string","title":"Packaging Cost Cny Per Unit","default":"0"},"inland_freight_cny":{"type":"string","title":"Inland Freight Cny","default":"0"},"port_charges_cny":{"type":"string","title":"Port Charges Cny","default":"0"},"ocean_freight_cny":{"type":"string","title":"Ocean Freight Cny","default":"0"},"insurance_rate":{"type":"string","title":"Insurance Rate","default":"0"},"commission_rate":{"type":"string","title":"Commission Rate","default":"0"},"bank_fee_cny":{"type":"string","title":"Bank Fee Cny","default":"0"},"other_cost_cny":{"type":"string","title":"Other Cost Cny","default":"0"},"tax_rebate_rate":{"type":"string","title":"Tax Rebate Rate","default":"0"},"target_margin_rate":{"type":"string","title":"Target Margin Rate","default":"0.15"},"incoterm":{"type":"string","enum":["FOB","CFR","CIF","DDP"],"title":"Incoterm","default":"CIF"},"duty_rate":{"type":"string","title":"Duty Rate","default":"0"},"import_vat_rate":{"type":"string","title":"Import Vat Rate","default":"0"},"clearance_fee_cny":{"type":"string","title":"Clearance Fee Cny","default":"0"},"destination_fee_cny":{"type":"string","title":"Destination Fee Cny","default":"0"}},"type":"object","required":["quantity","unit_cost_cny","fx_rate"],"title":"QuoteInput"},"QuoteItemIn":{"properties":{"product_name":{"type":"string","maxLength":200,"minLength":1,"title":"Product Name"},"model":{"type":"string","maxLength":120,"title":"Model","default":""},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Description"},"hs_code":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Hs Code"},"quantity":{"type":"integer","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity"},"unit":{"type":"string","maxLength":16,"title":"Unit","default":"pcs"},"unit_cost_cny":{"anyOf":[{"type":"number","maximum":100000000.0,"minimum":0.0},{"type":"string"}],"title":"Unit Cost Cny"},"packaging_cost_cny_per_unit":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":0.0},{"type":"string"}],"title":"Packaging Cost Cny Per Unit","default":"0"}},"type":"object","required":["product_name","quantity","unit_cost_cny"],"title":"QuoteItemIn","description":"报价明细行：成本留在内部，售价由后端按总额分摊。"},"QuoteItemOut":{"properties":{"product_name":{"type":"string","maxLength":200,"minLength":1,"title":"Product Name"},"model":{"type":"string","maxLength":120,"title":"Model","default":""},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Description"},"hs_code":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Hs Code"},"quantity":{"type":"integer","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Quantity"},"unit":{"type":"string","maxLength":16,"title":"Unit","default":"pcs"},"unit_cost_cny":{"type":"string","title":"Unit Cost Cny"},"packaging_cost_cny_per_unit":{"type":"string","title":"Packaging Cost Cny Per Unit","default":"0"},"unit_price":{"type":"number","title":"Unit Price","default":0},"total_price":{"type":"number","title":"Total Price","default":0}},"type":"object","required":["product_name","quantity","unit_cost_cny"],"title":"QuoteItemOut"},"QuoteLeadRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"quantity":{"type":"number","maximum":10000000.0,"exclusiveMinimum":0.0,"title":"Quantity"},"currency":{"type":"string","maxLength":8,"minLength":3,"title":"Currency"},"terms":{"items":{"$ref":"#/components/schemas/QuoteLeadTerm"},"type":"array","maxItems":4,"minItems":1,"title":"Terms"},"payload":{"type":"object","title":"Payload"},"source":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Source"},"utm":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Utm"}},"type":"object","required":["email","quantity","currency","terms"],"title":"QuoteLeadRequest"},"QuoteLeadTerm":{"properties":{"term":{"type":"string","enum":["FOB","CFR","CIF","DDP"],"title":"Term"},"unit_price":{"type":"number","minimum":0.0,"title":"Unit Price"},"total_price":{"type":"number","minimum":0.0,"title":"Total Price"},"margin_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Margin Rate"}},"type":"object","required":["term","unit_price","total_price"],"title":"QuoteLeadTerm"},"QuoteListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/QuoteSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"QuoteListOut"},"QuoteResponse":{"properties":{"currency":{"type":"string","title":"Currency"},"quantity":{"type":"integer","title":"Quantity"},"incoterm":{"type":"string","title":"Incoterm"},"terms":{"additionalProperties":{"$ref":"#/components/schemas/TermResult"},"type":"object","title":"Terms"},"selected":{"type":"string","title":"Selected"},"sensitivity":{"items":{"$ref":"#/components/schemas/SensitivityItem"},"type":"array","title":"Sensitivity"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"assumptions":{"items":{"type":"string"},"type":"array","title":"Assumptions"}},"type":"object","required":["currency","quantity","incoterm","terms","selected","sensitivity","warnings","assumptions"],"title":"QuoteResponse"},"QuoteSendOut":{"properties":{"sent_to":{"type":"string","title":"Sent To"},"emailed":{"type":"boolean","title":"Emailed"},"share_url":{"type":"string","title":"Share Url"}},"type":"object","required":["sent_to","emailed","share_url"],"title":"QuoteSendOut"},"QuoteSendRequest":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"},"message":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Message"}},"type":"object","required":["to_email"],"title":"QuoteSendRequest"},"QuoteStatusUpdate":{"properties":{"status":{"type":"string","enum":["draft","sent","won","lost"],"title":"Status"}},"type":"object","required":["status"],"title":"QuoteStatusUpdate"},"QuoteSummary":{"properties":{"id":{"type":"string","title":"Id"},"quote_no":{"type":"string","title":"Quote No"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"type":"string","title":"Customer Name"},"product_name":{"type":"string","title":"Product Name"},"currency":{"type":"string","title":"Currency"},"incoterm":{"type":"string","title":"Incoterm"},"status":{"type":"string","title":"Status"},"approval_status":{"type":"string","title":"Approval Status"},"total_price":{"type":"number","title":"Total Price"},"unit_price":{"type":"number","title":"Unit Price"},"profit_cny":{"type":"number","title":"Profit Cny"},"margin_rate":{"type":"number","title":"Margin Rate"},"item_count":{"type":"integer","title":"Item Count","default":1},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"version":{"type":"integer","title":"Version"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"sent_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent To"},"first_viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Viewed At"},"view_count":{"type":"integer","title":"View Count","default":0},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","quote_no","customer_name","product_name","currency","incoterm","status","approval_status","total_price","unit_price","profit_cny","margin_rate","version","created_at","updated_at"],"title":"QuoteSummary"},"QuoteUpdate":{"properties":{"customer_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Customer Id"},"customer_name":{"type":"string","maxLength":160,"minLength":1,"title":"Customer Name"},"product_name":{"type":"string","maxLength":200,"minLength":1,"title":"Product Name"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"packages":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":0.0},{"type":"null"}],"title":"Packages"},"gross_weight_kg":{"anyOf":[{"type":"number","maximum":10000000.0,"minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Gross Weight Kg"},"net_weight_kg":{"anyOf":[{"type":"number","maximum":10000000.0,"minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Net Weight Kg"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"items":{"items":{"$ref":"#/components/schemas/QuoteItemIn"},"type":"array","maxItems":30,"title":"Items"},"input":{"$ref":"#/components/schemas/QuoteInput-Input"},"expected_version":{"type":"integer","minimum":1.0,"title":"Expected Version"}},"type":"object","required":["customer_name","product_name","input","expected_version"],"title":"QuoteUpdate"},"QuoteVersionOut":{"properties":{"version":{"type":"integer","title":"Version"},"total_price":{"type":"number","title":"Total Price"},"profit_cny":{"type":"number","title":"Profit Cny"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["version","total_price","profit_cny","created_at"],"title":"QuoteVersionOut"},"RedeemCodeRequest":{"properties":{"code":{"type":"string","maxLength":64,"minLength":4,"title":"Code"}},"type":"object","required":["code"],"title":"RedeemCodeRequest"},"RedeemCodeResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"seats":{"type":"integer","title":"Seats"},"plan_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Expires At"},"message":{"type":"string","title":"Message"}},"type":"object","required":["plan","seats","plan_expires_at","message"],"title":"RedeemCodeResponse"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":10,"title":"Password"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"company_name":{"type":"string","maxLength":120,"minLength":1,"title":"Company Name"}},"type":"object","required":["email","password","name","company_name"],"title":"RegisterRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","maxLength":120,"minLength":20,"title":"Token"},"password":{"type":"string","maxLength":128,"minLength":10,"title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordRequest"},"SensitivityItem":{"properties":{"label":{"type":"string","title":"Label"},"detail":{"type":"string","title":"Detail"},"profit_cny":{"type":"number","title":"Profit Cny"},"margin_rate":{"type":"number","title":"Margin Rate"},"delta_profit_cny":{"type":"number","title":"Delta Profit Cny"}},"type":"object","required":["label","detail","profit_cny","margin_rate","delta_profit_cny"],"title":"SensitivityItem"},"SessionListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SessionOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"SessionListOut"},"SessionOut":{"properties":{"id":{"type":"string","title":"Id"},"user_agent":{"type":"string","title":"User Agent"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"current":{"type":"boolean","title":"Current","default":false}},"type":"object","required":["id","user_agent","created_at"],"title":"SessionOut"},"ShareOut":{"properties":{"share_token":{"type":"string","title":"Share Token"},"share_url":{"type":"string","title":"Share Url"}},"type":"object","required":["share_token","share_url"],"title":"ShareOut"},"TenantSettingsOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"quote_prefix":{"type":"string","title":"Quote Prefix"},"plan":{"type":"string","title":"Plan"},"seats":{"type":"integer","title":"Seats"},"company_profile":{"$ref":"#/components/schemas/CompanyProfile"}},"type":"object","required":["id","name","quote_prefix","plan","seats","company_profile"],"title":"TenantSettingsOut"},"TenantSettingsUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"quote_prefix":{"anyOf":[{"type":"string","maxLength":8,"minLength":1},{"type":"null"}],"title":"Quote Prefix"},"company_profile":{"anyOf":[{"$ref":"#/components/schemas/CompanyProfile"},{"type":"null"}]}},"type":"object","title":"TenantSettingsUpdate"},"TermResult":{"properties":{"term":{"type":"string","title":"Term"},"total_price":{"type":"number","title":"Total Price"},"unit_price":{"type":"number","title":"Unit Price"},"gross_cost_cny":{"type":"number","title":"Gross Cost Cny"},"rebate_cny":{"type":"number","title":"Rebate Cny"},"net_cost_cny":{"type":"number","title":"Net Cost Cny"},"commission_cny":{"type":"number","title":"Commission Cny"},"profit_cny":{"type":"number","title":"Profit Cny"},"margin_rate":{"type":"number","title":"Margin Rate"},"cost_breakdown":{"$ref":"#/components/schemas/CostBreakdown"}},"type":"object","required":["term","total_price","unit_price","gross_cost_cny","rebate_cny","net_cost_cny","commission_cny","profit_cny","margin_rate","cost_breakdown"],"title":"TermResult"},"UsageOut":{"properties":{"quotes_this_month":{"type":"integer","title":"Quotes This Month"},"seats_used":{"type":"integer","title":"Seats Used"},"pending_invites":{"type":"integer","title":"Pending Invites"}},"type":"object","required":["quotes_this_month","seats_used","pending_invites"],"title":"UsageOut"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"email_verified":{"type":"boolean","title":"Email Verified","default":false}},"type":"object","required":["id","email","name"],"title":"UserOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","maxLength":200,"minLength":10,"title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"},"WaitlistCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"company":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Company"},"role":{"anyOf":[{"type":"string","enum":["业务员","外贸经理","SOHO","企业负责人","其他"]},{"type":"null"}],"title":"Role"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"source":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Source"}},"type":"object","required":["email"],"title":"WaitlistCreate"},"WaitlistResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"message":{"type":"string","title":"Message","default":"You're on the list. We'll email you when your workspace is ready."}},"type":"object","title":"WaitlistResponse"},"WebhookDeliveryListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookDeliveryOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"WebhookDeliveryListOut"},"WebhookDeliveryOut":{"properties":{"id":{"type":"string","title":"Id"},"event":{"type":"string","title":"Event"},"status":{"type":"string","title":"Status"},"response_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Code"},"attempts":{"type":"integer","title":"Attempts"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","event","status","response_code","attempts","duration_ms","error","created_at"],"title":"WebhookDeliveryOut"},"WebhookEndpointCreate":{"properties":{"url":{"type":"string","maxLength":500,"minLength":10,"title":"Url"}},"type":"object","required":["url"],"title":"WebhookEndpointCreate"},"WebhookEndpointListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookEndpointOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"WebhookEndpointListOut"},"WebhookEndpointOut":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"active":{"type":"boolean","title":"Active"},"secret":{"type":"string","title":"Secret"},"last_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Status"},"last_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","url","events","active","secret","created_at"],"title":"WebhookEndpointOut"},"WebhookTestOut":{"properties":{"ok":{"type":"boolean","title":"Ok"},"status":{"type":"string","title":"Status"},"response_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Code"},"attempts":{"type":"integer","title":"Attempts"},"duration_ms":{"type":"integer","title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok","status","response_code","attempts","duration_ms","error"],"title":"WebhookTestOut"},"WorkspaceOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"plan":{"type":"string","title":"Plan"},"seats":{"type":"integer","title":"Seats"},"role":{"type":"string","title":"Role"},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Ends At"}},"type":"object","required":["id","name","slug","plan","seats","role"],"title":"WorkspaceOut"}}}}