{"openapi":"3.1.0","info":{"title":"VivaCampo API","description":"Multi-tenant Earth Observation platform for agricultural monitoring","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health Check","description":"Expose service health metadata for probes and monitoring.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/liveness":{"get":{"tags":["health"],"summary":"Liveness Check","description":"Liveness probe - Check if the application is running.\n\nThis endpoint should return 200 if the application process is alive.\nKubernetes/Docker will restart the container if this fails.","operationId":"liveness_check_health_liveness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/readiness":{"get":{"tags":["health"],"summary":"Readiness Check","description":"Readiness probe - Check if the application is ready to serve traffic.\n\nThis endpoint verifies that all critical dependencies are available:\n- Database (PostgreSQL)\n- Cache (Redis)  \n- Object Storage (S3)\n- Message Queue (SQS)\n\nReturns 200 if all checks pass, 503 if any dependency is unavailable.","operationId":"readiness_check_health_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","description":"Return basic service metadata and docs entrypoint.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics":{"get":{"summary":"Metrics","description":"Expose Prometheus metrics in text format.","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/oidc/login":{"post":{"tags":["auth"],"summary":"Oidc Login","description":"Authenticate an OIDC identity, ensure workspace membership, and return session context.","operationId":"oidc_login_v1_auth_oidc_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OIDCLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Oidc Login V1 Auth Oidc Login Post"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"Create a local identity, issue session token, and return auth payload.","operationId":"signup_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequestDTO"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponseDTO"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Authenticate local credentials and return session/auth information.","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequestDTO"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponseDTO"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Start password reset flow for a local account.","operationId":"forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequestDTO"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponseDTO"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Validate reset token and update local password credentials.","operationId":"reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequestDTO"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponseDTO"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/workspaces/switch":{"post":{"tags":["auth"],"summary":"Switch Workspace","description":"Switch active workspace for the current identity and issue a new session token.","operationId":"switch_workspace_v1_auth_workspaces_switch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSwitchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokenResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh Session","description":"Rotate current session token and renew HttpOnly cookie without relogin.","operationId":"refresh_session_v1_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokenResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me":{"get":{"tags":["auth"],"summary":"Get Current User","description":"Return identity and workspace list for the currently authenticated user.","operationId":"get_current_user_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/farms":{"post":{"tags":["farms"],"summary":"Create Farm","description":"Create a farm for the tenant (quota and audit handled in use case).","operationId":"create_farm_v1_app_farms_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["farms"],"summary":"List Farms","description":"Return all farms associated with the current tenant.","operationId":"list_farms_v1_app_farms_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"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":{"type":"array","items":{"$ref":"#/components/schemas/FarmView"},"title":"Response List Farms V1 App Farms Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/cells":{"get":{"tags":["farms"],"summary":"List Farm Cells","description":"Return the farm-scoped analytical cell mesh for Modelo B readers.","operationId":"list_farm_cells_v1_app_farms__farm_id__cells_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FarmCellView"},"title":"Response List Farm Cells V1 App Farms  Farm Id  Cells Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/cells/{cell_id}/history":{"get":{"tags":["farms"],"summary":"Get Farm Cell History","description":"Return the full weekly observation history for a single farm cell.","operationId":"get_farm_cell_history_v1_app_farms__farm_id__cells__cell_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}},{"name":"cell_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cell Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FarmCellHistoryPointView"},"title":"Response Get Farm Cell History V1 App Farms  Farm Id  Cells  Cell Id  History Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/zones":{"get":{"tags":["farms"],"summary":"List Farm Zones","description":"Return active farm-scoped management zones for Modelo B readers.","operationId":"list_farm_zones_v1_app_farms__farm_id__zones_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FarmZoneView"},"title":"Response List Farm Zones V1 App Farms  Farm Id  Zones Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/history":{"get":{"tags":["farms"],"summary":"List Farm History","description":"Return farm-scoped aggregated weekly history for Modelo B readers.","operationId":"list_farm_history_v1_app_farms__farm_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FarmHistoryPointView"},"title":"Response List Farm History V1 App Farms  Farm Id  History Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/latest-indicators":{"get":{"tags":["farms"],"summary":"Get Farm Latest Indicators","description":"Return latest aggregated indicators for the farm boundary analytics.","operationId":"get_farm_latest_indicators_v1_app_farms__farm_id__latest_indicators_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmLatestIndicatorsView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/latest-status":{"get":{"tags":["farms"],"summary":"Get Farm Latest Status","description":"Return analytical readiness summary for the farm boundary pipeline.","operationId":"get_farm_latest_status_v1_app_farms__farm_id__latest_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmAnalyticsStatusView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/vrt":{"get":{"tags":["farms"],"summary":"Get Farm Vrt Prescription","description":"Return Variable-Rate Technology prescriptions for a farm.","operationId":"get_farm_vrt_prescription_v1_app_farms__farm_id__vrt_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Farm Vrt Prescription V1 App Farms  Farm Id  Vrt Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/vrt/recalibrate":{"post":{"tags":["farms"],"summary":"Recalibrate Farm Vrt","description":"Enqueue a farm-scoped GENERATE_VRT_PRESCRIPTION job.","operationId":"recalibrate_farm_vrt_v1_app_farms__farm_id__vrt_recalibrate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/rebuild-zones":{"post":{"tags":["farms"],"summary":"Request Farm Analytics Rebuild","description":"Queue a manual rebuild of farm-scoped cells and management zones.","operationId":"request_farm_analytics_rebuild_v1_app_farms__farm_id__rebuild_zones_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmAnalyticsRebuildResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/sensor-harmonization/calibrate":{"post":{"tags":["farms"],"summary":"Request Farm Sensor Harmonization Calibration","description":"Queue a farm-scoped sensor harmonization calibration job.","operationId":"request_farm_sensor_harmonization_calibration_v1_app_farms__farm_id__sensor_harmonization_calibrate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmAnalyticsRebuildResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/gap-fill-weights/calibrate":{"post":{"tags":["farms"],"summary":"Request Farm Gap Fill Weights Calibration","description":"Queue a farm-scoped dynamic blend weights calibration job.","operationId":"request_farm_gap_fill_weights_calibration_v1_app_farms__farm_id__gap_fill_weights_calibrate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmAnalyticsRebuildResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/gap-fill-weights/backtest":{"post":{"tags":["farms"],"summary":"Request Farm Gap Fill Weights Backtest","description":"Queue a farm-scoped G3 backtest job for dynamic blend weights.","operationId":"request_farm_gap_fill_weights_backtest_v1_app_farms__farm_id__gap_fill_weights_backtest_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmAnalyticsRebuildResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/confirm-zones":{"post":{"tags":["farms"],"summary":"Confirm Farm Zones","description":"Promote suggested_zone → zone_id for all cells with a pending zone suggestion.\n\nThis call is idempotent: running it twice on the same farm has no additional effect.","operationId":"confirm_farm_zones_v1_app_farms__farm_id__confirm_zones_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmConfirmZonesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}":{"patch":{"tags":["farms"],"summary":"Update Farm","description":"Update editable farm fields including boundary.","operationId":"update_farm_v1_app_farms__farm_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["farms"],"summary":"Delete Farm","description":"Delete a farm for the tenant.","operationId":"delete_farm_v1_app_farms__farm_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/geocode":{"get":{"tags":["farms"],"summary":"Geocode Location","description":"Proxy a geocoding query through the backend for frontend clients.","operationId":"geocode_location_v1_app_farms_geocode_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois":{"post":{"tags":["aois"],"summary":"Create Aoi","description":"Create an AOI, enforce quotas, and audit the action.","operationId":"create_aoi_v1_app_aois_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AOICreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AOIView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["aois"],"summary":"List Aois","description":"Return AOIs for the current tenant with optional farm and status filters.","operationId":"list_aois_v1_app_aois_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Farm Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AOIView"},"title":"Response List Aois V1 App Aois Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/simulate-split":{"post":{"tags":["aois"],"summary":"Simulate Split","description":"Simulate splitting a polygon into candidate AOI paddocks.","operationId":"simulate_split_v1_app_aois_simulate_split_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AoiSplitSimulationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AoiSplitSimulationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/aois/split":{"post":{"tags":["aois"],"summary":"Split Aois","description":"Persist split polygons as AOIs.","operationId":"split_aois_v1_app_aois_split_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AoiSplitCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AoiSplitCreateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/status":{"post":{"tags":["aois"],"summary":"Get Aois Status","description":"Return processing status for a list of AOIs.","operationId":"get_aois_status_v1_app_aois_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AoiStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AoiStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/aois/{aoi_id}":{"get":{"tags":["aois"],"summary":"Get Aoi","description":"Return a single AOI by id for the current tenant.","operationId":"get_aoi_v1_app_aois__aoi_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AOIView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["aois"],"summary":"Delete Aoi","description":"Delete an AOI and record the operation in the audit log.","operationId":"delete_aoi_v1_app_aois__aoi_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["aois"],"summary":"Update Aoi","description":"Update AOI fields.","operationId":"update_aoi_v1_app_aois__aoi_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AOIPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AOIView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/overlay-sources":{"get":{"tags":["aois"],"summary":"Get Aoi Overlay Sources","description":"Return latest AOI overlay sources (render-only URLs and stats).","operationId":"get_aoi_overlay_sources_v1_app_aois__aoi_id__overlay_sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Aoi Overlay Sources V1 App Aois  Aoi Id  Overlay Sources Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/cells":{"get":{"tags":["aois"],"summary":"Get Aoi Cells","description":"Return farm cells intersecting the AOI geometry (read-only management filter).","operationId":"get_aoi_cells_v1_app_aois__aoi_id__cells_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Aoi Cells V1 App Aois  Aoi Id  Cells Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/zones":{"get":{"tags":["aois"],"summary":"Get Aoi Zones","description":"Return farm zones touched by AOI geometry (read-only management filter).","operationId":"get_aoi_zones_v1_app_aois__aoi_id__zones_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Aoi Zones V1 App Aois  Aoi Id  Zones Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/history":{"get":{"tags":["aois"],"summary":"Get Aoi History","description":"Return historical AOI statistics for charting and trend analysis.","operationId":"get_aoi_history_v1_app_aois__aoi_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":52,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Aoi History V1 App Aois  Aoi Id  History Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/latest-status":{"get":{"tags":["aois"],"summary":"Get Aoi Latest Status","description":"Return per-indicator acquisition metadata for the latest observation week.\n\nResponse shape (per R30 contract):\n  {\n    \"aoi_id\": \"...\",\n    \"year\": 2025,\n    \"week\": 22,\n    \"indicators\": {\n      \"ndvi\": {\"value\": 0.73, \"acquisition_date\": \"2025-06-03\", \"sensor\": \"S2A\", \"is_interpolated\": false},\n      ...\n    }\n  }","operationId":"get_aoi_latest_status_v1_app_aois__aoi_id__latest_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Aoi Latest Status V1 App Aois  Aoi Id  Latest Status Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/data-provenance":{"get":{"tags":["aois"],"summary":"Get Aoi Data Provenance","description":"Return a provenance timeline for the last `weeks` observation entries.\n\nEach entry includes: year, week, sensor_collection, cloud_coverage_pct,\nacquisition_date, is_interpolated, available_indices.","operationId":"get_aoi_data_provenance_v1_app_aois__aoi_id__data_provenance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","default":12,"title":"Weeks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Aoi Data Provenance V1 App Aois  Aoi Id  Data Provenance Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/jobs":{"get":{"tags":["jobs"],"summary":"List Jobs","description":"Return tenant jobs filtered by AOI, type, status, and limit.","operationId":"list_jobs_v1_app_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"}},{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"error_state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error State"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobView"},"title":"Response List Jobs V1 App Jobs Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/jobs/{job_id}":{"get":{"tags":["jobs"],"summary":"Get Job","description":"Return details for one job in the current tenant.","operationId":"get_job_v1_app_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/jobs/{job_id}/runs":{"get":{"tags":["jobs"],"summary":"Get Job Runs","description":"Return execution history for a tenant job.","operationId":"get_job_runs_v1_app_jobs__job_id__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobRunView"},"title":"Response Get Job Runs V1 App Jobs  Job Id  Runs Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/jobs/{job_id}/retry":{"post":{"tags":["jobs"],"summary":"Retry Job","description":"Request a retry for a failed job and record an audit event.","operationId":"retry_job_v1_app_jobs__job_id__retry_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/jobs/{job_id}/cancel":{"post":{"tags":["jobs"],"summary":"Cancel Job","description":"Cancel a pending or running job and record an audit event.","operationId":"cancel_job_v1_app_jobs__job_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/signals":{"get":{"tags":["signals"],"summary":"List Signals","description":"List tenant opportunity signals with cursor pagination support.","operationId":"list_signals_v1_app_signals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"signal_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Type"}},{"name":"signal_family","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal Family"}},{"name":"domain_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Type"}},{"name":"aoi_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"}},{"name":"farm_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Farm Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OpportunitySignalView"},"title":"Response List Signals V1 App Signals Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/signals/{signal_id}":{"get":{"tags":["signals"],"summary":"Get Signal","description":"Return one signal by ID for the current tenant.","operationId":"get_signal_v1_app_signals__signal_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signal_id","in":"path","required":true,"schema":{"type":"string","title":"Signal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunitySignalView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/signals/{signal_id}/ack":{"post":{"tags":["signals"],"summary":"Acknowledge Signal","description":"Mark a signal as acknowledged for the current tenant.","operationId":"acknowledge_signal_v1_app_signals__signal_id__ack_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Signal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/signals/{signal_id}/feedback":{"post":{"tags":["signals"],"summary":"Create Signal Feedback","description":"Record operator feedback for a signal in tenant audit stream.","operationId":"create_signal_feedback_v1_app_signals__signal_id__feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Signal Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/weather/history":{"get":{"tags":["weather"],"summary":"Get Weather History","description":"Return historical weather series for an AOI within an optional date range.","operationId":"get_weather_history_v1_app_aois__aoi_id__weather_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":365,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Weather History V1 App Aois  Aoi Id  Weather History Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/weather/sync":{"post":{"tags":["weather"],"summary":"Sync Weather Data","description":"Queue a weather synchronization job for the target AOI.","operationId":"sync_weather_data_v1_app_aois__aoi_id__weather_sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/radar/history":{"get":{"tags":["radar"],"summary":"Get Radar History","description":"Return historical Sentinel-1 radar metrics for an AOI.","operationId":"get_radar_history_v1_app_aois__aoi_id__radar_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":52,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Radar History V1 App Aois  Aoi Id  Radar History Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/nitrogen/status":{"get":{"tags":["nitrogen"],"summary":"Get Nitrogen Status","description":"Return nitrogen deficiency assessment and recommendation for an AOI.","operationId":"get_nitrogen_status_v1_app_aois__aoi_id__nitrogen_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NitrogenStatus"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/correlation/vigor-climate":{"get":{"tags":["correlation"],"summary":"Get Vigor Climate Correlation","description":"Return vegetation, radar, and weather correlation points with generated insights.","operationId":"get_vigor_climate_correlation_v1_app_aois__aoi_id__correlation_vigor_climate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","maximum":52,"minimum":4,"default":12,"title":"Weeks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrelationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/aois/{aoi_id}/correlation/year-over-year":{"get":{"tags":["correlation"],"summary":"Get Year Over Year","description":"Return year-over-year NDVI weekly comparison for one AOI.","operationId":"get_year_over_year_v1_app_aois__aoi_id__correlation_year_over_year_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YearOverYearResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/field-data":{"post":{"tags":["analytics"],"summary":"Create Field Calibration","description":"Create and audit a field calibration entry for an AOI metric.","operationId":"create_field_calibration_v1_app_field_data_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCalibrationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCalibrationCreateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/analytics/calibration":{"get":{"tags":["analytics"],"summary":"Get Calibration","description":"Return calibration coefficients and fit quality for an AOI metric.","operationId":"get_calibration_v1_app_analytics_calibration_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"metric_type","in":"query","required":true,"schema":{"type":"string","title":"Metric Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/analytics/prediction":{"get":{"tags":["analytics"],"summary":"Get Prediction","description":"Return probabilistic forecast values derived from calibrated AOI data.","operationId":"get_prediction_v1_app_analytics_prediction_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"metric_type","in":"query","required":true,"schema":{"type":"string","title":"Metric Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/field-feedback":{"post":{"tags":["analytics"],"summary":"Create Field Feedback","description":"Store and audit operator field feedback linked to an AOI.","operationId":"create_field_feedback_v1_app_field_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldFeedbackCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldFeedbackCreateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/vision/results":{"post":{"tags":["analytics"],"summary":"Create Vision Result","description":"Persist vision analysis results in tenant audit stream for traceability/history.","operationId":"create_vision_result_v1_app_vision_results_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionResultCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionResultCreateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/telemetry/ingest":{"post":{"tags":["analytics"],"summary":"Track Analytics Event","description":"Register frontend analytics events in the audit stream.","operationId":"track_analytics_event_v1_app_telemetry_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsEventResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/analytics/adoption":{"get":{"tags":["analytics"],"summary":"Get Adoption Metrics","description":"Fetch tenant adoption metrics aggregated by event and phase.","operationId":"get_adoption_metrics_v1_app_analytics_adoption_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptionMetricsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/ai-assistant/threads":{"get":{"tags":["ai-assistant"],"summary":"List Threads","description":"Return AI assistant threads available to the current tenant.","operationId":"list_threads_v1_app_ai_assistant_threads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ThreadView"},"type":"array","title":"Response List Threads V1 App Ai Assistant Threads Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["ai-assistant"],"summary":"Create Thread","description":"Create a new AI assistant thread bound to the current tenant and actor.","operationId":"create_thread_v1_app_ai_assistant_threads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/ai-assistant/threads/{thread_id}/messages":{"post":{"tags":["ai-assistant"],"summary":"Send Message","description":"Process a user message in an AI assistant thread and return workflow output.","operationId":"send_message_v1_app_ai_assistant_threads__thread_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["ai-assistant"],"summary":"Get Messages","description":"Return conversation history for a specific AI assistant thread.","operationId":"get_messages_v1_app_ai_assistant_threads__thread_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageView"},"title":"Response Get Messages V1 App Ai Assistant Threads  Thread Id  Messages Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/ai-assistant/approvals":{"get":{"tags":["ai-assistant"],"summary":"List Approvals","description":"List AI assistant approval requests for the current tenant.","operationId":"list_approvals_v1_app_ai_assistant_approvals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pending_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Pending Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalView"},"title":"Response List Approvals V1 App Ai Assistant Approvals Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/ai-assistant/approvals/{approval_id}/decide":{"post":{"tags":["ai-assistant"],"summary":"Decide Approval","description":"Approve or reject a pending AI assistant action and continue workflow execution.","operationId":"decide_approval_v1_app_ai_assistant_approvals__approval_id__decide_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approval Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/admin/tenant/members":{"get":{"tags":["tenant-admin"],"summary":"List Members","description":"Return all memberships for the current tenant.","operationId":"list_members_v1_app_admin_tenant_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MembershipView"},"type":"array","title":"Response List Members V1 App Admin Tenant Members Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/admin/tenant/members/invite":{"post":{"tags":["tenant-admin"],"summary":"Invite Member","description":"Invite a tenant member (quota enforced inside InviteMemberUseCase).","operationId":"invite_member_v1_app_admin_tenant_members_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/admin/tenant/members/{membership_id}/role":{"patch":{"tags":["tenant-admin"],"summary":"Update Member Role","description":"Update a member role while protecting the last tenant admin.","operationId":"update_member_role_v1_app_admin_tenant_members__membership_id__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Membership Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipRolePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/admin/tenant/members/{membership_id}/status":{"patch":{"tags":["tenant-admin"],"summary":"Update Member Status","description":"Update a member status while protecting the last active tenant admin.","operationId":"update_member_status_v1_app_admin_tenant_members__membership_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Membership Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipStatusPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/admin/tenant/settings":{"get":{"tags":["tenant-admin"],"summary":"Get Tenant Settings","description":"Return tenant settings with defaults when none are configured.","operationId":"get_tenant_settings_v1_app_admin_tenant_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettingsView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["tenant-admin"],"summary":"Update Tenant Settings","description":"Update tenant settings and record audited changes when present.","operationId":"update_tenant_settings_v1_app_admin_tenant_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettingsPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/admin/tenant/audit":{"get":{"tags":["tenant-admin"],"summary":"Get Audit Log","description":"Return tenant-scoped audit log entries.","operationId":"get_audit_log_v1_app_admin_tenant_audit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogView"},"title":"Response Get Audit Log V1 App Admin Tenant Audit Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/drone-images/upload":{"post":{"tags":["drone-images"],"summary":"Upload Drone Image","description":"Create a drone-image upload request after validating tenant quota limits.","operationId":"upload_drone_image_v1_app_drone_images_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDroneImageRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDroneImageResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/app/drone-images/{image_id}":{"get":{"tags":["drone-images"],"summary":"Get Drone Image","description":"Return metadata and processing state for one drone image.","operationId":"get_drone_image_v1_app_drone_images__image_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DroneImageResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/drone-images/aoi/{aoi_id}":{"get":{"tags":["drone-images"],"summary":"List Drone Images By Aoi","description":"List drone images associated with a specific AOI.","operationId":"list_drone_images_by_aoi_v1_app_drone_images_aoi__aoi_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DroneImageResponse"},"title":"Response List Drone Images By Aoi V1 App Drone Images Aoi  Aoi Id  Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/tenants":{"get":{"tags":["system-admin"],"summary":"List Tenants","description":"Return tenants with optional type filtering for system administrators.","operationId":"list_tenants_v1_admin_tenants_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tenant_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantView"},"title":"Response List Tenants V1 Admin Tenants Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["system-admin"],"summary":"Create Tenant","description":"Create a tenant and record an audit event as system administrator.","operationId":"create_tenant_v1_admin_tenants_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/tenants/{tenant_id}":{"patch":{"tags":["system-admin"],"summary":"Update Tenant","description":"Update tenant status and record status-change audit details.","operationId":"update_tenant_v1_admin_tenants__tenant_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/jobs":{"get":{"tags":["system-admin"],"summary":"List All Jobs","description":"Return jobs across tenants with optional status, type, and error_state filters.","operationId":"list_all_jobs_v1_admin_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"}},{"name":"error_state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error State"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SystemJobView"},"title":"Response List All Jobs V1 Admin Jobs Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/jobs/{job_id}/retry":{"post":{"tags":["system-admin"],"summary":"Admin Retry Job","description":"Retry any job as system administrator and register an audit event.","operationId":"admin_retry_job_v1_admin_jobs__job_id__retry_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/jobs/reprocess":{"post":{"tags":["system-admin"],"summary":"Reprocess Jobs","description":"Request reprocessing jobs for a tenant, AOI, year, and week.","operationId":"reprocess_jobs_v1_admin_jobs_reprocess_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReprocessJobsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/coverage/bands":{"get":{"tags":["system-admin"],"summary":"Band Coverage Panel","operationId":"band_coverage_panel_v1_admin_coverage_bands_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"region_level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region Level"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/coverage/indicators":{"get":{"tags":["system-admin"],"summary":"Indicator Health Panel","operationId":"indicator_health_panel_v1_admin_coverage_indicators_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","default":12,"title":"Weeks"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/coverage/gap-fill-gate":{"get":{"tags":["system-admin"],"summary":"Gap Fill Gate Monitor Panel","operationId":"gap_fill_gate_monitor_panel_v1_admin_coverage_gap_fill_gate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","default":12,"title":"Weeks"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"domain_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Type"}},{"name":"index_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Index Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/coverage/regions":{"get":{"tags":["system-admin"],"summary":"Coverage Regions Panel","operationId":"coverage_regions_panel_v1_admin_coverage_regions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/coverage/kpis":{"get":{"tags":["system-admin"],"summary":"Coverage Kpis","operationId":"coverage_kpis_v1_admin_coverage_kpis_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","default":12,"title":"Weeks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/scheduler/trigger-daily-acquisition":{"post":{"tags":["system-admin"],"summary":"Trigger Daily Acquisition","operationId":"trigger_daily_acquisition_v1_admin_scheduler_trigger_daily_acquisition_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/ops/cleanup-stale-running":{"post":{"tags":["system-admin"],"summary":"Cleanup Stale Running Jobs","description":"Force cleanup of RUNNING jobs older than timeout.","operationId":"cleanup_stale_running_jobs_v1_admin_ops_cleanup_stale_running_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"timeout_minutes","in":"query","required":false,"schema":{"type":"integer","default":15,"title":"Timeout Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/ops/requeue-orphan-pending":{"post":{"tags":["system-admin"],"summary":"Requeue Orphan Pending Jobs","description":"Re-enqueue stale PENDING jobs that may be orphaned from SQS.","operationId":"requeue_orphan_pending_jobs_v1_admin_ops_requeue_orphan_pending_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"older_than_minutes","in":"query","required":false,"schema":{"type":"integer","default":15,"title":"Older Than Minutes"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"aoi_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"}},{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/ops/health":{"get":{"tags":["system-admin"],"summary":"System Health","description":"Return system-wide health information for administrators.","operationId":"system_health_v1_admin_ops_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/ops/queues":{"get":{"tags":["system-admin"],"summary":"Queue Stats","description":"Return queue statistics for administrators.","operationId":"queue_stats_v1_admin_ops_queues_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/audit":{"get":{"tags":["system-admin"],"summary":"Global Audit Log","description":"Return global audit log entries with parsed JSON fields.","operationId":"global_audit_log_v1_admin_audit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Global Audit Log V1 Admin Audit Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/providers/status":{"get":{"tags":["system-admin"],"summary":"Providers Status","description":"Return configured STAC providers with endpoint metadata and health placeholders.","operationId":"providers_status_v1_admin_providers_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/coverage/summary":{"get":{"tags":["system-admin"],"summary":"Coverage Summary","description":"Return coverage summary across all (or one) tenants, wrapped in a totals envelope.\n\nQuery params:\n- weeks_back: how many weeks of history to evaluate (default 8)\n- tenant_id:  optional filter to a single tenant\n- only_gaps:  if True, return only AOIs with at least one missing week\n\nResponse envelope:\n{\n  \"total_aois\": 42,\n  \"total_weeks_checked\": 336,\n  \"pct_weeks_with_real_data\": 85.7,\n  \"pct_weeks_interpolated\": 0.0,\n  \"pct_weeks_missing\": 14.3,\n  \"rows\": [\n    {\n      \"tenant_id\": \"...\",\n      \"tenant_name\": null,\n      \"aoi_id\": \"...\",\n      \"aoi_name\": \"Fazenda X — Talhão A\",\n      \"farm_name\": \"Fazenda X\",\n      \"domain_type\": \"RURAL\",\n      \"weeks_expected\": 8,\n      \"weeks_with_data\": 6,\n      \"gap_weeks\": 2,\n      \"latest_year\": 2026,\n      \"latest_week\": 7,\n      \"latest_acquisition_date\": \"2026-02-17\",\n      \"latest_cloud_pct\": 12.3,\n      \"has_gap\": true\n    }\n  ]\n}","operationId":"coverage_summary_v1_admin_coverage_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"weeks_back","in":"query","required":false,"schema":{"type":"integer","default":8,"title":"Weeks Back"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"only_gaps","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Gaps"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/farms/{farm_id}/analytics-status":{"get":{"tags":["system-admin"],"summary":"Admin Get Farm Analytics Status","description":"Return farm analytics status for system admin (cross-tenant read).\n\nRequires `tenant_id` as a query parameter since system admins operate\nacross tenants and the status is scoped to (tenant_id, farm_id).","operationId":"admin_get_farm_analytics_status_v1_admin_farms__farm_id__analytics_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/farms/{farm_id}/backfill":{"post":{"tags":["system-admin"],"summary":"Admin Trigger Farm Backfill","description":"Enqueue REBUILD_WEEK jobs for each ISO week in the requested range (max 26 weeks).\n\nSYSTEM_ADMIN only. Does not touch the farm mesh or management zones — only\nre-populates `cell_observations_weekly` for historical weeks.","operationId":"admin_trigger_farm_backfill_v1_admin_farms__farm_id__backfill_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmBackfillRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tiles/aois/{aoi_id}/{z}/{x}/{y}.png":{"get":{"tags":["tiles"],"summary":"Get Aoi Tile","description":"Redirect tile requests to TiTiler for a tenant AOI and index/time window.","operationId":"get_aoi_tile_v1_tiles_aois__aoi_id___z___x___y__png_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"z","in":"path","required":true,"schema":{"type":"integer","title":"Z"}},{"name":"x","in":"path","required":true,"schema":{"type":"integer","title":"X"}},{"name":"y","in":"path","required":true,"schema":{"type":"integer","title":"Y"}},{"name":"index","in":"query","required":false,"schema":{"type":"string","description":"Vegetation index to render","default":"ndvi","title":"Index"},"description":"Vegetation index to render"},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ISO year (default: current)","title":"Year"},"description":"ISO year (default: current)"},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ISO week (default: current)","title":"Week"},"description":"ISO week (default: current)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tiles/aois/{aoi_id}/tilejson.json":{"get":{"tags":["tiles"],"summary":"Get Aoi Tilejson","description":"Return TileJSON metadata for a tenant AOI and selected index/week.","operationId":"get_aoi_tilejson_v1_tiles_aois__aoi_id__tilejson_json_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"index","in":"query","required":false,"schema":{"type":"string","description":"Vegetation index","default":"ndvi","title":"Index"},"description":"Vegetation index"},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ISO year","title":"Year"},"description":"ISO year"},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ISO week","title":"Week"},"description":"ISO week"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tiles/farms/{farm_id}/overlay-sources":{"get":{"tags":["tiles"],"summary":"Get Farm Overlay Sources","description":"Return AOI tile URL templates for a farm-level bridge overlay strategy.","operationId":"get_farm_overlay_sources_v1_tiles_farms__farm_id__overlay_sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}},{"name":"index","in":"query","required":false,"schema":{"type":"string","description":"Vegetation index to render","default":"ndvi","title":"Index"},"description":"Vegetation index to render"},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ISO year (default: current)","title":"Year"},"description":"ISO year (default: current)"},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ISO week (default: current)","title":"Week"},"description":"ISO week (default: current)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tiles/config":{"get":{"tags":["tiles"],"summary":"Get Tiles Config","description":"Return tile-serving configuration values consumed by frontend clients.","operationId":"get_tiles_config_v1_tiles_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tiles/sentinel/{z}/{x}/{y}.png":{"get":{"tags":["tiles"],"summary":"Get Sentinel Tile","description":"FLUXO A — Basemap Sentinel-2 (visualização global).\n\nPROXY (não redirect): busca o tile do TiTiler via Docker DNS interno\ne devolve o PNG diretamente ao browser. O browser NUNCA vê a URL do\nTiTiler — elimina CSP violations e Docker DNS issues.\n\nPor que proxy e não 307 redirect:\n  Um redirect 307 expõe a URL interna do TiTiler (http://tiler:8080) ao\n  browser. O browser não consegue resolver 'tiler' (hostname Docker interno)\n  e o CSP bloqueia o request. Com proxy, o servidor busca o tile\n  internamente e o browser só vê /v1/tiles/sentinel/...\n\nNÃO usar build_tiler_url() aqui — exclusivo para indicadores AOI (Fluxo B).\nNÃO adicionar filtros de tenant ou AOI — o basemap é global e público.","operationId":"get_sentinel_tile_v1_tiles_sentinel__z___x___y__png_get","parameters":[{"name":"z","in":"path","required":true,"schema":{"type":"integer","title":"Z"}},{"name":"x","in":"path","required":true,"schema":{"type":"integer","title":"X"}},{"name":"y","in":"path","required":true,"schema":{"type":"integer","title":"Y"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week"}},{"name":"cloud_cover_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Cloud Cover Max"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tiles/indices":{"get":{"tags":["tiles"],"summary":"List Available Indices","description":"Return supported vegetation indices and their semantic descriptions.","operationId":"list_available_indices_v1_tiles_indices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tiles/aois/{aoi_id}/export":{"post":{"tags":["tiles"],"summary":"Export Aoi Cog","description":"Request COG export for an AOI and schedule generation when needed.","operationId":"export_aoi_cog_v1_tiles_aois__aoi_id__export_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"index","in":"query","required":false,"schema":{"type":"string","description":"Vegetation index to export","default":"ndvi","title":"Index"},"description":"Vegetation index to export"},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ISO year","title":"Year"},"description":"ISO year"},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ISO week","title":"Week"},"description":"ISO week"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/tiles/aois/{aoi_id}/export/status":{"get":{"tags":["tiles"],"summary":"Get Export Status","description":"Return status for an AOI COG export request.","operationId":"get_export_status_v1_tiles_aois__aoi_id__export_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"aoi_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aoi Id"}},{"name":"index","in":"query","required":false,"schema":{"type":"string","default":"ndvi","title":"Index"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/reports/rural":{"post":{"tags":["reports"],"summary":"Request a Rural PDF report","description":"Enqueue a GENERATE_RURAL_PDF background job and return the queued report ID.","operationId":"request_rural_report_v1_app_farms__farm_id__reports_rural_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateReportRequest","default":{}}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateReportResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/reports/fii":{"post":{"tags":["reports"],"summary":"Request a FII (Institutional) PDF report","description":"Enqueue a GENERATE_FII_PDF background job and return the queued report ID.","operationId":"request_fii_report_v1_app_farms__farm_id__reports_fii_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateReportRequest","default":{}}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateReportResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/reports/urban":{"post":{"tags":["reports"],"summary":"Request an Urban PDF report","description":"Enqueue a GENERATE_URBAN_PDF background job and return the queued report ID.","operationId":"request_urban_report_v1_app_farms__farm_id__reports_urban_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateReportRequest","default":{}}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateReportResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/reports":{"get":{"tags":["reports"],"summary":"List reports for a farm","description":"Return the most recent reports for a farm, newest first.","operationId":"list_farm_reports_v1_app_farms__farm_id__reports_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}},{"name":"report_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportSummary"},"title":"Response List Farm Reports V1 App Farms  Farm Id  Reports Get"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/reports/{report_id}/cancel":{"post":{"tags":["reports"],"summary":"Cancel a report generation request","operationId":"cancel_report_v1_app_reports__report_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReportResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/reports/{report_id}":{"delete":{"tags":["reports"],"summary":"Delete a report history item","operationId":"delete_report_v1_app_reports__report_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteReportResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/reports/{report_id}/download":{"get":{"tags":["reports"],"summary":"Get a presigned download URL for a report PDF","description":"Return a short-lived presigned URL to download the generated PDF.","operationId":"get_report_download_url_v1_app_reports__report_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/reports/fii/latest":{"get":{"tags":["reports"],"summary":"Get latest FII report URL for a farm","operationId":"get_latest_fii_report_v1_app_farms__farm_id__reports_fii_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/reports/rural/latest":{"get":{"tags":["reports"],"summary":"Get latest Rural report URL for a farm","operationId":"get_latest_rural_report_v1_app_farms__farm_id__reports_rural_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/app/farms/{farm_id}/reports/urban/latest":{"get":{"tags":["reports"],"summary":"Get latest Urban report URL for a farm","operationId":"get_latest_urban_report_v1_app_farms__farm_id__reports_urban_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"AOICreate":{"properties":{"farm_id":{"type":"string","format":"uuid","title":"Farm Id"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"use_type":{"type":"string","enum":["PASTURE","CROP","TIMBER","RESIDENTIAL","COMMERCIAL","INDUSTRIAL","MIXED_USE"],"title":"Use Type"},"geometry":{"type":"string","title":"Geometry"}},"type":"object","required":["farm_id","name","use_type","geometry"],"title":"AOICreate"},"AOIPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"use_type":{"anyOf":[{"type":"string","enum":["PASTURE","CROP","TIMBER","RESIDENTIAL","COMMERCIAL","INDUSTRIAL","MIXED_USE"]},{"type":"null"}],"title":"Use Type"},"status":{"anyOf":[{"type":"string","enum":["ACTIVE","ARCHIVED"]},{"type":"null"}],"title":"Status"},"geometry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geometry"}},"type":"object","title":"AOIPatch"},"AOIView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"},"farm_id":{"type":"string","format":"uuid","title":"Farm Id"},"name":{"type":"string","title":"Name"},"use_type":{"type":"string","title":"Use Type"},"status":{"type":"string","title":"Status"},"area_ha":{"type":"number","title":"Area Ha"},"geometry":{"type":"string","title":"Geometry"},"domain_type":{"type":"string","title":"Domain Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","farm_id","name","use_type","status","area_ha","geometry","domain_type","created_at"],"title":"AOIView"},"AdoptionEventMetric":{"properties":{"event_name":{"type":"string","title":"Event Name"},"count":{"type":"integer","title":"Count"},"last_seen":{"type":"string","format":"date-time","title":"Last Seen"}},"type":"object","required":["event_name","count","last_seen"],"title":"AdoptionEventMetric"},"AdoptionMetricsResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AdoptionEventMetric"},"type":"array","title":"Events"},"phases":{"items":{"$ref":"#/components/schemas/AdoptionPhaseMetric"},"type":"array","title":"Phases"}},"type":"object","required":["events","phases"],"title":"AdoptionMetricsResponse"},"AdoptionPhaseMetric":{"properties":{"phase":{"type":"string","enum":["F1","F2","F3"],"title":"Phase"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["phase","count"],"title":"AdoptionPhaseMetric"},"AnalyticsEventRequest":{"properties":{"event_name":{"type":"string","maxLength":80,"minLength":1,"title":"Event Name"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"phase":{"anyOf":[{"type":"string","enum":["F1","F2","F3"]},{"type":"null"}],"title":"Phase"}},"type":"object","required":["event_name"],"title":"AnalyticsEventRequest"},"AnalyticsEventResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"}},"type":"object","title":"AnalyticsEventResponse"},"AoiSplitCreatePolygon":{"properties":{"geometry_wkt":{"type":"string","title":"Geometry Wkt"},"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"}},"type":"object","required":["geometry_wkt"],"title":"AoiSplitCreatePolygon"},"AoiSplitCreateRequest":{"properties":{"parent_aoi_id":{"type":"string","format":"uuid","title":"Parent Aoi Id"},"polygons":{"items":{"$ref":"#/components/schemas/AoiSplitCreatePolygon"},"type":"array","title":"Polygons"},"max_area_ha":{"type":"number","exclusiveMinimum":0.0,"title":"Max Area Ha","default":2000}},"type":"object","required":["parent_aoi_id","polygons"],"title":"AoiSplitCreateRequest"},"AoiSplitCreateResponse":{"properties":{"created":{"type":"integer","title":"Created"},"job_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Job Ids"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["created","job_ids"],"title":"AoiSplitCreateResponse"},"AoiSplitPolygon":{"properties":{"geometry_wkt":{"type":"string","title":"Geometry Wkt"},"area_ha":{"type":"number","title":"Area Ha"}},"type":"object","required":["geometry_wkt","area_ha"],"title":"AoiSplitPolygon"},"AoiSplitSimulationRequest":{"properties":{"geometry_wkt":{"type":"string","title":"Geometry Wkt"},"mode":{"type":"string","enum":["voronoi","grid"],"title":"Mode"},"target_count":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Target Count"},"max_area_ha":{"type":"number","exclusiveMinimum":0.0,"title":"Max Area Ha","default":2000}},"type":"object","required":["geometry_wkt","mode","target_count"],"title":"AoiSplitSimulationRequest"},"AoiSplitSimulationResponse":{"properties":{"polygons":{"items":{"$ref":"#/components/schemas/AoiSplitPolygon"},"type":"array","title":"Polygons"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["polygons","warnings"],"title":"AoiSplitSimulationResponse"},"AoiStatusItem":{"properties":{"aoi_id":{"type":"string","format":"uuid","title":"Aoi Id"},"is_processing":{"type":"boolean","title":"Is Processing"},"job_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Status"},"job_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["aoi_id","is_processing"],"title":"AoiStatusItem"},"AoiStatusRequest":{"properties":{"aoi_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":2000,"minItems":1,"title":"Aoi Ids"}},"type":"object","required":["aoi_ids"],"title":"AoiStatusRequest"},"AoiStatusResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AoiStatusItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AoiStatusResponse"},"ApprovalDecision":{"properties":{"decision":{"type":"string","pattern":"^(APPROVED|REJECTED)$","title":"Decision"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["decision"],"title":"ApprovalDecision","description":"Request body for deciding on a Human-in-the-Loop approval."},"ApprovalView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tool_name":{"type":"string","title":"Tool Name"},"tool_payload":{"additionalProperties":true,"type":"object","title":"Tool Payload"},"decision":{"type":"string","title":"Decision"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","tool_name","tool_payload","decision","created_at"],"title":"ApprovalView","description":"Response shape for an AI assistant approval item."},"AuditLogView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"action":{"type":"string","title":"Action"},"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"changes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Changes"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","action","resource_type","resource_id","changes","metadata","created_at"],"title":"AuditLogView"},"AuthResponseDTO":{"properties":{"identity":{"$ref":"#/components/schemas/IdentityDTO"},"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceDTO"},"type":"array","title":"Workspaces"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}},"type":"object","required":["identity","workspaces"],"title":"AuthResponseDTO"},"CalibrationResponse":{"properties":{"r2":{"type":"number","title":"R2"},"coefficients":{"additionalProperties":true,"type":"object","title":"Coefficients"},"sample_size":{"type":"integer","title":"Sample Size"}},"type":"object","required":["r2","coefficients","sample_size"],"title":"CalibrationResponse"},"CancelReportResponse":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id"},"status":{"type":"string","title":"Status"},"cancelled":{"type":"boolean","title":"Cancelled"}},"type":"object","required":["report_id","status","cancelled"],"title":"CancelReportResponse"},"CorrelationDataPoint":{"properties":{"date":{"type":"string","title":"Date"},"ndvi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi"},"rvi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rvi"},"rain_mm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rain Mm"},"temp_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temp Avg"}},"type":"object","required":["date"],"title":"CorrelationDataPoint","description":"A single time-series point combining vegetation and climate measurements."},"CorrelationResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CorrelationDataPoint"},"type":"array","title":"Data"},"insights":{"items":{"$ref":"#/components/schemas/Insight"},"type":"array","title":"Insights"}},"type":"object","required":["data","insights"],"title":"CorrelationResponse","description":"Response shape for vigor-climate correlation."},"CurrentUserResult":{"properties":{"identity":{"$ref":"#/components/schemas/IdentityResult"},"current_workspace":{"$ref":"#/components/schemas/WorkspaceResult"},"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceResult"},"type":"array","title":"Workspaces"}},"type":"object","required":["identity","current_workspace","workspaces"],"title":"CurrentUserResult","description":"Full profile of the currently authenticated user."},"DeleteReportResponse":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id"},"status":{"type":"string","title":"Status"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["report_id","status","deleted"],"title":"DeleteReportResponse"},"DroneImageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"aoi_id":{"type":"string","format":"uuid","title":"Aoi Id"},"filename":{"type":"string","title":"Filename"},"gsd_cm":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Gsd Cm"},"capture_date":{"type":"string","format":"date-time","title":"Capture Date"},"state":{"type":"string","title":"State"},"pmtiles_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pmtiles Url"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","aoi_id","filename","gsd_cm","capture_date","state","pmtiles_url","error_message","created_at"],"title":"DroneImageResponse","description":"Response shape for a single drone image record."},"FarmAnalyticsRebuildResponse":{"properties":{"farm_id":{"type":"string","format":"uuid","title":"Farm Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["farm_id","job_id","status"],"title":"FarmAnalyticsRebuildResponse"},"FarmAnalyticsStatusView":{"properties":{"farm_id":{"type":"string","format":"uuid","title":"Farm Id"},"analytic_status":{"type":"string","title":"Analytic Status"},"latest_job_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Job Status"},"latest_job_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Job Updated At"},"latest_job_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Job Action"},"latest_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Year"},"latest_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Week"},"cell_count":{"type":"integer","title":"Cell Count","default":0},"cells_with_stats":{"type":"integer","title":"Cells With Stats","default":0},"rows_written":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Written"},"cells_processed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cells Processed"},"cells_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cells Total"},"last_write_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Write At"},"zone_count":{"type":"integer","title":"Zone Count","default":0},"zoned_cell_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Zoned Cell Count"},"zone_coverage_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Zone Coverage Ratio"},"zone_assignment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Assignment Status"},"data_quality_summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Data Quality Summary"},"confidence_summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Confidence Summary"}},"type":"object","required":["farm_id","analytic_status"],"title":"FarmAnalyticsStatusView"},"FarmBackfillRequest":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"from_date":{"type":"string","title":"From Date"},"to_date":{"type":"string","title":"To Date"}},"type":"object","required":["tenant_id","from_date","to_date"],"title":"FarmBackfillRequest"},"FarmCellHistoryPointView":{"properties":{"year":{"type":"integer","title":"Year"},"week":{"type":"integer","title":"Week"},"ndvi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi Mean"},"reci_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reci Mean"},"evi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Evi Mean"},"savi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Savi Mean"},"ndre_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndre Mean"},"gndvi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gndvi Mean"},"cig_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cig Mean"},"ndwi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndwi Mean"},"ndmi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndmi Mean"},"msi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Msi Mean"},"nbr_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nbr Mean"},"bsi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bsi Mean"},"ndbi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndbi Mean"},"anomaly_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Anomaly Mean"},"rvi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rvi Mean"},"ratio_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ratio Mean"},"lst_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lst Mean"},"ntl_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ntl Mean"},"ari_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ari Mean"},"cri_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cri Mean"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"},"resolution_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Strategy"},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score"},"confidence_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Label"},"no_data_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"No Data Reason"},"source_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider"}},"type":"object","required":["year","week"],"title":"FarmCellHistoryPointView","description":"Per-cell weekly observation record returned by GET /farms/{id}/cells/{cell_id}/history."},"FarmCellView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cell_index":{"type":"integer","title":"Cell Index"},"area_ha":{"type":"number","title":"Area Ha"},"zone_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Zone Id"},"suggested_zone":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Suggested Zone"},"domain_type":{"type":"string","title":"Domain Type"},"geometry":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Geometry"},"ndvi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi Mean"},"reci_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reci Mean"},"cig_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cig Mean"},"ndwi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndwi Mean"},"ndmi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndmi Mean"},"bsi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bsi Mean"},"ndbi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndbi Mean"},"lst_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lst Mean"},"ntl_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ntl Mean"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"},"source_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Year"},"source_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Week"},"resolution_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Strategy"},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score"},"confidence_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Label"},"no_data_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"No Data Reason"},"source_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider"}},"type":"object","required":["id","cell_index","area_ha","domain_type"],"title":"FarmCellView"},"FarmConfirmZonesResponse":{"properties":{"farm_id":{"type":"string","format":"uuid","title":"Farm Id"},"cells_confirmed":{"type":"integer","title":"Cells Confirmed"}},"type":"object","required":["farm_id","cells_confirmed"],"title":"FarmConfirmZonesResponse"},"FarmCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"timezone":{"type":"string","title":"Timezone","default":"America/Sao_Paulo"},"boundary_wkt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Wkt"},"domain_type":{"type":"string","enum":["RURAL","URBAN"],"title":"Domain Type"}},"type":"object","required":["name","domain_type"],"title":"FarmCreate"},"FarmHistoryPointView":{"properties":{"year":{"type":"integer","title":"Year"},"week":{"type":"integer","title":"Week"},"cell_count":{"type":"integer","title":"Cell Count"},"ndvi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi Mean"},"reci_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reci Mean"},"cig_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cig Mean"},"ndwi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndwi Mean"},"ndmi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndmi Mean"},"bsi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bsi Mean"},"ndbi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndbi Mean"},"lst_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lst Mean"},"ntl_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ntl Mean"},"dominant_source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dominant Source Kind"},"cells_real":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cells Real"},"cells_backtrack":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cells Backtrack"},"cells_estimated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cells Estimated"},"cells_no_data":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cells No Data"}},"type":"object","required":["year","week","cell_count"],"title":"FarmHistoryPointView"},"FarmIndicatorSetView":{"properties":{"ndvi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi Mean"},"reci_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reci Mean"},"cig_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cig Mean"},"ndwi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndwi Mean"},"ndmi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndmi Mean"},"bsi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bsi Mean"},"ndbi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndbi Mean"},"lst_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lst Mean"},"ntl_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ntl Mean"}},"type":"object","title":"FarmIndicatorSetView"},"FarmLatestIndicatorsView":{"properties":{"farm_id":{"type":"string","format":"uuid","title":"Farm Id"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week"},"cell_count":{"type":"integer","title":"Cell Count","default":0},"dominant_source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dominant Source Kind"},"indicators":{"$ref":"#/components/schemas/FarmIndicatorSetView"}},"type":"object","required":["farm_id","indicators"],"title":"FarmLatestIndicatorsView"},"FarmUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"boundary_wkt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Wkt"}},"type":"object","title":"FarmUpdate"},"FarmView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"name":{"type":"string","title":"Name"},"timezone":{"type":"string","title":"Timezone"},"boundary_wkt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boundary Wkt"},"aoi_count":{"type":"integer","title":"Aoi Count","default":0},"domain_type":{"type":"string","title":"Domain Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","name","timezone","domain_type","created_at"],"title":"FarmView"},"FarmZoneView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"zone_id":{"type":"integer","title":"Zone Id"},"label":{"type":"string","title":"Label"},"generation_method":{"type":"string","title":"Generation Method"},"cell_count":{"type":"integer","title":"Cell Count"},"area_ha":{"type":"number","title":"Area Ha"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","zone_id","label","generation_method","cell_count","area_ha","status","created_at","updated_at"],"title":"FarmZoneView"},"FieldCalibrationCreateRequest":{"properties":{"aoi_id":{"type":"string","format":"uuid","title":"Aoi Id"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Date"},"metric_type":{"type":"string","enum":["biomass","yield"],"title":"Metric Type"},"value":{"type":"number","exclusiveMinimum":0.0,"title":"Value"},"unit":{"type":"string","enum":["kg_ha","sc_ha"],"title":"Unit","default":"kg_ha"}},"type":"object","required":["aoi_id","date","metric_type","value"],"title":"FieldCalibrationCreateRequest"},"FieldCalibrationCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status","default":"created"}},"type":"object","required":["id"],"title":"FieldCalibrationCreateResponse"},"FieldFeedbackCreateRequest":{"properties":{"aoi_id":{"type":"string","format":"uuid","title":"Aoi Id"},"type":{"type":"string","enum":["ISSUE","FALSE_POSITIVE"],"title":"Type"},"message":{"type":"string","maxLength":500,"minLength":1,"title":"Message"}},"type":"object","required":["aoi_id","type","message"],"title":"FieldFeedbackCreateRequest"},"FieldFeedbackCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status","default":"created"}},"type":"object","required":["id"],"title":"FieldFeedbackCreateResponse"},"ForgotPasswordRequestDTO":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequestDTO"},"GenerateReportRequest":{"properties":{"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week"}},"type":"object","title":"GenerateReportRequest"},"GenerateReportResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"report_id":{"type":"string","title":"Report Id"},"status":{"type":"string","title":"Status","default":"QUEUED"}},"type":"object","required":["job_id","report_id"],"title":"GenerateReportResponse"},"IdentityDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","email","name","status"],"title":"IdentityDTO"},"IdentityResult":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","email","name","status"],"title":"IdentityResult"},"Insight":{"properties":{"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"},"severity":{"type":"string","title":"Severity"}},"type":"object","required":["type","message","severity"],"title":"Insight","description":"A generated agronomic insight derived from correlation analysis."},"InviteMemberRequest":{"properties":{"email":{"type":"string","pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","title":"Email"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"role":{"type":"string","enum":["EDITOR","VIEWER"],"title":"Role"}},"type":"object","required":["email","name","role"],"title":"InviteMemberRequest"},"JobRunView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"attempt":{"type":"integer","title":"Attempt"},"status":{"type":"string","title":"Status"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","job_id","attempt","status","started_at"],"title":"JobRunView"},"JobView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"aoi_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"retry_count":{"type":"integer","title":"Retry Count","default":0},"last_retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Retry 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","aoi_id","job_type","status","created_at","updated_at"],"title":"JobView"},"LoginRequestDTO":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequestDTO"},"MembershipRolePatch":{"properties":{"role":{"type":"string","enum":["TENANT_ADMIN","EDITOR","VIEWER"],"title":"Role"}},"type":"object","required":["role"],"title":"MembershipRolePatch"},"MembershipStatusPatch":{"properties":{"status":{"type":"string","enum":["ACTIVE","SUSPENDED"],"title":"Status"}},"type":"object","required":["status"],"title":"MembershipStatusPatch"},"MembershipView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"identity_id":{"type":"string","format":"uuid","title":"Identity Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","identity_id","email","name","role","status","created_at"],"title":"MembershipView"},"MessageCreate":{"properties":{"text":{"type":"string","maxLength":2000,"minLength":1,"title":"Text"},"language":{"type":"string","title":"Language","description":"pt-BR or en","default":"pt-BR"}},"type":"object","required":["text"],"title":"MessageCreate","description":"Request body for sending a message in an AI assistant thread."},"MessageResponseDTO":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponseDTO"},"MessageView":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"MessageView","description":"Response shape for a single AI assistant message."},"NitrogenStatus":{"properties":{"status":{"type":"string","title":"Status"},"confidence":{"type":"number","title":"Confidence"},"ndvi_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi Mean"},"ndre_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndre Mean"},"reci_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reci Mean"},"recommendation":{"type":"string","title":"Recommendation"},"zone_map_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Map Url"}},"type":"object","required":["status","confidence","recommendation"],"title":"NitrogenStatus","description":"Response shape for an AOI nitrogen deficiency assessment."},"OIDCLoginRequest":{"properties":{"provider":{"type":"string","enum":["cognito","google","microsoft","local"],"title":"Provider"},"id_token":{"type":"string","title":"Id Token"}},"type":"object","required":["provider","id_token"],"title":"OIDCLoginRequest"},"OpportunitySignalView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"aoi_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"},"aoi_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aoi Name"},"farm_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Farm Id"},"farm_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Farm Name"},"scope_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Id"},"cell_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cell Index"},"signal_origin":{"anyOf":[{"type":"string","enum":["cell","aoi","farm","aoi_aggregate","farm_aggregate"]},{"type":"null"}],"title":"Signal Origin"},"year":{"type":"integer","maximum":2100.0,"minimum":2000.0,"title":"Year"},"week":{"type":"integer","maximum":53.0,"minimum":1.0,"title":"Week"},"signal_type":{"type":"string","title":"Signal Type"},"status":{"type":"string","enum":["NEW","OPEN","ACK","RESOLVED","DISMISSED"],"title":"Status"},"severity":{"type":"string","enum":["LOW","MEDIUM","HIGH"],"title":"Severity"},"confidence":{"type":"string","enum":["LOW","MEDIUM","HIGH"],"title":"Confidence"},"score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Score"},"model_version":{"type":"string","title":"Model Version"},"change_method":{"type":"string","title":"Change Method"},"evidence_json":{"additionalProperties":true,"type":"object","title":"Evidence Json"},"recommended_actions":{"items":{"type":"string"},"type":"array","maxItems":5,"title":"Recommended Actions"},"domain_type":{"anyOf":[{"type":"string","enum":["RURAL","URBAN"]},{"type":"null"}],"title":"Domain Type"},"signal_family":{"anyOf":[{"type":"string","enum":["opportunity","alert","invasion"]},{"type":"null"}],"title":"Signal Family"},"source_pipeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Pipeline"},"data_quality":{"anyOf":[{"type":"string","enum":["PROVISIONAL","FINAL"]},{"type":"null"}],"title":"Data Quality"},"missing_cells":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Missing Cells"},"coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Coverage Pct"},"last_repair_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Repair At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","year","week","signal_type","status","severity","confidence","score","model_version","change_method","evidence_json","recommended_actions","created_at"],"title":"OpportunitySignalView"},"PredictionResponse":{"properties":{"p10":{"type":"number","title":"P10"},"p50":{"type":"number","title":"P50"},"p90":{"type":"number","title":"P90"},"unit":{"type":"string","const":"kg_ha","title":"Unit","default":"kg_ha"},"confidence":{"type":"number","title":"Confidence"},"source":{"type":"string","title":"Source"}},"type":"object","required":["p10","p50","p90","confidence","source"],"title":"PredictionResponse"},"ReportSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"farm_id":{"type":"string","format":"uuid","title":"Farm Id"},"aoi_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"},"report_type":{"type":"string","title":"Report Type"},"status":{"type":"string","title":"Status"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"}},"type":"object","required":["id","farm_id","report_type","status"],"title":"ReportSummary"},"ReprocessJobsRequest":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"aoi_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"},"farm_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Farm Id"},"year":{"type":"integer","maximum":2100.0,"minimum":2000.0,"title":"Year"},"week":{"type":"integer","maximum":53.0,"minimum":1.0,"title":"Week"},"job_types":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Job Types"},"force_refresh_bands":{"type":"boolean","title":"Force Refresh Bands","default":false}},"type":"object","required":["tenant_id","year","week","job_types"],"title":"ReprocessJobsRequest"},"ResetPasswordRequestDTO":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequestDTO"},"SessionTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["access_token","expires_in_seconds"],"title":"SessionTokenResponse"},"SignupRequestDTO":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"},"full_name":{"type":"string","maxLength":120,"minLength":2,"title":"Full Name"},"company_name":{"anyOf":[{"type":"string","maxLength":120,"minLength":2},{"type":"null"}],"title":"Company Name"}},"type":"object","required":["email","password","full_name"],"title":"SignupRequestDTO"},"SystemJobView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"aoi_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"},"aoi_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aoi Name"},"farm_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Farm Name"},"job_type":{"type":"string","title":"Job Type"},"job_key":{"type":"string","title":"Job Key"},"status":{"type":"string","title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Scope"},"error_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error State"},"result_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","aoi_id","job_type","job_key","status","created_at","updated_at"],"title":"SystemJobView"},"TenantCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"type":{"type":"string","enum":["COMPANY","PERSONAL"],"title":"Type"}},"type":"object","required":["name","type"],"title":"TenantCreate"},"TenantPatch":{"properties":{"status":{"type":"string","enum":["ACTIVE","SUSPENDED"],"title":"Status"}},"type":"object","required":["status"],"title":"TenantPatch"},"TenantSettingsPatch":{"properties":{"min_valid_pixel_ratio":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Min Valid Pixel Ratio"},"alert_thresholds":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Alert Thresholds"}},"type":"object","title":"TenantSettingsPatch"},"TenantSettingsView":{"properties":{"tier":{"type":"string","title":"Tier"},"min_valid_pixel_ratio":{"type":"number","title":"Min Valid Pixel Ratio"},"alert_thresholds":{"additionalProperties":true,"type":"object","title":"Alert Thresholds"}},"type":"object","required":["tier","min_valid_pixel_ratio","alert_thresholds"],"title":"TenantSettingsView"},"TenantView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","type","status","created_at"],"title":"TenantView"},"ThreadCreate":{"properties":{"aoi_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"},"signal_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Signal Id"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"openai, anthropic, or gemini"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","title":"ThreadCreate","description":"Request body for creating a new AI assistant thread."},"ThreadView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"aoi_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Aoi Id"},"signal_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Signal Id"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","aoi_id","signal_id","provider","model","status","created_at"],"title":"ThreadView","description":"Response shape for an AI assistant thread."},"UploadDroneImageRequest":{"properties":{"aoi_id":{"type":"string","format":"uuid","title":"Aoi Id","description":"AOI ID"},"filename":{"type":"string","title":"Filename","description":"Original filename"},"gsd_cm":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Gsd Cm","description":"GSD in centimeters"},"capture_date":{"type":"string","format":"date-time","title":"Capture Date","description":"Capture date"}},"type":"object","required":["aoi_id","filename","gsd_cm","capture_date"],"title":"UploadDroneImageRequest","description":"Request body for initiating a drone image upload."},"UploadDroneImageResponse":{"properties":{"image_id":{"type":"string","format":"uuid","title":"Image Id"},"upload_url":{"type":"string","title":"Upload Url"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["image_id","upload_url","expires_in_seconds"],"title":"UploadDroneImageResponse","description":"Response body for a drone image upload initiation."},"VisionResultCreateRequest":{"properties":{"analysis_type":{"type":"string","enum":["crop_disease","cattle_weight","swine_weight","bovine_health","swine_health","poultry_health"],"title":"Analysis Type"},"success":{"type":"boolean","title":"Success"},"offline":{"type":"boolean","title":"Offline","default":false},"processing_time_ms":{"type":"integer","maximum":600000.0,"minimum":0.0,"title":"Processing Time Ms"},"result":{"additionalProperties":true,"type":"object","title":"Result"},"error":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Error"},"captured_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Captured At"}},"type":"object","required":["analysis_type","success","processing_time_ms"],"title":"VisionResultCreateRequest"},"VisionResultCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status","default":"created"}},"type":"object","required":["id"],"title":"VisionResultCreateResponse"},"WorkspaceDTO":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"tenant_type":{"type":"string","title":"Tenant Type"},"tenant_name":{"type":"string","title":"Tenant Name"},"membership_id":{"type":"string","format":"uuid","title":"Membership Id"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"}},"type":"object","required":["tenant_id","tenant_type","tenant_name","membership_id","role","status"],"title":"WorkspaceDTO"},"WorkspaceResult":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"tenant_type":{"type":"string","title":"Tenant Type"},"tenant_name":{"type":"string","title":"Tenant Name"},"membership_id":{"type":"string","format":"uuid","title":"Membership Id"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"}},"type":"object","required":["tenant_id","tenant_type","tenant_name","membership_id","role","status"],"title":"WorkspaceResult"},"WorkspaceSwitchRequest":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"}},"type":"object","required":["tenant_id"],"title":"WorkspaceSwitchRequest"},"YearOverYearPoint":{"properties":{"week":{"type":"integer","title":"Week"},"ndvi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi"}},"type":"object","required":["week"],"title":"YearOverYearPoint","description":"A single NDVI data point in a year-over-year comparison series."},"YearOverYearResponse":{"properties":{"current_year":{"type":"integer","title":"Current Year"},"previous_year":{"type":"integer","title":"Previous Year"},"current_series":{"items":{"$ref":"#/components/schemas/YearOverYearPoint"},"type":"array","title":"Current Series"},"previous_series":{"items":{"$ref":"#/components/schemas/YearOverYearPoint"},"type":"array","title":"Previous Series"}},"type":"object","required":["current_year","previous_year","current_series","previous_series"],"title":"YearOverYearResponse","description":"Response shape for year-over-year NDVI comparison."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"},"traceId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}