{"openapi": "3.1.0", "info": {"title": "SmartWell AI 智跃健康开放API", "description": "AI身心健康平台 - CN Gateway API 升级版", "version": "2.0.0-gateway-upgrade"}, "paths": {"/gateway/metrics": {"get": {"tags": ["gateway"], "summary": "Gateway Metrics", "operationId": "gateway_metrics_gateway_metrics_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/gateway/circuit-breakers/{service}/reset": {"post": {"tags": ["gateway"], "summary": "Reset Circuit Breaker", "operationId": "reset_circuit_breaker_gateway_circuit_breakers__service__reset_post", "parameters": [{"name": "service", "in": "path", "required": true, "schema": {"type": "string", "title": "Service"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/gateway/circuit-breakers": {"get": {"tags": ["gateway"], "summary": "List Circuit Breakers", "operationId": "list_circuit_breakers_gateway_circuit_breakers_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/health": {"get": {"summary": "Health Check", "operationId": "health_check_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/ready": {"get": {"summary": "Readiness", "operationId": "readiness_ready_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/payment/plans": {"get": {"summary": "Get Payment Plans", "operationId": "get_payment_plans_api_v1_payment_plans_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/payment/create-order": {"post": {"summary": "Create Payment Order", "operationId": "create_payment_order_api_v1_payment_create_order_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaymentOrderCreateRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/payment/order": {"post": {"summary": "Create Payment Order", "operationId": "create_payment_order_api_v1_payment_order_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaymentOrderCreateRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/payment/order/{order_id}": {"get": {"summary": "Get Payment Order", "operationId": "get_payment_order_api_v1_payment_order__order_id__get", "parameters": [{"name": "order_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Order Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/payment/orders": {"get": {"summary": "List Payment Orders", "operationId": "list_payment_orders_api_v1_payment_orders_get", "parameters": [{"name": "user_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}}, {"name": "status", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}}, {"name": "payment_method", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Payment Method"}}, {"name": "product_type", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Product Type"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 200, "minimum": 1, "default": 20, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/payment/simulate/{order_id}": {"post": {"summary": "Simulate Payment", "operationId": "simulate_payment_api_v1_payment_simulate__order_id__post", "parameters": [{"name": "order_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Order Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/payment/callback": {"post": {"summary": "Payment Callback", "operationId": "payment_callback_api_v1_payment_callback_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/payment/callback/wechat": {"post": {"summary": "Payment Callback Wechat", "operationId": "payment_callback_wechat_api_v1_payment_callback_wechat_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/payment/callback/alipay": {"post": {"summary": "Payment Callback Alipay", "operationId": "payment_callback_alipay_api_v1_payment_callback_alipay_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/payment/stats": {"get": {"summary": "Payment Stats", "operationId": "payment_stats_api_v1_payment_stats_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/user/register": {"post": {"summary": "Register User", "operationId": "register_user_api_v1_user_register_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserRegisterRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/user/login": {"post": {"summary": "Login User", "operationId": "login_user_api_v1_user_login_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserLoginRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/": {"get": {"tags": ["miniapp"], "summary": "Miniapp Service Root", "operationId": "miniapp_service_root_api_v1_miniapp__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/miniapp/": {"get": {"tags": ["miniapp"], "summary": "Miniapp Service Root", "operationId": "miniapp_service_root_api_miniapp__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/miniapp/auth/login": {"post": {"summary": "Miniapp Login", "operationId": "miniapp_login_api_v1_miniapp_auth_login_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MiniappLoginRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/home/summary": {"get": {"summary": "Miniapp Home Summary", "operationId": "miniapp_home_summary_api_v1_miniapp_home_summary_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/miniapp/profile": {"get": {"summary": "Miniapp Profile", "operationId": "miniapp_profile_api_v1_miniapp_profile_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/miniapp/reports": {"get": {"summary": "Miniapp Reports", "operationId": "miniapp_reports_api_v1_miniapp_reports_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/miniapp/credits/overview": {"get": {"summary": "Miniapp Credits Overview", "operationId": "miniapp_credits_overview_api_v1_miniapp_credits_overview_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/miniapp/credits/recharge": {"post": {"summary": "Miniapp Recharge", "operationId": "miniapp_recharge_api_v1_miniapp_credits_recharge_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreditsRechargeRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/miniapp/diagnosis/upload": {"post": {"summary": "Miniapp Diagnosis Upload", "operationId": "miniapp_diagnosis_upload_api_v1_miniapp_diagnosis_upload_post", "requestBody": {"content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_miniapp_diagnosis_upload_api_v1_miniapp_diagnosis_upload_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/user/profile": {"get": {"summary": "Get User Profile", "operationId": "get_user_profile_api_v1_user_profile_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}, "put": {"summary": "Update User Profile", "operationId": "update_user_profile_api_v1_user_profile_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserProfileUpdateRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/credits/rules": {"get": {"summary": "Get Credit Rules", "operationId": "get_credit_rules_api_v1_credits_rules_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/credits/balance": {"get": {"summary": "Get Credit Balance", "operationId": "get_credit_balance_api_v1_credits_balance_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/credits/consume": {"post": {"summary": "Consume Credits", "operationId": "consume_credits_api_v1_credits_consume_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreditsConsumeRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/credits/recharge": {"post": {"summary": "Recharge Credits", "operationId": "recharge_credits_api_v1_credits_recharge_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreditsRechargeRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/credits/history": {"get": {"summary": "Get Credit History", "operationId": "get_credit_history_api_v1_credits_history_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "type", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type"}}, {"name": "source", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 200, "minimum": 1, "default": 20, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 0, "default": 0, "title": "Offset"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/credits/invite-code": {"post": {"summary": "Create Or Get Invite Code", "operationId": "create_or_get_invite_code_api_v1_credits_invite_code_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/credits/redeem-invite": {"post": {"summary": "Redeem Invite Code", "operationId": "redeem_invite_code_api_v1_credits_redeem_invite_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteCodeRedeemRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/task/create": {"post": {"summary": "Create Task", "operationId": "create_task_api_v1_task_create_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TaskCreateRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TaskResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/task/{task_id}": {"get": {"summary": "Get Task", "operationId": "get_task_api_v1_task__task_id__get", "parameters": [{"name": "task_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Task Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TaskResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/diagnosis/tongue": {"get": {"summary": "Tongue Diagnosis Placeholder", "operationId": "tongue_diagnosis_placeholder_api_v1_diagnosis_tongue_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}, "post": {"summary": "Tongue Diagnosis Post Proxy", "description": "Proxy tongue diagnosis POST requests to CN-AI tongue-vlm-api (port 8580).", "operationId": "tongue_diagnosis_post_proxy_api_v1_diagnosis_tongue_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/diagnosis/face": {"get": {"summary": "Face Diagnosis Placeholder", "operationId": "face_diagnosis_placeholder_api_v1_diagnosis_face_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}, "post": {"summary": "Face Diagnosis Post Proxy", "description": "Proxy face diagnosis POST requests to CN-AI face-diagnosis-engine (port 8863).", "operationId": "face_diagnosis_post_proxy_api_v1_diagnosis_face_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/chat": {"get": {"summary": "Ai Chat Placeholder", "operationId": "ai_chat_placeholder_api_v1_chat_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}, "post": {"summary": "Ai Chat Post Proxy", "description": "Proxy chat POST requests to local 29000 (CN-AI ai-gateway).", "operationId": "ai_chat_post_proxy_api_v1_chat_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/miniapp/chat": {"post": {"summary": "Miniapp Chat Endpoint", "description": "Miniapp dedicated OpenAI-compatible chat endpoint.", "operationId": "miniapp_chat_endpoint_api_miniapp_chat_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/vending/recommend": {"get": {"summary": "Vending Recommend Placeholder", "operationId": "vending_recommend_placeholder_api_v1_vending_recommend_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/ops/daily-report": {"get": {"summary": "Get Ops Daily Report", "operationId": "get_ops_daily_report_api_v1_ops_daily_report_get", "parameters": [{"name": "report_date", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Report Date"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/ops/weekly-report": {"get": {"summary": "Get Ops Weekly Report", "operationId": "get_ops_weekly_report_api_v1_ops_weekly_report_get", "parameters": [{"name": "report_date", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}], "title": "Report Date"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/ops/funnel": {"get": {"summary": "Get Ops Funnel Report", "operationId": "get_ops_funnel_report_api_v1_ops_funnel_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/ops/retention": {"get": {"summary": "Get Ops Retention Report", "operationId": "get_ops_retention_report_api_v1_ops_retention_get", "parameters": [{"name": "days", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 365, "minimum": 7, "default": 30, "title": "Days"}}, {"name": "cohort_days", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 31, "minimum": 1, "default": 8, "title": "Cohort Days"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/ops/scheduler/status": {"get": {"summary": "Get Ops Scheduler Status", "operationId": "get_ops_scheduler_status_api_v1_ops_scheduler_status_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/ops/scheduler/run/{job_name}": {"post": {"summary": "Run Ops Scheduler Job", "operationId": "run_ops_scheduler_job_api_v1_ops_scheduler_run__job_name__post", "parameters": [{"name": "job_name", "in": "path", "required": true, "schema": {"type": "string", "title": "Job Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/ops/deliveries": {"get": {"summary": "Get Ops Deliveries", "operationId": "get_ops_deliveries_api_v1_ops_deliveries_get", "parameters": [{"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": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/ops/routes": {"get": {"summary": "Get Ops Routes", "operationId": "get_ops_routes_api_v1_ops_routes_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/ops/templates": {"get": {"summary": "Get Ops Templates", "operationId": "get_ops_templates_api_v1_ops_templates_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/ops/deliveries/{delivery_id}/retry": {"post": {"summary": "Retry Ops Delivery", "operationId": "retry_ops_delivery_api_v1_ops_deliveries__delivery_id__retry_post", "parameters": [{"name": "delivery_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Delivery Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/ops/messages/test-send": {"post": {"summary": "Post Ops Test Send", "operationId": "post_ops_test_send_api_v1_ops_messages_test_send_post", "parameters": [{"name": "scene_code", "in": "query", "required": false, "schema": {"type": "string", "default": "ops.daily_report", "title": "Scene Code"}}, {"name": "route_code", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Route Code"}}, {"name": "template_code", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Template Code"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/report/generate": {"get": {"summary": "Report Generate Placeholder", "operationId": "report_generate_placeholder_api_v1_report_generate_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}, "post": {"summary": "Report Generate Pdf", "operationId": "report_generate_pdf_api_v1_report_generate_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/ai/health": {"get": {"tags": ["m4-ai-gateway"], "summary": "Aggregated Health", "description": "聚合 14 个 M4 模块健康", "operationId": "aggregated_health_api_v1_ai_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/ai/{full_path}": {"head": {"tags": ["m4-ai-gateway"], "summary": "M4 Proxy", "operationId": "m4_proxy_api_v1_ai__full_path__head", "parameters": [{"name": "full_path", "in": "path", "required": true, "schema": {"type": "string", "title": "Full Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "options": {"tags": ["m4-ai-gateway"], "summary": "M4 Proxy", "operationId": "m4_proxy_api_v1_ai__full_path__head", "parameters": [{"name": "full_path", "in": "path", "required": true, "schema": {"type": "string", "title": "Full Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["m4-ai-gateway"], "summary": "M4 Proxy", "operationId": "m4_proxy_api_v1_ai__full_path__head", "parameters": [{"name": "full_path", "in": "path", "required": true, "schema": {"type": "string", "title": "Full Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["m4-ai-gateway"], "summary": "M4 Proxy", "operationId": "m4_proxy_api_v1_ai__full_path__head", "parameters": [{"name": "full_path", "in": "path", "required": true, "schema": {"type": "string", "title": "Full Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["m4-ai-gateway"], "summary": "M4 Proxy", "operationId": "m4_proxy_api_v1_ai__full_path__head", "parameters": [{"name": "full_path", "in": "path", "required": true, "schema": {"type": "string", "title": "Full Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["m4-ai-gateway"], "summary": "M4 Proxy", "operationId": "m4_proxy_api_v1_ai__full_path__head", "parameters": [{"name": "full_path", "in": "path", "required": true, "schema": {"type": "string", "title": "Full Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["m4-ai-gateway"], "summary": "M4 Proxy", "operationId": "m4_proxy_api_v1_ai__full_path__head", "parameters": [{"name": "full_path", "in": "path", "required": true, "schema": {"type": "string", "title": "Full Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/health-records": {"get": {"tags": ["miniapp-business"], "summary": "获取健康档案列表", "description": "获取当前用户的健康档案列表，支持按类型筛选和分页", "operationId": "list_health_records_api_v1_miniapp_health_records_get", "parameters": [{"name": "record_type", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "按类型筛选", "title": "Record Type"}, "description": "按类型筛选"}, {"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": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["miniapp-business"], "summary": "创建健康档案", "description": "创建一条新的健康档案记录", "operationId": "create_health_record_api_v1_miniapp_health_records_post", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HealthRecordCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/health-records/{record_id}": {"get": {"tags": ["miniapp-business"], "summary": "获取单条健康档案", "description": "获取指定ID的健康档案详情", "operationId": "get_health_record_api_v1_miniapp_health_records__record_id__get", "parameters": [{"name": "record_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Record Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["miniapp-business"], "summary": "更新健康档案", "description": "更新指定ID的健康档案", "operationId": "update_health_record_api_v1_miniapp_health_records__record_id__put", "parameters": [{"name": "record_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Record Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HealthRecordUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["miniapp-business"], "summary": "删除健康档案", "description": "软删除指定ID的健康档案", "operationId": "delete_health_record_api_v1_miniapp_health_records__record_id__delete", "parameters": [{"name": "record_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Record Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/chat/sessions": {"get": {"tags": ["miniapp-business"], "summary": "获取对话会话列表", "description": "获取当前用户的对话会话列表（按会话分组）", "operationId": "list_chat_sessions_api_v1_miniapp_chat_sessions_get", "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 50, "minimum": 1, "default": 20, "title": "Page Size"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/chat/history": {"get": {"tags": ["miniapp-business"], "summary": "获取AI对话历史", "description": "获取当前用户的AI对话历史记录", "operationId": "list_chat_history_api_v1_miniapp_chat_history_get", "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "session_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "按会话ID筛选", "title": "Session Id"}, "description": "按会话ID筛选"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/health/recommendations": {"get": {"tags": ["miniapp-business"], "summary": "获取个性化健康推荐", "description": "基于用户健康档案和历史数据生成个性化健康推荐", "operationId": "get_health_recommendations_api_v1_miniapp_health_recommendations_get", "parameters": [{"name": "category", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "推荐类别: diet/exercise/sleep/mental/tcm", "title": "Category"}, "description": "推荐类别: diet/exercise/sleep/mental/tcm"}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/membership/info": {"get": {"tags": ["miniapp-business"], "summary": "获取会员信息", "description": "获取当前用户的会员等级、权益和积分概览", "operationId": "get_membership_info_api_v1_miniapp_membership_info_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/miniapp/membership/benefits": {"get": {"tags": ["miniapp-business"], "summary": "获取会员权益详情", "description": "获取当前会员等级对应的所有权益", "operationId": "get_membership_benefits_api_v1_miniapp_membership_benefits_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/miniapp/appointments": {"get": {"tags": ["miniapp-business"], "summary": "获取预约列表", "description": "获取当前用户的预约/咨询列表", "operationId": "list_appointments_api_v1_miniapp_appointments_get", "parameters": [{"name": "status", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "按状态筛选", "title": "Status"}, "description": "按状态筛选"}, {"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": 50, "minimum": 1, "default": 20, "title": "Page Size"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["miniapp-business"], "summary": "创建预约", "description": "创建新的预约/咨询", "operationId": "create_appointment_api_v1_miniapp_appointments_post", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppointmentCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/appointments/{appointment_id}": {"get": {"tags": ["miniapp-business"], "summary": "获取预约详情", "description": "获取指定预约的详细信息", "operationId": "get_appointment_api_v1_miniapp_appointments__appointment_id__get", "parameters": [{"name": "appointment_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Appointment Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["miniapp-business"], "summary": "更新预约状态", "description": "更新预约状态（取消等）", "operationId": "update_appointment_api_v1_miniapp_appointments__appointment_id__put", "parameters": [{"name": "appointment_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Appointment Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppointmentUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/miniapp/appointments/available-slots": {"get": {"tags": ["miniapp-business"], "summary": "查询可用时间段", "description": "查询指定日期的可用预约时间段", "operationId": "get_available_slots_api_v1_miniapp_appointments_available_slots_get", "parameters": [{"name": "service_type", "in": "query", "required": true, "schema": {"type": "string", "description": "服务类型", "title": "Service Type"}, "description": "服务类型"}, {"name": "date", "in": "query", "required": true, "schema": {"type": "string", "description": "查询日期 YYYY-MM-DD", "title": "Date"}, "description": "查询日期 YYYY-MM-DD"}, {"name": "expert_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "专家ID", "title": "Expert Id"}, "description": "专家ID"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/tenants/me": {"get": {"tags": ["多租户管理"], "summary": "Get My Tenant", "description": "查询当前用户所属租户信息", "operationId": "get_my_tenant_api_v1_tenants_me_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/tenants/list": {"get": {"tags": ["多租户管理"], "summary": "List Tenants", "description": "列出所有租户（仅 superadmin）", "operationId": "list_tenants_api_v1_tenants_list_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/tenants/create": {"post": {"tags": ["多租户管理"], "summary": "Create Tenant Api", "description": "创建新租户（仅 superadmin）", "operationId": "create_tenant_api_api_v1_tenants_create_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/tenants/{tenant_id}/suspend": {"post": {"tags": ["多租户管理"], "summary": "Suspend Tenant", "description": "停用租户（仅 superadmin）", "operationId": "suspend_tenant_api_v1_tenants__tenant_id__suspend_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "tenant_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Tenant Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/rbac/roles": {"get": {"tags": ["RBAC权限管理"], "summary": "List Roles", "description": "列出角色列表", "operationId": "list_roles_api_v1_rbac_roles_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/rbac/permissions": {"get": {"tags": ["RBAC权限管理"], "summary": "List Permissions", "description": "列出权限列表", "operationId": "list_permissions_api_v1_rbac_permissions_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/rbac/assign": {"post": {"tags": ["RBAC权限管理"], "summary": "Assign Role", "description": "给用户分配角色", "operationId": "assign_role_api_v1_rbac_assign_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/rbac/revoke": {"delete": {"tags": ["RBAC权限管理"], "summary": "Revoke Role", "description": "撤销用户角色", "operationId": "revoke_role_api_v1_rbac_revoke_delete", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/rbac/my-permissions": {"get": {"tags": ["RBAC权限管理"], "summary": "My Permissions", "description": "查询当前用户的角色与权限", "operationId": "my_permissions_api_v1_rbac_my_permissions_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/quota/me": {"get": {"tags": ["资源配额"], "summary": "Get My Quota", "description": "查询当前用户的配额与用量", "operationId": "get_my_quota_api_v1_quota_me_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/quota/tenant/{tenant_id}": {"get": {"tags": ["资源配额"], "summary": "Get Tenant Quota", "description": "查询租户配额（admin/superadmin）", "operationId": "get_tenant_quota_api_v1_quota_tenant__tenant_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "tenant_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Tenant Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["资源配额"], "summary": "Update Tenant Quota", "description": "更新租户配额（仅 superadmin）", "operationId": "update_tenant_quota_api_v1_quota_tenant__tenant_id__put", "security": [{"HTTPBearer": []}], "parameters": [{"name": "tenant_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Tenant Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/quota/user/{user_id}": {"put": {"tags": ["资源配额"], "summary": "Update User Quota", "description": "更新用户配额（admin/superadmin）", "operationId": "update_user_quota_api_v1_quota_user__user_id__put", "security": [{"HTTPBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "string", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/quota/stats": {"get": {"tags": ["资源配额"], "summary": "Get Quota Stats", "description": "查询配额使用统计（admin/superadmin）", "operationId": "get_quota_stats_api_v1_quota_stats_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}}, "components": {"schemas": {"AppointmentCreate": {"properties": {"service_type": {"type": "string", "title": "Service Type", "description": "服务类型: online_consult/offline_visit/expert_call/health_coaching"}, "title": {"type": "string", "maxLength": 128, "title": "Title", "description": "预约标题"}, "description": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "title": "Description", "description": "问题描述"}, "preferred_date": {"type": "string", "title": "Preferred Date", "description": "期望日期 YYYY-MM-DD"}, "preferred_time": {"type": "string", "title": "Preferred Time", "description": "期望时间段: morning/afternoon/evening"}, "expert_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expert Id", "description": "指定专家ID"}, "contact_phone": {"anyOf": [{"type": "string", "maxLength": 20}, {"type": "null"}], "title": "Contact Phone", "description": "联系电话"}}, "type": "object", "required": ["service_type", "title", "preferred_date", "preferred_time"], "title": "AppointmentCreate"}, "AppointmentUpdate": {"properties": {"status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status", "description": "状态: confirmed/cancelled/completed"}, "notes": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "title": "Notes"}}, "type": "object", "title": "AppointmentUpdate"}, "Body_miniapp_diagnosis_upload_api_v1_miniapp_diagnosis_upload_post": {"properties": {"image": {"type": "string", "contentMediaType": "application/octet-stream", "title": "Image"}, "kind": {"type": "string", "title": "Kind"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "metadata": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Metadata"}}, "type": "object", "required": ["image", "kind"], "title": "Body_miniapp_diagnosis_upload_api_v1_miniapp_diagnosis_upload_post"}, "CreditsConsumeRequest": {"properties": {"amount": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Amount"}, "source": {"type": "string", "maxLength": 64, "minLength": 2, "title": "Source"}, "description": {"anyOf": [{"type": "string", "maxLength": 256}, {"type": "null"}], "title": "Description"}, "metadata": {"additionalProperties": true, "type": "object", "title": "Metadata"}}, "type": "object", "required": ["source"], "title": "CreditsConsumeRequest"}, "CreditsRechargeRequest": {"properties": {"credits": {"type": "integer", "maximum": 100000.0, "minimum": 1.0, "title": "Credits"}, "payment_method": {"type": "string", "maxLength": 32, "title": "Payment Method", "default": "wechat"}, "sandbox_paid": {"type": "boolean", "title": "Sandbox Paid", "default": true}, "metadata": {"additionalProperties": true, "type": "object", "title": "Metadata"}}, "type": "object", "required": ["credits"], "title": "CreditsRechargeRequest"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "HealthRecordCreate": {"properties": {"record_type": {"type": "string", "title": "Record Type", "description": "档案类型: basic_info/medical_history/allergy/family_history/lifestyle/vital_signs"}, "title": {"type": "string", "maxLength": 128, "title": "Title", "description": "档案标题"}, "content": {"additionalProperties": true, "type": "object", "title": "Content", "description": "档案内容JSON"}, "tags": {"items": {"type": "string"}, "type": "array", "title": "Tags", "description": "标签列表"}, "is_private": {"type": "boolean", "title": "Is Private", "description": "是否私密", "default": true}}, "type": "object", "required": ["record_type", "title"], "title": "HealthRecordCreate"}, "HealthRecordUpdate": {"properties": {"title": {"anyOf": [{"type": "string", "maxLength": 128}, {"type": "null"}], "title": "Title"}, "content": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Content"}, "tags": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Tags"}, "is_private": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Private"}}, "type": "object", "title": "HealthRecordUpdate"}, "InviteCodeRedeemRequest": {"properties": {"invite_code": {"type": "string", "maxLength": 32, "minLength": 4, "title": "Invite Code"}}, "type": "object", "required": ["invite_code"], "title": "InviteCodeRedeemRequest"}, "MiniappLoginRequest": {"properties": {"code": {"type": "string", "maxLength": 256, "minLength": 2, "title": "Code"}, "channel": {"type": "string", "maxLength": 32, "title": "Channel", "default": "weapp"}, "invite_code": {"anyOf": [{"type": "string", "maxLength": 32}, {"type": "null"}], "title": "Invite Code"}}, "type": "object", "required": ["code"], "title": "MiniappLoginRequest"}, "PaymentOrderCreateRequest": {"properties": {"user_id": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "User Id"}, "product_type": {"type": "string", "maxLength": 32, "title": "Product Type", "default": "membership"}, "product_id": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Product Id"}, "plan_id": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Plan Id"}, "payment_method": {"type": "string", "maxLength": 32, "title": "Payment Method", "default": "wechat"}, "amount": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "null"}], "title": "Amount"}, "currency": {"type": "string", "maxLength": 16, "title": "Currency", "default": "CNY"}, "expires_in_minutes": {"type": "integer", "maximum": 1440.0, "minimum": 5.0, "title": "Expires In Minutes", "default": 30}, "metadata": {"additionalProperties": true, "type": "object", "title": "Metadata"}}, "type": "object", "title": "PaymentOrderCreateRequest"}, "TaskCreateRequest": {"properties": {"task_id": {"type": "string", "title": "Task Id"}, "user_id": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "User Id"}, "tenant_id": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Tenant Id"}, "channel": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Channel"}, "intent": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Intent"}, "status": {"type": "string", "maxLength": 32, "title": "Status", "default": "created"}, "model_tier": {"anyOf": [{"type": "string", "maxLength": 32}, {"type": "null"}], "title": "Model Tier"}}, "type": "object", "title": "TaskCreateRequest"}, "TaskResponse": {"properties": {"task_id": {"type": "string", "title": "Task Id"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "tenant_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tenant Id"}, "channel": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Channel"}, "intent": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Intent"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "model_tier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Model Tier"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}}, "type": "object", "required": ["task_id"], "title": "TaskResponse"}, "UserLoginRequest": {"properties": {"phone": {"type": "string", "maxLength": 32, "minLength": 6, "title": "Phone"}, "password": {"type": "string", "maxLength": 128, "minLength": 6, "title": "Password"}}, "type": "object", "required": ["phone", "password"], "title": "UserLoginRequest"}, "UserProfileUpdateRequest": {"properties": {"nickname": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Nickname"}, "avatar": {"anyOf": [{"type": "string", "maxLength": 512}, {"type": "null"}], "title": "Avatar"}, "constitution_type": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Constitution Type"}}, "type": "object", "title": "UserProfileUpdateRequest"}, "UserRegisterRequest": {"properties": {"phone": {"type": "string", "maxLength": 32, "minLength": 6, "title": "Phone"}, "password": {"type": "string", "maxLength": 128, "minLength": 6, "title": "Password"}, "nickname": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Nickname"}, "avatar": {"anyOf": [{"type": "string", "maxLength": 512}, {"type": "null"}], "title": "Avatar"}, "constitution_type": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Constitution Type"}, "invite_code": {"anyOf": [{"type": "string", "maxLength": 32}, {"type": "null"}], "title": "Invite Code"}}, "type": "object", "required": ["phone", "password"], "title": "UserRegisterRequest"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, "input": {"title": "Input"}, "ctx": {"type": "object", "title": "Context"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}, "securitySchemes": {"HTTPBearer": {"type": "http", "scheme": "bearer"}}}, "servers": [{"url": "https://aiceo.hk.cn"}]}