{"openapi":"3.1.0","info":{"title":"Agent Action Firewall API","description":"\nSecurity layer for AI agents that intercepts agent actions, evaluates them against policies,\nmanages human approval workflows, and maintains tamper-evident audit trails.\n\n## Authentication\n\nThe API uses two authentication methods:\n\n### Agent Authentication (X-Agent-Key)\nFor agent-to-API communication, use the `X-Agent-Key` header with your agent's API key.\nThis is used for all `/v1/*` endpoints.\n\n### Admin Authentication (Bearer Token)\nFor admin console access, use Supabase JWT tokens in the `Authorization: Bearer <token>` header.\nThis is used for all `/admin/*` endpoints.\n\n## Rate Limiting\n\nAll endpoints are rate-limited. Rate limit headers are included in responses:\n- `X-RateLimit-Limit`: Maximum requests per window\n- `X-RateLimit-Remaining`: Remaining requests in current window\n- `X-RateLimit-Reset`: When the current window resets\n\n## Error Responses\n\nAll errors follow a consistent format:\n```json\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Invalid action parameters\",\n    \"details\": {\n      \"field\": \"tool\",\n      \"reason\": \"Tool name is required\"\n    },\n    \"timestamp\": \"2024-03-19T10:00:00Z\",\n    \"requestId\": \"req-123\"\n  }\n}\n```\n\n## Common Examples\n\n### Submit an Action\n```bash\ncurl -X POST https://api.agentactionfirewall.com/v1/actions \\\n  -H \"X-Agent-Key: your-agent-key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"tool\": \"slack\",\n    \"operation\": \"send_message\",\n    \"params\": {\n      \"channel\": \"#general\",\n      \"message\": \"Hello from the AI agent!\"\n    },\n    \"context\": {\n      \"userRequest\": \"Send a status update to the team\"\n    }\n  }'\n```\n\n### Get Action Status\n```bash\ncurl -X GET https://api.agentactionfirewall.com/v1/actions/{action_id} \\\n  -H \"X-Agent-Key: your-agent-key\"\n```\n\n### Approve a Pending Action\n```bash\ncurl -X POST https://api.agentactionfirewall.com/admin/approvals/{approval_id}/decision \\\n  -H \"Authorization: Bearer your-jwt-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"decision\": \"approve\",\n    \"reason\": \"Request looks safe and aligns with business objectives\"\n  }'\n```\n  ","version":"1.0.5","contact":{"name":"Agent Action Firewall Team","email":"support@agentactionfirewall.com","url":"https://agentactionfirewall.com"},"license":{"name":"Proprietary","url":"https://agentactionfirewall.com/terms"}},"components":{"securitySchemes":{"AgentKey":{"type":"apiKey","in":"header","name":"X-Agent-Key","description":"Agent API key for /v1/* endpoints"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Supabase JWT token for /admin/* endpoints"},"SupabaseJWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Supabase JWT token (alias for BearerAuth)"}},"schemas":{"ActionRequest":{"type":"object","required":["tool","operation","params"],"properties":{"tool":{"type":"string","description":"Tool or service identifier (e.g., \"slack\", \"github\", \"jira\"). Must match /^[a-z][a-z0-9_]*$/.","example":"slack","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"operation":{"type":"string","description":"Specific operation to perform (e.g., \"send_message\", \"create_issue\"). Must match /^[a-z][a-z0-9_]*$/.","example":"send_message","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"params":{"type":"object","description":"Operation-specific parameters","additionalProperties":true,"example":{"channel":"#general","message":"Hello from the AI agent!","thread_ts":"1234567890.123456"}},"context":{"type":"object","description":"Additional context for policy evaluation","additionalProperties":true,"example":{"userRequest":"Send a status update to the team","priority":"normal"}},"idempotency_key":{"type":"string","description":"Unique key to prevent duplicate action submissions","example":"agent-123-action-456","maxLength":128},"parentActionId":{"type":"string","format":"uuid","description":"ID of parent action if this is a delegated sub-action"},"delegationContext":{"type":"object","description":"Context for action delegation workflows","properties":{"orchestratorId":{"type":"string","description":"ID of the orchestrating agent"},"workflowId":{"type":"string","description":"ID of the workflow being executed"},"stepName":{"type":"string","description":"Name of the current workflow step"}}}},"additionalProperties":false},"ActionResponse":{"type":"object","required":["id","status","created_at"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique action request identifier"},"status":{"type":"string","enum":["allowed","denied","pending_approval","approved","executing","completed","failed"],"description":"Current action status"},"decision":{"type":"object","nullable":true,"description":"Policy evaluation decision","properties":{"decision":{"type":"string","enum":["allow","deny","require_approval"],"description":"Policy decision result"},"reason":{"type":"string","description":"Human-readable explanation for the decision","example":"Action matches allowed Slack messaging policy"},"risk_level":{"type":"string","enum":["low","medium","high","critical"],"description":"Assessed risk level of the action"},"policy_id":{"type":"string","format":"uuid","description":"ID of the policy rule that made the decision"},"evaluation_time_ms":{"type":"number","description":"Time taken to evaluate the policy in milliseconds","example":45}}},"approval_id":{"type":"string","format":"uuid","nullable":true,"description":"Approval workflow ID if human approval is required"},"created_at":{"type":"string","format":"date-time","description":"When the action request was created"},"execution":{"type":"object","nullable":true,"description":"Action execution details (present for executed actions)","properties":{"id":{"type":"string","format":"uuid","description":"Execution ID"},"status":{"type":"string","enum":["queued","running","succeeded","failed"],"description":"Execution status"},"attempts":{"type":"integer","description":"Number of execution attempts","minimum":0},"started_at":{"type":"string","format":"date-time","nullable":true,"description":"When execution started"},"completed_at":{"type":"string","format":"date-time","nullable":true,"description":"When execution completed"},"error":{"type":"string","nullable":true,"description":"Error message if execution failed"},"result":{"description":"Platform-specific execution result data","nullable":true}}},"is_duplicate":{"type":"boolean","nullable":true,"description":"Whether this is a duplicate request based on idempotency key"}},"additionalProperties":false},"ActionDetailResponse":{"allOf":[{"$ref":"#/components/schemas/ActionResponse"},{"type":"object","properties":{"request":{"type":"object","description":"Original action request details","properties":{"tool":{"type":"string"},"operation":{"type":"string"},"params":{"type":"object","additionalProperties":true},"agent_id":{"type":"string","format":"uuid"},"context":{"type":"object","additionalProperties":true}}},"approval":{"type":"object","nullable":true,"description":"Approval workflow details","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","approved","denied","expired"]},"approver_id":{"type":"string","format":"uuid","nullable":true},"decided_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time"}}},"delegation_count":{"type":"integer","nullable":true,"description":"Number of sub-actions delegated from this action","minimum":0}}}]},"PolicyCreateRequest":{"type":"object","required":["name","rego_policy"],"properties":{"name":{"type":"string","description":"Human-readable policy name","example":"Allow Slack Messages to Public Channels","minLength":1,"maxLength":255},"description":{"type":"string","nullable":true,"description":"Detailed description of what the policy does","example":"Allows agents to send messages to public Slack channels but requires approval for DMs","maxLength":1000},"rego_policy":{"type":"string","description":"OPA Rego policy code","example":"package aaf.policies\n\ndefault allow = false\n\nallow {\n  input.tool == \"slack\"\n  input.operation == \"send_message\"\n  startswith(input.params.channel, \"#\")\n}\n\nrequire_approval {\n  input.tool == \"slack\"\n  input.operation == \"send_message\"\n  not startswith(input.params.channel, \"#\")\n}"},"enabled":{"type":"boolean","description":"Whether the policy is active","default":true},"priority":{"type":"integer","description":"Policy evaluation priority (lower numbers = higher priority)","minimum":0,"maximum":1000,"default":100}},"additionalProperties":false},"PolicyResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique policy identifier"},"name":{"type":"string","description":"Policy name"},"description":{"type":"string","nullable":true,"description":"Policy description"},"rego_policy":{"type":"string","description":"OPA Rego policy code"},"enabled":{"type":"boolean","description":"Whether the policy is active"},"priority":{"type":"integer","description":"Policy evaluation priority"},"created_at":{"type":"string","format":"date-time","description":"When the policy was created"},"updated_at":{"type":"string","format":"date-time","description":"When the policy was last updated"},"version":{"type":"integer","description":"Policy version number for change tracking"}},"additionalProperties":false},"ApprovalDecisionRequest":{"type":"object","required":["decision"],"properties":{"decision":{"type":"string","enum":["approve","deny"],"description":"Approval decision"},"reason":{"type":"string","description":"Optional reason for the decision","example":"Request looks safe and aligns with business objectives","maxLength":500}},"additionalProperties":false},"ApprovalResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Approval workflow identifier"},"action_id":{"type":"string","format":"uuid","description":"Associated action request ID"},"status":{"type":"string","enum":["pending","approved","denied","expired"],"description":"Current approval status"},"required_approvals":{"type":"integer","description":"Number of approvals required","minimum":1},"current_approvals":{"type":"integer","description":"Number of approvals received so far","minimum":0},"approvers":{"type":"array","description":"List of users who can approve this request","items":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"role":{"type":"string"}}}},"decisions":{"type":"array","description":"Approval decisions made so far","items":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"decision":{"type":"string","enum":["approve","deny"]},"reason":{"type":"string","nullable":true},"decided_at":{"type":"string","format":"date-time"}}}},"expires_at":{"type":"string","format":"date-time","description":"When the approval request expires"},"created_at":{"type":"string","format":"date-time","description":"When the approval was created"}},"additionalProperties":false},"AuditEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event identifier"},"event_type":{"type":"string","description":"Type of audit event","example":"action_submitted"},"actor":{"type":"object","description":"Who performed the action","properties":{"type":{"type":"string","enum":["agent","user","system"],"description":"Type of actor"},"id":{"type":"string","description":"Actor identifier"},"name":{"type":"string","description":"Actor name or description"}}},"payload":{"type":"object","description":"Event-specific data","additionalProperties":true},"hash":{"type":"string","description":"Cryptographic hash for tamper-evidence"},"prev_hash":{"type":"string","nullable":true,"description":"Previous event hash in chain"},"created_at":{"type":"string","format":"date-time","description":"When the event occurred"}},"additionalProperties":false},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","description":"Error code identifier","example":"VALIDATION_ERROR"},"message":{"type":"string","description":"Human-readable error description","example":"Invalid action parameters"},"details":{"type":"object","description":"Additional error context","additionalProperties":true},"timestamp":{"type":"string","format":"date-time","description":"When the error occurred"},"requestId":{"type":"string","description":"Request ID for tracing"}}}},"additionalProperties":false},"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Error type/code","example":"Bad Request"},"message":{"type":"string","description":"Human-readable error description","example":"Invalid action payload"},"details":{"type":"object","description":"Additional error context","additionalProperties":true}}},"Pagination":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of items","example":100},"page":{"type":"integer","description":"Current page number","example":1},"pageSize":{"type":"integer","description":"Items per page","example":20},"totalPages":{"type":"integer","description":"Total number of pages","example":5}}},"Action":{"type":"object","required":["tool","operation","params"],"properties":{"tool":{"type":"string","description":"Tool or service being invoked. Must match /^[a-z][a-z0-9_]*$/.","example":"slack","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"operation":{"type":"string","description":"Specific operation to perform. Must match /^[a-z][a-z0-9_]*$/.","example":"send_message","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"params":{"type":"object","description":"Operation-specific parameters","additionalProperties":true,"example":{"channel":"#general","message":"Hello, world!"}},"context":{"type":"object","description":"Additional context for policy evaluation","additionalProperties":true},"idempotency_key":{"type":"string","description":"Unique key to prevent duplicate submissions","example":"action-123-456","maxLength":128}}},"ActionDecision":{"type":"object","properties":{"decision":{"type":"string","enum":["allow","deny","require_approval"],"description":"Policy evaluation result","example":"allow"},"actionId":{"type":"string","format":"uuid","description":"Unique action identifier"},"reason":{"type":"string","description":"Explanation for the decision","example":"Action matches allowed policy rules"},"riskLevel":{"type":"string","enum":["low","medium","high","critical"],"description":"Assessed risk level","example":"low"},"approvalId":{"type":"string","format":"uuid","description":"Approval ID if decision is require_approval"}}},"Policy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","example":"Allow Slack Messages"},"description":{"type":"string","example":"Allows sending messages to Slack channels"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/PolicyRule"}},"enabled":{"type":"boolean","default":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"PolicyRule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer","minimum":0,"description":"Lower numbers = higher priority"},"decision":{"type":"string","enum":["allow","deny","require_approval"]},"conditions":{"type":"object","properties":{"tool":{"type":"string"},"operation":{"type":"string"},"conditionGroups":{"type":"array","items":{"type":"object"}}}},"enabled":{"type":"boolean","default":true}}},"Approval":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actionId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","approved","denied","expired"]},"requiredApprovals":{"type":"integer","minimum":1},"currentApprovals":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"AuditEventDetailed":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"eventType":{"type":"string","description":"Type of audit event","example":"action.submitted"},"entityType":{"type":"string","description":"Type of entity involved","example":"action"},"entityId":{"type":"string","description":"ID of the entity"},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["agent","user","system"]},"id":{"type":"string"},"name":{"type":"string"}}},"metadata":{"type":"object","additionalProperties":true},"hash":{"type":"string","description":"Cryptographic hash for tamper-evidence"},"prevHash":{"type":"string","description":"Previous event hash in chain"},"createdAt":{"type":"string","format":"date-time"}}}}},"paths":{"/ready":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/slo-status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/live":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/ready":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/metrics":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/version":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/platform-stats":{"get":{"responses":{"200":{"description":"Default Response"}}},"options":{"responses":{"200":{"description":"Default Response"}}}},"/health/db-stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/circuit-breakers":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/redis":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/health/memory":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/skill.md":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/SKILL.md":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/skill.json":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/csp-report":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"204":{"description":"Default Response"}}}},"/v1/connections/platforms":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/connections":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/oauth/initiate":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/oauth/callback":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}/refresh":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/bluesky":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}/bluesky":{"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/moltbook":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/moltbook/register":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}/moltbook/status":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}/moltbook/batch":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}/usage":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}/moltbook":{"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}/health":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/connections/{connectionId}/test":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connectionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/executions":{"get":{"tags":["executions"],"description":"List action executions in the queue with status and details","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/executions/{id}":{"get":{"tags":["executions"],"description":"Get detailed execution information including action context","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/executions/process":{"post":{"tags":["executions"],"description":"Manually trigger processing of a specific queued execution","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/executions/process-all":{"post":{"tags":["executions"],"description":"Manually trigger processing of all queued executions","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/executions/retry":{"post":{"tags":["executions"],"description":"Manually retry a failed execution, optionally resetting attempt counter","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/executions/stats":{"get":{"tags":["executions"],"description":"Get queue performance statistics and health metrics","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/agents":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"name":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":128},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":1024}},"type":"optional"}},"catchall":{"def":{"type":"never"},"type":"never"}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"any"},"type":"any"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"any"},"type":"any"}}}}}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/agents/{id}":{"get":{"tags":["Agents"],"description":"Get agent detail","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"put":{"tags":["Agents"],"description":"Update agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Agents"],"description":"Get agent detail","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/agents/{id}/actions":{"get":{"tags":["Agents"],"description":"Get agent actions","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/agents/{id}/activity":{"get":{"tags":["Agents"],"description":"Get agent activity timeline","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/agents/{id}/rotate-key":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/settings/allowlist":{"get":{"tags":["Settings"],"description":"Get allowlist settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"put":{"tags":["Settings"],"description":"Update allowlist settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/settings/notifications":{"get":{"tags":["Settings"],"description":"Get notification settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}},"put":{"tags":["Settings"],"description":"Update notification settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}}},"/admin/settings/jira":{"get":{"tags":["Settings"],"description":"Get Jira integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update Jira integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/jira/test":{"post":{"tags":["Settings"],"description":"Test Jira connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/servicenow":{"get":{"tags":["Settings"],"description":"Get ServiceNow integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update ServiceNow integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/servicenow/test":{"post":{"tags":["Settings"],"description":"Test ServiceNow connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/slack":{"get":{"tags":["Settings"],"description":"Get Slack integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update Slack integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/discord":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/teams":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/github-actions":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}}},"/admin/settings/linear":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/gitlab":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/kubernetes":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/azuredevops":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/zendesk":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/datadog":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/notion":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/aws":{"get":{"tags":["Settings"],"description":"Get integration settings","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update integration settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/nlp":{"get":{"tags":["Settings"],"description":"Get NLP configuration","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"put":{"tags":["Settings"],"description":"Update NLP configuration","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/settings/nlp/test":{"post":{"tags":["Settings"],"description":"Test NLP API key","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/settings/safety-engine":{"get":{"tags":["Settings"],"description":"Get safety engine configuration","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Settings"],"description":"Update safety engine configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/settings/safety-engine/test":{"post":{"tags":["Settings"],"description":"Test safety engine configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/settings/org":{"get":{"tags":["Settings"],"description":"Get organization configuration","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update organization configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/audit-verbosity":{"get":{"tags":["Settings"],"description":"Get audit verbosity level","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update audit verbosity level","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/settings/audit-field-visibility":{"get":{"tags":["Settings"],"description":"Get audit field visibility configuration","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}},"put":{"tags":["Settings"],"description":"Update audit field visibility configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}}}}}}},"/admin/dashboard/stats":{"get":{"tags":["Dashboard"],"description":"Get dashboard statistics","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dashboard/recent-actions":{"get":{"tags":["Dashboard"],"description":"Get recent actions","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dashboard/activity":{"get":{"tags":["Dashboard"],"description":"Get activity timeline","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dashboard/agents":{"get":{"tags":["Dashboard"],"description":"Get agents summary","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dashboard/rate-limits":{"get":{"tags":["Dashboard"],"description":"Get rate limit status and metrics","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/cache/stats":{"get":{"tags":["Dashboard"],"description":"Get analytics cache statistics","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/cache/invalidate":{"post":{"tags":["Dashboard"],"description":"Manually invalidate analytics cache","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/security/stats":{"get":{"tags":["Security"],"description":"Get security monitoring statistics","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/security/events":{"get":{"tags":["Security"],"description":"Get recent security events","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/security/events/summary":{"get":{"tags":["Security"],"description":"Get security events summary by type","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/security/active-lockouts":{"get":{"tags":["Security"],"description":"Get currently locked out IPs and users","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/security/health":{"get":{"tags":["Security"],"description":"Security infrastructure health check","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/signing-keys/public":{"get":{"tags":["Signing Keys"],"description":"List active public signing keys (agent auth). Used by SDKs for response signature verification.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"keyId":{"type":"string"},"publicKey":{"type":"string"},"algorithm":{"type":"string"},"status":{"type":"string","enum":["active","rotating"]},"createdAt":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/admin/policies":{"get":{"tags":["Policies"],"description":"List all policies for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"rego_source":{"type":"string","description":"Rego policy source code"},"is_active":{"type":"boolean"},"version":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"post":{"tags":["Policies"],"description":"Create a new policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"policy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"rego_source":{"type":"string","description":"Rego policy source code"},"is_active":{"type":"boolean"},"version":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}":{"get":{"tags":["Policies"],"description":"Get policy details including rules","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"policy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"rego_source":{"type":"string","description":"Rego policy source code"},"is_active":{"type":"boolean"},"version":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","minimum":0},"action_type":{"type":"string","enum":["allow","deny","require_approval"]},"conditions":{"type":"object","properties":{"tool":{"type":"string","description":"Tool name to match"},"operation":{"type":"string","description":"Operation name to match"},"conditionGroups":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","matches","gt","gte","lt","lte"]},"value":{}}}}}}}}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"put":{"tags":["Policies"],"description":"Update a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"policy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"rego_source":{"type":"string","description":"Rego policy source code"},"is_active":{"type":"boolean"},"version":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"delete":{"tags":["Policies"],"description":"Delete a policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/activate":{"post":{"tags":["Policies"],"description":"Activate a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"policy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"rego_source":{"type":"string","description":"Rego policy source code"},"is_active":{"type":"boolean"},"version":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/deactivate":{"post":{"tags":["Policies"],"description":"Deactivate a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"policy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"rego_source":{"type":"string","description":"Rego policy source code"},"is_active":{"type":"boolean"},"version":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/clone":{"post":{"tags":["Policies"],"description":"Clone a policy with all its rules","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"policy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"rego_source":{"type":"string","description":"Rego policy source code"},"is_active":{"type":"boolean"},"version":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","minimum":0},"action_type":{"type":"string","enum":["allow","deny","require_approval"]},"conditions":{"type":"object","properties":{"tool":{"type":"string","description":"Tool name to match"},"operation":{"type":"string","description":"Operation name to match"},"conditionGroups":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","matches","gt","gte","lt","lte"]},"value":{}}}}}}}}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/rules":{"get":{"tags":["Policies"],"description":"List rules for a policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","minimum":0},"action_type":{"type":"string","enum":["allow","deny","require_approval"]},"conditions":{"type":"object","properties":{"tool":{"type":"string","description":"Tool name to match"},"operation":{"type":"string","description":"Operation name to match"},"conditionGroups":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","matches","gt","gte","lt","lte"]},"value":{}}}}}}}}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"post":{"tags":["Policies"],"description":"Create a new rule for a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"rule":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","minimum":0},"action_type":{"type":"string","enum":["allow","deny","require_approval"]},"conditions":{"type":"object","properties":{"tool":{"type":"string","description":"Tool name to match"},"operation":{"type":"string","description":"Operation name to match"},"conditionGroups":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","matches","gt","gte","lt","lte"]},"value":{}}}}}}}}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/rules/reorder":{"put":{"tags":["Policies"],"description":"Reorder rules within a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","minimum":0},"action_type":{"type":"string","enum":["allow","deny","require_approval"]},"conditions":{"type":"object","properties":{"tool":{"type":"string","description":"Tool name to match"},"operation":{"type":"string","description":"Operation name to match"},"conditionGroups":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","matches","gt","gte","lt","lte"]},"value":{}}}}}}}}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/rules/{ruleId}":{"put":{"tags":["Policies"],"description":"Update a rule","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"ruleId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"rule":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","minimum":0},"action_type":{"type":"string","enum":["allow","deny","require_approval"]},"conditions":{"type":"object","properties":{"tool":{"type":"string","description":"Tool name to match"},"operation":{"type":"string","description":"Operation name to match"},"conditionGroups":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","matches","gt","gte","lt","lte"]},"value":{}}}}}}}}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"delete":{"tags":["Policies"],"description":"Delete a rule","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"ruleId","required":true}],"responses":{"204":{"description":"No content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/versions":{"get":{"tags":["Policies"],"description":"List published versions of a policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"versions":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"policy_id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"version":{"type":"integer"},"rego_source":{"type":"string"},"rules_snapshot":{"type":"array","items":{"type":"object","additionalProperties":true}},"created_by":{"type":"string","format":"uuid","nullable":true},"change_summary":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/publish":{"post":{"tags":["Policies"],"description":"Publish a new version of a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"policy_id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"version":{"type":"integer"},"rego_source":{"type":"string"},"rules_snapshot":{"type":"array","items":{"type":"object","additionalProperties":true}},"created_by":{"type":"string","format":"uuid","nullable":true},"change_summary":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/rollback/{version}":{"post":{"tags":["Policies"],"description":"Rollback a policy to a previous version","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"version":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"policy_id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"version":{"type":"integer"},"rego_source":{"type":"string"},"rules_snapshot":{"type":"array","items":{"type":"object","additionalProperties":true}},"created_by":{"type":"string","format":"uuid","nullable":true},"change_summary":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/test-cases":{"get":{"tags":["Policies"],"description":"List test cases for a policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"testCases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"policy_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"test_input":{"type":"object","additionalProperties":true},"expected_decision":{"type":"string","enum":["allow","deny","require_approval"]},"expected_risk_level":{"type":"string","enum":["low","medium","high","critical"]},"expected_reason_contains":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"post":{"tags":["Policies"],"description":"Create a new test case for a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"testCase":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"policy_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"test_input":{"type":"object","additionalProperties":true},"expected_decision":{"type":"string","enum":["allow","deny","require_approval"]},"expected_risk_level":{"type":"string","enum":["low","medium","high","critical"]},"expected_reason_contains":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/test-cases/{testCaseId}":{"delete":{"tags":["Policies"],"description":"Delete a test case","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"testCaseId","required":true}],"responses":{"204":{"description":"No content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/simulate":{"post":{"tags":["Policies"],"description":"Run a simulation against policy rules","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"decision":{"type":"string","enum":["allow","deny","require_approval"]},"reason":{"type":"string"},"riskLevel":{"type":"string","enum":["low","medium","high","critical"]},"matchedRules":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"ruleName":{"type":"string"},"priority":{"type":"integer"},"action":{"type":"string"},"matchedConditions":{"type":"array","items":{"type":"string"}}}}},"simulatedAt":{"type":"string","format":"date-time"},"populatedContext":{"type":"object","additionalProperties":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/policies/{id}/test":{"post":{"tags":["Policies"],"description":"Run all test cases against policy rules","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"passed":{"type":"integer"},"failed":{"type":"integer"},"total":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"testCase":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"policy_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"test_input":{"type":"object","additionalProperties":true},"expected_decision":{"type":"string","enum":["allow","deny","require_approval"]},"expected_risk_level":{"type":"string","enum":["low","medium","high","critical"]},"expected_reason_contains":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"passed":{"type":"boolean"},"actual":{"type":"object","additionalProperties":true},"error":{"type":"string"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/signing-keys":{"get":{"tags":["Signing Keys"],"description":"List active and rotating public keys for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"keyId":{"type":"string"},"publicKey":{"type":"string"},"algorithm":{"type":"string"},"status":{"type":"string","enum":["active","rotating"]},"createdAt":{"type":"string","format":"date-time"},"rotatedAt":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"post":{"tags":["Signing Keys"],"description":"Create a new signing key for the organization. Requires SIGNING_KEY_ENCRYPTION_KEY env var.","responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"},"publicKey":{"type":"string"},"algorithm":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/signing-keys/{keyId}":{"get":{"tags":["Signing Keys"],"description":"Get a specific public key by key ID","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"keyId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"},"publicKey":{"type":"string"},"algorithm":{"type":"string"},"status":{"type":"string","enum":["active","rotating"]},"createdAt":{"type":"string","format":"date-time"},"rotatedAt":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/signing-keys/rotate":{"post":{"tags":["Signing Keys"],"description":"Rotate the active signing key. Current key becomes \"rotating\", new key becomes \"active\".","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"newKey":{"type":"object","properties":{"keyId":{"type":"string"},"publicKey":{"type":"string"},"algorithm":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"rotatedKey":{"type":"object","properties":{"keyId":{"type":"string"},"status":{"type":"string"},"rotatedAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/agent/key-status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/agent/key-rotation-history":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/budgets/summary":{"get":{"tags":["Budgets"],"description":"Get budget summary for organization","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/budgets/configs":{"get":{"tags":["Budgets"],"description":"Get all budget configurations","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Budgets"],"description":"Create a new budget configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/budgets/configs/{id}":{"get":{"tags":["Budgets"],"description":"Get a specific budget configuration","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"put":{"tags":["Budgets"],"description":"Update a budget configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Budgets"],"description":"Delete a budget configuration","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/budgets/usage":{"get":{"tags":["Budgets"],"description":"Get budget usage history","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/budgets/alerts":{"get":{"tags":["Budgets"],"description":"Get budget alerts","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/budgets/alerts/{id}/acknowledge":{"post":{"tags":["Budgets"],"description":"Acknowledge a budget alert","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dry-run":{"post":{"tags":["Dry Run"],"description":"Execute a dry-run simulation","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dry-run/history":{"get":{"tags":["Dry Run"],"description":"Get dry-run history","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dry-run/batch":{"post":{"tags":["Dry Run"],"description":"Execute multiple dry-runs","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dry-run/replay":{"post":{"tags":["Dry Run"],"description":"Replay historical actions against a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dry-run/batch-large":{"post":{"tags":["Dry Run"],"description":"Execute up to 500 dry-runs sequentially","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/dry-run/compare-policies":{"post":{"tags":["Dry Run"],"description":"Compare actions across multiple policies","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mfa/recovery-codes/generate":{"post":{"tags":["MFA"],"description":"Generate a new set of MFA recovery codes (requires AAL2)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mfa/recovery-codes/status":{"get":{"tags":["MFA"],"description":"Get remaining MFA recovery code count (requires AAL2)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mfa/recovery-codes":{"delete":{"tags":["MFA"],"description":"Delete all MFA recovery codes for the authenticated user (called on unenroll)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mfa/recovery-codes/verify":{"post":{"tags":["MFA"],"description":"Verify a recovery code to remove TOTP factor (AAL1 accepted)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/teams":{"get":{"tags":["Teams"],"description":"List all teams","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Teams"],"description":"Create a new team","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/teams/{id}":{"get":{"tags":["Teams"],"description":"Get team details","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"tags":["Teams"],"description":"Update a team","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Teams"],"description":"Delete a team","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/teams/{id}/members":{"get":{"tags":["Teams"],"description":"Get team members","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Teams"],"description":"Add a member to a team","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/teams/{id}/members/{userId}":{"delete":{"tags":["Teams"],"description":"Remove a member from a team","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"userId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/teams/{id}/members/{userId}/role":{"patch":{"tags":["Teams"],"description":"Update a member role in a team","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"userId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/users/me/teams":{"get":{"tags":["Teams"],"description":"Get current user teams","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/agents":{"get":{"tags":["Agent Registry"],"description":"List all agents in the organization","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"page":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"defaultValue":1},"type":"default"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":0,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"defaultValue":50},"type":"default"},"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"online":"online","offline":"offline","unknown":"unknown"}},"type":"enum","enum":{"online":"online","offline":"offline","unknown":"unknown"},"options":["online","offline","unknown"]}},"type":"optional"},"healthStatus":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"healthy":"healthy","degraded":"degraded","unhealthy":"unhealthy","unknown":"unknown"}},"type":"enum","enum":{"healthy":"healthy","degraded":"degraded","unhealthy":"unhealthy","unknown":"unknown"},"options":["healthy","degraded","unhealthy","unknown"]}},"type":"optional"},"isActive":{"def":{"type":"optional","innerType":{"def":{"type":"boolean","coerce":true},"type":"boolean"}},"type":"optional"},"search":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}},"type":"optional"},"tags":{"def":{"type":"pipe","in":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"},"out":{"def":{"type":"transform"},"type":"transform"}}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"apiKeyPrefix":{"type":"string"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object"},"tags":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"healthStatus":{"type":"string"}}}},"total":{"type":"integer"},"page":{"type":"integer"},"limit":{"type":"integer"}}}}}}}}},"/v1/agents/stats":{"get":{"tags":["Agent Registry"],"description":"Get aggregated agent statistics for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"totalAgents":{"type":"integer"},"activeAgents":{"type":"integer"},"onlineAgents":{"type":"integer"},"healthyAgents":{"type":"integer"},"totalActionsLast24h":{"type":"integer"}}}}}}}}},"/v1/agents/{id}":{"get":{"tags":["Agent Registry"],"description":"Get detailed information about a specific agent","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"apiKeyPrefix":{"type":"string"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object"},"tags":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"healthStatus":{"type":"string"},"totalActions":{"type":"integer"},"actionsLast24h":{"type":"integer"},"approvalRate":{"type":["number","null"]},"averageLatencyMs":{"type":["number","null"]}}}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"tags":["Agent Registry"],"description":"Update agent metadata and settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"name":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255}},"type":"optional"},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":1000}},"type":"optional"},"metadata":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"},"tags":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":50},"checks":[{}]},"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":50}}},"type":"optional"},"isActive":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"apiKeyPrefix":{"type":"string"},"isActive":{"type":"boolean"},"lastSeenAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object"},"tags":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"healthStatus":{"type":"string"}}}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/agents/{id}/heartbeat":{"post":{"tags":["Agent Registry"],"description":"Record an agent heartbeat for health monitoring","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"status":{"def":{"type":"enum","entries":{"healthy":"healthy","degraded":"degraded","unhealthy":"unhealthy","unknown":"unknown"}},"type":"enum","enum":{"healthy":"healthy","degraded":"degraded","unhealthy":"unhealthy","unknown":"unknown"},"options":["healthy","degraded","unhealthy","unknown"]},"metrics":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"cpuUsage":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","minValue":0,"maxValue":100,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"memoryUsage":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","minValue":0,"maxValue":100,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"activeConnections":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"errorRate":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","minValue":0,"maxValue":100,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"latencyMs":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{}]},"type":"number","minValue":0,"maxValue":null,"isInt":false,"isFinite":true,"format":null}},"type":"optional"}}},"type":"object"}},"type":"optional"},"version":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":50}},"type":"optional"},"environment":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":50}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"204":{"description":"Heartbeat recorded successfully"},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/agents/{id}/heartbeats":{"get":{"tags":["Agent Registry"],"description":"Get heartbeat history for an agent","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":1000,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":100},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"},{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"heartbeats":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string"},"timestamp":{"type":"string"},"status":{"type":"string"},"metrics":{"type":"object"},"version":{"type":"string"},"environment":{"type":"string"}}}}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/agents/{id}/deactivate":{"post":{"tags":["Agent Registry"],"description":"Deactivate an agent (soft delete)","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"204":{"description":"Agent deactivated successfully"},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/agents/{id}/reactivate":{"post":{"tags":["Agent Registry"],"description":"Reactivate a previously deactivated agent","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"204":{"description":"Agent reactivated successfully"},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/retention/policies":{"get":{"tags":["Data Retention"],"description":"List all retention policies for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"dataType":{"type":"string"},"retentionDays":{"type":["integer","null"]},"archiveBeforeDelete":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}},"defaults":{"type":"object","additionalProperties":{"type":["integer","null"]}}}}}}}}},"post":{"tags":["Data Retention"],"description":"Create or update a retention policy for a specific data type","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"dataType":{"def":{"type":"enum","entries":{"action_requests":"action_requests","audit_events":"audit_events","executions":"executions","approvals":"approvals","agent_heartbeats":"agent_heartbeats"}},"type":"enum","enum":{"action_requests":"action_requests","audit_events":"audit_events","executions":"executions","approvals":"approvals","agent_heartbeats":"agent_heartbeats"},"options":["action_requests","audit_events","executions","approvals","agent_heartbeats"]},"retentionDays":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":3650,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"nullable"},"archiveBeforeDelete":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"defaultValue":false},"type":"default"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"dataType":{"type":"string"},"retentionDays":{"type":["integer","null"]},"archiveBeforeDelete":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}}}}},"/v1/retention/policies/{id}":{"get":{"tags":["Data Retention"],"description":"Get a specific retention policy","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"dataType":{"type":"string"},"retentionDays":{"type":["integer","null"]},"archiveBeforeDelete":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"tags":["Data Retention"],"description":"Update a retention policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"retentionDays":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":3650,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"nullable"}},"type":"optional"},"archiveBeforeDelete":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"isActive":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"dataType":{"type":"string"},"retentionDays":{"type":["integer","null"]},"archiveBeforeDelete":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"tags":["Data Retention"],"description":"Delete a retention policy (data will use default retention)","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"204":{"description":"Policy deleted successfully"},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/retention/preview":{"get":{"tags":["Data Retention"],"description":"Preview what data would be affected by retention enforcement","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"array","items":{"type":"object","properties":{"dataType":{"type":"string"},"recordCount":{"type":"integer"},"oldestRecord":{"type":["string","null"]}}}}}}}}}}}},"/v1/retention/history":{"get":{"tags":["Data Retention"],"description":"Get retention job execution history","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":1000,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":100},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":["string","null"]},"dataType":{"type":"string"},"recordsDeleted":{"type":"integer"},"recordsArchived":{"type":"integer"},"startedAt":{"type":"string"},"completedAt":{"type":["string","null"]},"status":{"type":"string"},"errorMessage":{"type":["string","null"]}}}}}}}}}}}},"/v1/retention/enforce":{"post":{"tags":["Data Retention"],"description":"Manually trigger retention enforcement for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"totalOrgsProcessed":{"type":"integer"},"totalRecordsArchived":{"type":"integer"},"totalRecordsDeleted":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"string"},"dataType":{"type":"string"},"recordsArchived":{"type":"integer"},"recordsDeleted":{"type":"integer"},"duration":{"type":"integer"}}}},"errors":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"string"},"dataType":{"type":"string"},"error":{"type":"string"}}}}}}}}}}}}}},"/v1/policies/groups":{"get":{"tags":["Policy Inheritance"],"description":"List all policy groups for the organization","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"includeGlobal":{"def":{"type":"default","innerType":{"def":{"type":"boolean","coerce":true},"type":"boolean"},"defaultValue":true},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"isGlobal":{"type":"boolean"},"priority":{"type":"integer"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}}}}},"post":{"tags":["Policy Inheritance"],"description":"Create a new policy group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"name":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":2000}},"type":"optional"},"isGlobal":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"defaultValue":false},"type":"default"},"priority":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":10000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"defaultValue":100},"type":"default"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"isGlobal":{"type":"boolean"},"priority":{"type":"integer"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}}}}},"/v1/policies/groups/{id}":{"get":{"tags":["Policy Inheritance"],"description":"Get a specific policy group","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"isGlobal":{"type":"boolean"},"priority":{"type":"integer"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"policies":{"type":"array","items":{"type":"object","properties":{"policy":{"type":"object"},"position":{"type":"integer"}}}}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"patch":{"tags":["Policy Inheritance"],"description":"Update a policy group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"name":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255}},"type":"optional"},"description":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":2000}},"type":"nullable"}},"type":"optional"},"priority":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":10000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"isActive":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"tags":["Policy Inheritance"],"description":"Delete a policy group","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"204":{"description":"Group deleted successfully"},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/policies/groups/{id}/policies":{"post":{"tags":["Policy Inheritance"],"description":"Add a policy to a group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"policyId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"position":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"membership":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"},"groupId":{"type":"string"},"position":{"type":"integer"},"createdAt":{"type":"string"}}}}}}}}}}},"/v1/policies/groups/{groupId}/policies/{policyId}":{"delete":{"tags":["Policy Inheritance"],"description":"Remove a policy from a group","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"groupId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"policyId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"204":{"description":"Policy removed from group"},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/policies/{id}/parent":{"patch":{"tags":["Policy Inheritance"],"description":"Set or remove the parent policy for inheritance","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"parentId":{"def":{"type":"nullable","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"nullable"},"inheritanceMode":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"merge":"merge","override":"override","extend":"extend"}},"type":"enum","enum":{"merge":"merge","override":"override","extend":"extend"},"options":["merge","override","extend"]}},"type":"optional"},"defaultValue":"merge"},"type":"default"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/policies/{id}/inheritance":{"get":{"tags":["Policy Inheritance"],"description":"Get the inheritance chain for a policy","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":["string","null"]},"inheritanceMode":{"type":"string"},"priority":{"type":"integer"}}}}}}}}}}}},"/v1/policies/{id}/resolve":{"get":{"tags":["Policy Inheritance"],"description":"Resolve effective rules considering inheritance","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"resolution":{"type":"object","properties":{"effectiveRules":{"type":"array","items":{"type":"object"}},"inheritedRules":{"type":"array","items":{"type":"object"}},"overriddenRules":{"type":"array","items":{"type":"object"}},"conflicts":{"type":"array","items":{"type":"object","properties":{"ruleName":{"type":"string"},"parentRule":{"type":["object","null"]},"childRule":{"type":["object","null"]},"resolution":{"type":"string"}}}}}}}}}}}}}},"/v1/policies/effective":{"get":{"tags":["Policy Inheritance"],"description":"Get all effective policies for the organization including inherited and global","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyName":{"type":"string"},"sourceType":{"type":"string","enum":["org","global","inherited"]},"priority":{"type":"integer"},"isMandatory":{"type":"boolean"}}}}}}}}}}}},"/v1/policies/global-assignments":{"get":{"tags":["Policy Inheritance"],"description":"List global policy assignments for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"},"orgId":{"type":["string","null"]},"isMandatory":{"type":"boolean"},"priority":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}}}}},"post":{"tags":["Policy Inheritance"],"description":"Create a global policy assignment (platform admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"policyId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"orgId":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"nullable"}},"type":"optional"},"isMandatory":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"defaultValue":false},"type":"default"},"priority":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":10000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"defaultValue":100},"type":"default"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assignment":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"},"orgId":{"type":["string","null"]},"isMandatory":{"type":"boolean"},"priority":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}}}}},"/v1/policies/global-assignments/{id}":{"patch":{"tags":["Policy Inheritance"],"description":"Update a global policy assignment","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"isMandatory":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"priority":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":10000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assignment":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"tags":["Policy Inheritance"],"description":"Remove a global policy assignment","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"204":{"description":"Assignment removed"},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/reports":{"get":{"tags":["Compliance"],"description":"List compliance reports for the organization","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"framework":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"soc2":"soc2","gdpr":"gdpr","hipaa":"hipaa","iso27001":"iso27001","pci_dss":"pci_dss","custom":"custom"}},"type":"enum","enum":{"soc2":"soc2","gdpr":"gdpr","hipaa":"hipaa","iso27001":"iso27001","pci_dss":"pci_dss","custom":"custom"},"options":["soc2","gdpr","hipaa","iso27001","pci_dss","custom"]}},"type":"optional"},"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"draft":"draft","generating":"generating","completed":"completed","failed":"failed","archived":"archived"}},"type":"enum","enum":{"draft":"draft","generating":"generating","completed":"completed","failed":"failed","archived":"archived"},"options":["draft","generating","completed","failed","archived"]}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":20},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"reports":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}}}}}}},"post":{"tags":["Compliance"],"description":"Create a new compliance report","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"framework":{"def":{"type":"enum","entries":{"soc2":"soc2","gdpr":"gdpr","hipaa":"hipaa","iso27001":"iso27001","pci_dss":"pci_dss","custom":"custom"}},"type":"enum","enum":{"soc2":"soc2","gdpr":"gdpr","hipaa":"hipaa","iso27001":"iso27001","pci_dss":"pci_dss","custom":"custom"},"options":["soc2","gdpr","hipaa","iso27001","pci_dss","custom"]},"reportType":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"title":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":2000}},"type":"optional"},"periodStart":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null},"periodEnd":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","additionalProperties":true}}}}}}}}},"/v1/compliance/reports/{id}":{"get":{"tags":["Compliance"],"description":"Get a specific compliance report by ID","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"tags":["Compliance"],"description":"Delete a compliance report","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/reports/{id}/generate":{"post":{"tags":["Compliance"],"description":"Generate/run compliance checks for a report","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","additionalProperties":true},"findings":{"type":"array","items":{"type":"object","additionalProperties":true}},"summary":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/reports/{id}/findings":{"get":{"tags":["Compliance"],"description":"List compliance findings for a report","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"severity":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"critical":"critical","high":"high","medium":"medium","low":"low","info":"info"}},"type":"enum","enum":{"critical":"critical","high":"high","medium":"medium","low":"low","info":"info"},"options":["critical","high","medium","low","info"]}},"type":"optional"},"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"open":"open","in_progress":"in_progress","remediated":"remediated","accepted":"accepted","false_positive":"false_positive"}},"type":"enum","enum":{"open":"open","in_progress":"in_progress","remediated":"remediated","accepted":"accepted","false_positive":"false_positive"},"options":["open","in_progress","remediated","accepted","false_positive"]}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"},{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"findings":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/compliance/findings/{id}":{"patch":{"tags":["Compliance"],"description":"Update a compliance finding","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"open":"open","in_progress":"in_progress","remediated":"remediated","accepted":"accepted","false_positive":"false_positive"}},"type":"enum","enum":{"open":"open","in_progress":"in_progress","remediated":"remediated","accepted":"accepted","false_positive":"false_positive"},"options":["open","in_progress","remediated","accepted","false_positive"]}},"type":"optional"},"remediationNotes":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"},"remediationDeadline":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/controls":{"get":{"tags":["Compliance"],"description":"Get compliance control mappings for a framework","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"framework":{"def":{"type":"enum","entries":{"soc2":"soc2","gdpr":"gdpr","hipaa":"hipaa","iso27001":"iso27001","pci_dss":"pci_dss","custom":"custom"}},"type":"enum","enum":{"soc2":"soc2","gdpr":"gdpr","hipaa":"hipaa","iso27001":"iso27001","pci_dss":"pci_dss","custom":"custom"},"options":["soc2","gdpr","hipaa","iso27001","pci_dss","custom"]}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"controls":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/compliance/schedules":{"get":{"tags":["Compliance"],"description":"List scheduled compliance reports","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}},"post":{"tags":["Compliance"],"description":"Create a scheduled compliance report","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"framework":{"def":{"type":"enum","entries":{"soc2":"soc2","gdpr":"gdpr","hipaa":"hipaa","iso27001":"iso27001","pci_dss":"pci_dss","custom":"custom"}},"type":"enum","enum":{"soc2":"soc2","gdpr":"gdpr","hipaa":"hipaa","iso27001":"iso27001","pci_dss":"pci_dss","custom":"custom"},"options":["soc2","gdpr","hipaa","iso27001","pci_dss","custom"]},"reportType":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"name":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":2000}},"type":"optional"},"scheduleCron":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":9,"maxLength":100},"notificationEmails":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"email","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"email","minLength":null,"maxLength":null}]},"type":"string","format":"email","minLength":null,"maxLength":null},"checks":[{}]},"type":"array","element":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"email","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"email","minLength":null,"maxLength":null}]},"type":"string","format":"email","minLength":null,"maxLength":null}}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","additionalProperties":true}}}}}}}}},"/v1/compliance/schedules/{id}":{"delete":{"tags":["Compliance"],"description":"Delete a scheduled compliance report","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/dsr":{"get":{"tags":["Compliance"],"description":"List GDPR data subject requests","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"pending":"pending","in_progress":"in_progress","completed":"completed","rejected":"rejected","expired":"expired"}},"type":"enum","enum":{"pending":"pending","in_progress":"in_progress","completed":"completed","rejected":"rejected","expired":"expired"},"options":["pending","in_progress","completed","rejected","expired"]}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":20},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}}}}}}},"post":{"tags":["Compliance"],"description":"Create a GDPR data subject request","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"requestType":{"def":{"type":"enum","entries":{"access":"access","rectification":"rectification","erasure":"erasure","portability":"portability","objection":"objection","restriction":"restriction"}},"type":"enum","enum":{"access":"access","rectification":"rectification","erasure":"erasure","portability":"portability","objection":"objection","restriction":"restriction"},"options":["access","rectification","erasure","portability","objection","restriction"]},"subjectEmail":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"email","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"email","minLength":null,"maxLength":null}]},"type":"string","format":"email","minLength":null,"maxLength":null},"subjectName":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}},"type":"optional"},"requestDetails":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"object","additionalProperties":true}}}}}}}}},"/v1/compliance/dsr/{id}":{"patch":{"tags":["Compliance"],"description":"Update a GDPR data subject request","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"pending":"pending","in_progress":"in_progress","completed":"completed","rejected":"rejected","expired":"expired"}},"type":"enum","enum":{"pending":"pending","in_progress":"in_progress","completed":"completed","rejected":"rejected","expired":"expired"},"options":["pending","in_progress","completed","rejected","expired"]}},"type":"optional"},"verificationMethod":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":50}},"type":"optional"},"responseDetails":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"},"extensionReason":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":2000}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/incidents":{"get":{"tags":["Compliance"],"description":"List security incidents","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"open":"open","investigating":"investigating","contained":"contained","eradicated":"eradicated","recovered":"recovered","closed":"closed"}},"type":"enum","enum":{"open":"open","investigating":"investigating","contained":"contained","eradicated":"eradicated","recovered":"recovered","closed":"closed"},"options":["open","investigating","contained","eradicated","recovered","closed"]}},"type":"optional"},"severity":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"critical":"critical","high":"high","medium":"medium","low":"low","info":"info"}},"type":"enum","enum":{"critical":"critical","high":"high","medium":"medium","low":"low","info":"info"},"options":["critical","high","medium","low","info"]}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":20},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"incidents":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}}}}}}},"post":{"tags":["Compliance"],"description":"Create a security incident","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"incidentType":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"severity":{"def":{"type":"enum","entries":{"critical":"critical","high":"high","medium":"medium","low":"low","info":"info"}},"type":"enum","enum":{"critical":"critical","high":"high","medium":"medium","low":"low","info":"info"},"options":["critical","high","medium","low","info"]},"title":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255},"description":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":10000},"detectedAt":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null},"detectedBy":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}},"type":"optional"},"affectedSystems":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255},"checks":[{}]},"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}}},"type":"optional"},"affectedUsers":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"affectedRecords":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","additionalProperties":true}}}}}}}}},"/v1/compliance/incidents/{id}":{"patch":{"tags":["Compliance"],"description":"Update a security incident","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"open":"open","investigating":"investigating","contained":"contained","eradicated":"eradicated","recovered":"recovered","closed":"closed"}},"type":"enum","enum":{"open":"open","investigating":"investigating","contained":"contained","eradicated":"eradicated","recovered":"recovered","closed":"closed"},"options":["open","investigating","contained","eradicated","recovered","closed"]}},"type":"optional"},"rootCause":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"},"containmentActions":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"},"eradicationActions":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"},"recoveryActions":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"},"lessonsLearned":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"},"reportedToAuthorities":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"authorityReportDate":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}},"type":"optional"},"externalReference":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/controls/{framework}":{"get":{"tags":["Compliance"],"description":"Get AAF compliance control definitions for a framework (soc2, hipaa, iso27001)","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"framework":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"framework":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"controls":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/evidence":{"post":{"tags":["Compliance"],"description":"Trigger async compliance evidence collection for a framework and time window","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"framework":{"def":{"type":"enum","entries":{"soc2":"soc2","hipaa":"hipaa","iso27001":"iso27001"}},"type":"enum","enum":{"soc2":"soc2","hipaa":"hipaa","iso27001":"iso27001"},"options":["soc2","hipaa","iso27001"]},"periodStart":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null},"periodEnd":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}}},"type":"object"}}}},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"reportId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"tags":["Compliance"],"description":"List compliance evidence reports for the organization","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"framework":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"soc2":"soc2","hipaa":"hipaa","iso27001":"iso27001"}},"type":"enum","enum":{"soc2":"soc2","hipaa":"hipaa","iso27001":"iso27001"},"options":["soc2","hipaa","iso27001"]}},"type":"optional"},"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"pending":"pending","running":"running","completed":"completed","failed":"failed"}},"type":"enum","enum":{"pending":"pending","running":"running","completed":"completed","failed":"failed"},"options":["pending","running","completed","failed"]}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":20},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"reports":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}}}}}}}},"/v1/compliance/evidence/{id}":{"get":{"tags":["Compliance"],"description":"Get a compliance evidence report by ID","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/compliance/evidence/{id}/download":{"get":{"tags":["Compliance"],"description":"Download a compliance evidence report in json, csv, or text format","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"format":{"def":{"type":"default","innerType":{"def":{"type":"enum","entries":{"json":"json","csv":"csv","text":"text"}},"type":"enum","enum":{"json":"json","csv":"csv","text":"text"},"options":["json","csv","text"]},"defaultValue":"json"},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"},{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance/posture":{"get":{"tags":["Compliance"],"description":"Aggregated compliance posture: latest score, control pass/fail, trend per framework","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string"},"overallScore":{"type":["number","null"]},"frameworks":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/compliance/evidence/bulk-export":{"post":{"tags":["Compliance"],"description":"Download multiple compliance evidence reports as a JSON bundle","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"reportIds":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":1,"maxLength":null},"checks":[{},{}]},"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":1,"maxLength":null}},"format":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"json":"json","csv":"csv"}},"type":"enum","enum":{"json":"json","csv":"csv"},"options":["json","csv"]}},"type":"optional"},"defaultValue":"json"},"type":"default"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/messaging/channels":{"get":{"tags":["Agent Messaging"],"description":"List agent communication channels","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"channelType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"topic":"topic","queue":"queue","broadcast":"broadcast","direct":"direct"}},"type":"enum","enum":{"topic":"topic","queue":"queue","broadcast":"broadcast","direct":"direct"},"options":["topic","queue","broadcast","direct"]}},"type":"optional"},"isActive":{"def":{"type":"optional","innerType":{"def":{"type":"boolean","coerce":true},"type":"boolean"}},"type":"optional"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}},"post":{"tags":["Agent Messaging"],"description":"Create a new communication channel","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"name":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":1000}},"type":"optional"},"channelType":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"topic":"topic","queue":"queue","broadcast":"broadcast","direct":"direct"}},"type":"enum","enum":{"topic":"topic","queue":"queue","broadcast":"broadcast","direct":"direct"},"options":["topic","queue","broadcast","direct"]}},"type":"optional"},"defaultValue":"topic"},"type":"default"},"isPersistent":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"defaultValue":true},"type":"default"},"maxMessageAgeHours":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":8760,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"metadata":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"object","additionalProperties":true}}}}}}}}},"/v1/messaging/channels/{id}":{"get":{"tags":["Agent Messaging"],"description":"Get a specific channel","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"tags":["Agent Messaging"],"description":"Delete a channel","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/messaging/subscriptions":{"get":{"tags":["Agent Messaging"],"description":"List channel subscriptions","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"channelId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"},"agentId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptions":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}},"post":{"tags":["Agent Messaging"],"description":"Subscribe an agent to a channel","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"channelId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"agentId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"subscriptionType":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"publisher":"publisher","subscriber":"subscriber","both":"both"}},"type":"enum","enum":{"publisher":"publisher","subscriber":"subscriber","both":"both"},"options":["publisher","subscriber","both"]}},"type":"optional"},"defaultValue":"subscriber"},"type":"default"},"filterPattern":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","additionalProperties":true}}}}}}}},"delete":{"tags":["Agent Messaging"],"description":"Unsubscribe an agent from a channel","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"channelId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"agentId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/v1/messaging/messages":{"post":{"tags":["Agent Messaging"],"description":"Send a message to a channel or agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"channelId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"},"recipientAgentId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"},"messageType":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"subject":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}},"type":"optional"},"content":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"priority":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"low":"low","normal":"normal","high":"high","urgent":"urgent"}},"type":"enum","enum":{"low":"low","normal":"normal","high":"high","urgent":"urgent"},"options":["low","normal","high","urgent"]}},"type":"optional"},"defaultValue":"normal"},"type":"default"},"correlationId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"},"replyToMessageId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"},"expiresInMinutes":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":43200,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"metadata":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","additionalProperties":true}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"get":{"tags":["Agent Messaging"],"description":"Get messages for the authenticated agent","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"channelId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"},"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"pending":"pending","delivered":"delivered","read":"read","failed":"failed","expired":"expired"}},"type":"enum","enum":{"pending":"pending","delivered":"delivered","read":"read","failed":"failed","expired":"expired"},"options":["pending","delivered","read","failed","expired"]}},"type":"optional"},"messageType":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}}}}}}}},"/admin/messaging/messages":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/messaging/messages/{id}/ack":{"post":{"tags":["Agent Messaging"],"description":"Acknowledge a message","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"ackType":{"def":{"type":"enum","entries":{"received":"received","processed":"processed","rejected":"rejected","requeued":"requeued"}},"type":"enum","enum":{"received":"received","processed":"processed","rejected":"rejected","requeued":"requeued"},"options":["received","processed","rejected","requeued"]},"processingTimeMs":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"responseData":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"},"errorMessage":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":5000}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ack":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/messaging/capabilities":{"post":{"tags":["Agent Messaging"],"description":"Register an agent capability","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"capabilityType":{"def":{"type":"enum","entries":{"tool":"tool","service":"service","skill":"skill","data_source":"data_source"}},"type":"enum","enum":{"tool":"tool","service":"service","skill":"skill","data_source":"data_source"},"options":["tool","service","skill","data_source"]},"capabilityName":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":2000}},"type":"optional"},"inputSchema":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"},"outputSchema":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"},"version":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":50}},"type":"optional"},"rateLimit":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":10000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"metadata":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"capability":{"type":"object","additionalProperties":true}}}}}}}},"get":{"tags":["Agent Messaging"],"description":"List agent capabilities","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"agentId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"},"capabilityType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"tool":"tool","service":"service","skill":"skill","data_source":"data_source"}},"type":"enum","enum":{"tool":"tool","service":"service","skill":"skill","data_source":"data_source"},"options":["tool","service","skill","data_source"]}},"type":"optional"},"isAvailable":{"def":{"type":"optional","innerType":{"def":{"type":"boolean","coerce":true},"type":"boolean"}},"type":"optional"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"capabilities":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/messaging/capabilities/find":{"get":{"tags":["Agent Messaging"],"description":"Find agents that have a specific capability","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"capabilityType":{"def":{"type":"enum","entries":{"tool":"tool","service":"service","skill":"skill","data_source":"data_source"}},"type":"enum","enum":{"tool":"tool","service":"service","skill":"skill","data_source":"data_source"},"options":["tool","service","skill","data_source"]},"capabilityName":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string"},"capability":{"type":"object","additionalProperties":true}}}}}}}}}}}},"/v1/messaging/routing":{"get":{"tags":["Agent Messaging"],"description":"List message routing rules","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}},"post":{"tags":["Agent Messaging"],"description":"Create a message routing rule","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"name":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":2000}},"type":"optional"},"sourcePattern":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"destinationType":{"def":{"type":"enum","entries":{"agent":"agent","channel":"channel","capability":"capability","round_robin":"round_robin","broadcast":"broadcast"}},"type":"enum","enum":{"agent":"agent","channel":"channel","capability":"capability","round_robin":"round_robin","broadcast":"broadcast"},"options":["agent","channel","capability","round_robin","broadcast"]},"destinationValue":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}},"type":"optional"},"destinationAgents":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"checks":[{}]},"type":"array","element":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"type":"optional"},"priority":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":10000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"defaultValue":100},"type":"default"},"transformRules":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"rule":{"type":"object","additionalProperties":true}}}}}}}}},"/v1/messaging/routing/{id}":{"delete":{"tags":["Agent Messaging"],"description":"Delete a routing rule","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/a2a/groups":{"get":{"tags":["Agent Groups"],"description":"List agent groups for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}},"post":{"tags":["Agent Groups"],"description":"Create a new agent group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"name":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":1000}},"type":"optional"},"policyId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"object","additionalProperties":true}}}}}}}}},"/v1/a2a/groups/{id}":{"get":{"tags":["Agent Groups"],"description":"Get agent group details with member list","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"object","additionalProperties":true},"members":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"put":{"tags":["Agent Groups"],"description":"Update an agent group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"name":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100}},"type":"optional"},"description":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":1000}},"type":"optional"},"policyId":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"nullable"}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"delete":{"tags":["Agent Groups"],"description":"Delete an agent group","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/a2a/groups/{id}/members":{"post":{"tags":["Agent Groups"],"description":"Add an agent to a group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"agentId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"role":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"owner":"owner","coordinator":"coordinator","member":"member"}},"type":"enum","enum":{"owner":"owner","coordinator":"coordinator","member":"member"},"options":["owner","coordinator","member"]}},"type":"optional"},"defaultValue":"member"},"type":"default"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/a2a/groups/{id}/members/{agentId}":{"delete":{"tags":["Agent Groups"],"description":"Remove an agent from a group","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"agentId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/discovery/register":{"post":{"tags":["Agent Discovery"],"description":"Register agent for discovery","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"version":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":50}},"type":"optional"},"sdkVersion":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":50}},"type":"optional"},"runtimeInfo":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"},"heartbeatIntervalMs":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":5000,"maxValue":300000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"ttlSeconds":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":30,"maxValue":3600,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"metadata":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"record":{"type":"object","additionalProperties":true}}}}}}}}},"/v1/discovery/heartbeat":{"post":{"tags":["Agent Discovery"],"description":"Send heartbeat to keep agent online","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"loadScore":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","minValue":0,"maxValue":100,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"responseTimeAvgMs":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"errorRatePercent":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","minValue":0,"maxValue":100,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"capabilitiesHash":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":64}},"type":"optional"},"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"online":"online","offline":"offline","degraded":"degraded","maintenance":"maintenance"}},"type":"enum","enum":{"online":"online","offline":"offline","degraded":"degraded","maintenance":"maintenance"},"options":["online","offline","degraded","maintenance"]}},"type":"optional"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"record":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/discovery/unregister":{"post":{"tags":["Agent Discovery"],"description":"Unregister agent from discovery (mark offline)","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/v1/discovery/status":{"get":{"tags":["Agent Discovery"],"description":"Get discovery status for authenticated agent","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"record":{"type":"object","additionalProperties":true}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/discovery/endpoints":{"post":{"tags":["Agent Discovery"],"description":"Add a service endpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"endpointType":{"def":{"type":"enum","entries":{"http":"http","https":"https","grpc":"grpc","websocket":"websocket","amqp":"amqp"}},"type":"enum","enum":{"http":"http","https":"https","grpc":"grpc","websocket":"websocket","amqp":"amqp"},"options":["http","https","grpc","websocket","amqp"]},"url":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"url","check":"string_format","abort":false},"type":"string","format":"url","minLength":null,"maxLength":null},{}]},"type":"string","format":"url","minLength":null,"maxLength":2000},"isPrimary":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"healthCheckPath":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}},"type":"optional"},"timeoutMs":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":100,"maxValue":60000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"retryCount":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":0,"maxValue":10,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"metadata":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"object","additionalProperties":true}}}}}}}},"get":{"tags":["Agent Discovery"],"description":"List service endpoints for authenticated agent","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/discovery/endpoints/{id}":{"delete":{"tags":["Agent Discovery"],"description":"Remove a service endpoint","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/v1/discovery/tags":{"post":{"tags":["Agent Discovery"],"description":"Set service tags for agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"tags":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"namespace":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":100}},"type":"optional"},"key":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"value":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}}},"type":"object"},"checks":[{}]},"type":"array","element":{"def":{"type":"object","shape":{"namespace":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":100}},"type":"optional"},"key":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"value":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":null,"maxLength":255}}},"type":"object"}}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}},"get":{"tags":["Agent Discovery"],"description":"Get service tags for authenticated agent","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"namespace":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}},"delete":{"tags":["Agent Discovery"],"description":"Remove a service tag","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"namespace":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"key":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/v1/discovery/find/capability":{"post":{"tags":["Agent Discovery"],"description":"Discover agents by capability","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"capabilityType":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"capabilityName":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255},"requireHealthy":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"limit":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/discovery/find/tags":{"post":{"tags":["Agent Discovery"],"description":"Discover agents by service tags","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"tags":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"requireHealthy":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"limit":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/discovery/agents":{"get":{"tags":["Agent Discovery"],"description":"List agent discovery records","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"online":"online","offline":"offline","degraded":"degraded","maintenance":"maintenance"}},"type":"enum","enum":{"online":"online","offline":"offline","degraded":"degraded","maintenance":"maintenance"},"options":["online","offline","degraded","maintenance"]}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}}}}}}}},"/v1/discovery/summary":{"get":{"tags":["Agent Discovery"],"description":"Get discovery summary for organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"totalAgents":{"type":"integer"},"onlineAgents":{"type":"integer"},"offlineAgents":{"type":"integer"},"degradedAgents":{"type":"integer"},"totalCapabilities":{"type":"integer"},"totalEndpoints":{"type":"integer"},"healthyEndpoints":{"type":"integer"}}}}}}}}}}},"/v1/discovery/agents/{id}/endpoints":{"get":{"tags":["Agent Discovery"],"description":"List endpoints for a specific agent","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/discovery/agents/{id}/tags":{"get":{"tags":["Agent Discovery"],"description":"List tags for a specific agent","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"namespace":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"},{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/v1/discovery/maintenance":{"post":{"tags":["Agent Discovery"],"description":"Run discovery maintenance (mark stale agents offline)","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"markedOffline":{"type":"integer"}}}}}}}}},"/v1/settings/shadow-mode":{"get":{"responses":{"200":{"description":"Default Response"}}},"put":{"responses":{"200":{"description":"Default Response"}}}},"/v1/shadow-mode/report":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/shadow-mode/insights":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/shadow-mode/reports":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/cross-org/groups":{"post":{"tags":["Cross-Org Policies"],"description":"Create a new organization group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"get":{"tags":["Cross-Org Policies"],"description":"List organization groups","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/groups/{groupId}":{"get":{"tags":["Cross-Org Policies"],"description":"Get an organization group by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"tags":["Cross-Org Policies"],"description":"Update an organization group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Cross-Org Policies"],"description":"Delete an organization group","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/groups/{groupId}/members":{"post":{"tags":["Cross-Org Policies"],"description":"Add an organization to a group","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"get":{"tags":["Cross-Org Policies"],"description":"List organizations in a group","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/groups/{groupId}/members/{orgId}":{"delete":{"tags":["Cross-Org Policies"],"description":"Remove an organization from a group","parameters":[{"schema":{"type":"string"},"in":"path","name":"groupId","required":true},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/orgs/{orgId}/tags":{"post":{"tags":["Cross-Org Policies"],"description":"Set tags for an organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"get":{"tags":["Cross-Org Policies"],"description":"Get tags for an organization","parameters":[{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/orgs/{orgId}/tags/{tagKey}":{"delete":{"tags":["Cross-Org Policies"],"description":"Delete a tag from an organization","parameters":[{"schema":{"type":"string"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string"},"in":"path","name":"tagKey","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies":{"post":{"tags":["Cross-Org Policies"],"description":"Create a new global policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"get":{"tags":["Cross-Org Policies"],"description":"List global policies","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}":{"get":{"tags":["Cross-Org Policies"],"description":"Get a global policy by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"tags":["Cross-Org Policies"],"description":"Update a global policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Cross-Org Policies"],"description":"Delete a global policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}/approve":{"post":{"tags":["Cross-Org Policies"],"description":"Approve a global policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/orgs/{orgId}/applicable-policies":{"get":{"tags":["Cross-Org Policies"],"description":"Get policies applicable to an organization","parameters":[{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}/overrides":{"post":{"tags":["Cross-Org Policies"],"description":"Create a policy override for an organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"get":{"tags":["Cross-Org Policies"],"description":"List overrides for a global policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}/overrides/{overrideId}":{"get":{"tags":["Cross-Org Policies"],"description":"Get a specific policy override","parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true},{"schema":{"type":"string"},"in":"path","name":"overrideId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"tags":["Cross-Org Policies"],"description":"Update a policy override","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true},{"schema":{"type":"string"},"in":"path","name":"overrideId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Cross-Org Policies"],"description":"Delete a policy override","parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true},{"schema":{"type":"string"},"in":"path","name":"overrideId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}/overrides/{overrideId}/approve":{"post":{"tags":["Cross-Org Policies"],"description":"Approve a policy override","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true},{"schema":{"type":"string"},"in":"path","name":"overrideId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}/compliance/{orgId}/evaluate":{"post":{"tags":["Cross-Org Policies"],"description":"Evaluate compliance for an organization against a policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}/compliance/{orgId}":{"get":{"tags":["Cross-Org Policies"],"description":"Get compliance status for an organization against a policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}/compliance/summary":{"get":{"tags":["Cross-Org Policies"],"description":"Get compliance summary for a global policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/policies/{policyId}/compliance":{"get":{"tags":["Cross-Org Policies"],"description":"List compliance records for a global policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/cross-org/audit-log":{"get":{"tags":["Cross-Org Policies"],"description":"Get audit log for global cross-org policy changes","responses":{"200":{"description":"Default Response"}}}},"/v1/reports/preview":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/anomalies/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/anomalies/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/anomalies/config/repetitive":{"get":{"responses":{"200":{"description":"Default Response"}}},"put":{"responses":{"200":{"description":"Default Response"}}}},"/v1/anomalies/config":{"get":{"responses":{"200":{"description":"Default Response"}}},"put":{"responses":{"200":{"description":"Default Response"}}}},"/v1/anomalies/{id}/review":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/anomalies/baseline":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/anomalies/baseline/{agentId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"agentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/dlp/patterns":{"get":{"tags":["DLP"],"description":"List DLP patterns for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["DLP"],"description":"Create a new DLP pattern","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/dlp/patterns/{id}":{"get":{"tags":["DLP"],"description":"Get a specific DLP pattern by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"tags":["DLP"],"description":"Update a DLP pattern","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["DLP"],"description":"Delete a DLP pattern","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/dlp/scan":{"post":{"tags":["DLP"],"description":"Scan content for DLP pattern matches and PII","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/dlp/history":{"get":{"tags":["DLP"],"description":"Get DLP scan history","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/dlp/stats":{"get":{"tags":["DLP"],"description":"Get DLP scan statistics","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/dlp/pii-types":{"get":{"tags":["DLP"],"description":"Get list of supported built-in PII detection types","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/dlp/performance":{"get":{"tags":["DLP"],"description":"Get DLP scan performance metrics (P50/P95/P99 latencies)","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/usage":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/usage/history":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/analytics/volume":{"get":{"tags":["Analytics"],"description":"Get action volume over time","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/analytics/approval-rates":{"get":{"tags":["Analytics"],"description":"Get approval rate trends over time","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/analytics/policy-hits":{"get":{"tags":["Analytics"],"description":"Get policy hit rate statistics","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/analytics/risk-distribution":{"get":{"tags":["Analytics"],"description":"Get risk level distribution across actions","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/analytics/top-blocked":{"get":{"tags":["Analytics"],"description":"Get top blocked actions by frequency","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/analytics/agents":{"get":{"tags":["Analytics"],"description":"Get per-agent comparison metrics","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/analytics/export":{"get":{"tags":["Analytics"],"description":"Export analytics data in CSV or JSON format","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/exposure/summary":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/analytics/moltbook/overview":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/analytics/moltbook/operations":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/analytics/moltbook/timeline":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/webhooks/deliveries":{"get":{"tags":["Webhooks"],"description":"List webhook deliveries","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/webhooks/deliveries/{id}":{"get":{"tags":["Webhooks"],"description":"Get webhook delivery details","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/webhooks/deliveries/{id}/retry":{"post":{"tags":["Webhooks"],"description":"Retry a webhook delivery","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/webhooks/stats":{"get":{"tags":["Webhooks"],"description":"Get webhook statistics","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/webhooks/endpoints":{"get":{"tags":["Webhooks"],"description":"List webhook endpoints","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Webhooks"],"description":"Create a webhook endpoint","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/webhooks/endpoints/{id}":{"patch":{"tags":["Webhooks"],"description":"Update a webhook endpoint","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Webhooks"],"description":"Delete a webhook endpoint","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/webhooks/endpoints/{id}/test":{"post":{"tags":["Webhooks"],"description":"Test a webhook endpoint","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/webhooks/moltbook/events":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/webhooks/moltbook/events/{id}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/agents/{agentId}/service-grants":{"get":{"parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"includeExpired":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"},{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"agentId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"servicePattern":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":255},"allowedOperations":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":1,"maxLength":null}},"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string","format":null,"minLength":1,"maxLength":null}}},"type":"optional"},"isDeny":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"defaultValue":false},"type":"default"},"expiresAt":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}},"type":"optional"}}},"type":"object"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"agentId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/agents/{agentId}/service-grants/{grantId}":{"delete":{"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"agentId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"grantId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/orgs/reachability-mode":{"get":{"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"mode":{"def":{"type":"enum","entries":{"open":"open","strict":"strict"}},"type":"enum","enum":{"open":"open","strict":"strict"},"options":["open","strict"]}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance-packs":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance-packs/active":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance-packs/generations/{genId}/download":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"genId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance-packs/{id}/subscribe":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance-packs/{id}/cancel":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance-packs/{id}/generate":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance-packs/{id}/generations":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/compliance-packs/{id}/posture":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/guardrails/inspect":{"post":{"tags":["Guardrails"],"description":"Inspect content for prompt injection and other threats (admin)","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"content":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100000},"categories":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"enum","entries":{"prompt_injection":"prompt_injection","jailbreak":"jailbreak","toxic_content":"toxic_content","system_prompt_leak":"system_prompt_leak"}},"type":"enum","enum":{"prompt_injection":"prompt_injection","jailbreak":"jailbreak","toxic_content":"toxic_content","system_prompt_leak":"system_prompt_leak"},"options":["prompt_injection","jailbreak","toxic_content","system_prompt_leak"]}},"type":"array","element":{"def":{"type":"enum","entries":{"prompt_injection":"prompt_injection","jailbreak":"jailbreak","toxic_content":"toxic_content","system_prompt_leak":"system_prompt_leak"}},"type":"enum","enum":{"prompt_injection":"prompt_injection","jailbreak":"jailbreak","toxic_content":"toxic_content","system_prompt_leak":"system_prompt_leak"},"options":["prompt_injection","jailbreak","toxic_content","system_prompt_leak"]}}},"type":"optional"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"safe":{"type":"boolean"},"confidence":{"type":"number"},"threats":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"confidence":{"type":"number"},"method":{"type":"string"},"evidence":{"type":"string"},"severity":{"type":"string"}}}},"latency_ms":{"type":"number"}}}}}}}}},"/admin/discovery/sessions":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/discovery/sessions/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/discovery/samples":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/discovery/samples/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/discovery/learn":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/discovery/detect-pii":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/tools":{"get":{"tags":["Tools"],"description":"List tool registry entries","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Tools"],"description":"Create a new tool registry entry","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/tools/stats":{"get":{"tags":["Tools"],"description":"Get tool registry statistics","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/tools/categories":{"get":{"tags":["Tools"],"description":"Get tool categories in use","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/tools/{id}":{"get":{"tags":["Tools"],"description":"Get a tool registry entry by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"tags":["Tools"],"description":"Update a tool registry entry","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Tools"],"description":"Delete a tool from the registry","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/tools/{id}/verify":{"post":{"tags":["Tools"],"description":"Mark a tool as verified","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/tools/{id}/operations":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/tools/{id}/operations/{operationName}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"operationName","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/tools/{id}/mappings":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/tools/{id}/mappings/{mappingId}":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"mappingId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"mappingId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/tools/import":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/admin/tools/{id}/export":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/workflows":{"get":{"tags":["Workflows"],"description":"List visual policy workflows for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Workflows"],"description":"Create a new visual policy workflow","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/workflows/{id}":{"get":{"tags":["Workflows"],"description":"Get a workflow by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"tags":["Workflows"],"description":"Update a workflow","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Workflows"],"description":"Delete a workflow","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/workflows/{id}/validate":{"post":{"tags":["Workflows"],"description":"Validate a workflow structure","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/workflows/{id}/generate-rego":{"post":{"tags":["Workflows"],"description":"Generate Rego policy code from a visual workflow","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/workflows/{id}/activate":{"post":{"tags":["Workflows"],"description":"Activate a workflow to start processing actions","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/workflows/{id}/pause":{"post":{"tags":["Workflows"],"description":"Pause an active workflow","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/workflows/{id}/duplicate":{"post":{"tags":["Workflows"],"description":"Duplicate a workflow with a new name","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/workflows/{id}/executions":{"get":{"tags":["Workflows"],"description":"Get execution history for a workflow","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/nlp-policies/health":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/evaluation-log":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/{id}/evaluations":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/{id}/evaluations/{evalId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"evalId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/{id}/test":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/{id}/stats":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/templates":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/from-template/{templateId}":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"templateId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/generate":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-policies/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-evaluations/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/nlp-evaluations/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/policy-coverage":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/policy-coverage/guidance":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/policies/generate":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/policies/explain":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/approval-templates":{"get":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/approval-templates/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/approval-templates/{id}/stats":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/delegations":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/delegations/{id}":{"delete":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/approvals/{id}/escalate":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/approvals/{id}/apply-template":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/approvals/pending-escalation":{"get":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/workflows/events/{resumeToken}":{"post":{"tags":["Workflows"],"description":"Submit a workflow resume event","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"resumeToken":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/permissions/ephemeral/":{"post":{"tags":["Ephemeral Permissions"],"description":"Grant a new ephemeral (JIT) permission to an agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"SupabaseJWT":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"get":{"tags":["Ephemeral Permissions"],"description":"List ephemeral permissions for the organization","security":[{"SupabaseJWT":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/permissions/ephemeral/{id}":{"delete":{"tags":["Ephemeral Permissions"],"description":"Revoke an ephemeral permission grant","security":[{"SupabaseJWT":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/tools/call":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/mcp/tools/list":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/mcp/servers":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/mcp/servers/{serverId}/governance":{"get":{"tags":["Connectors"],"description":"Get governance profile for an MCP server","parameters":[{"schema":{"type":"string"},"in":"path","name":"serverId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"put":{"tags":["Connectors"],"description":"Update governance profile for an MCP server","parameters":[{"schema":{"type":"string"},"in":"path","name":"serverId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/servers/{serverId}/tool-policies":{"get":{"tags":["Connectors"],"description":"List tool policies for an MCP server","parameters":[{"schema":{"type":"string"},"in":"path","name":"serverId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/servers/{serverId}/tool-policies/{tool}":{"put":{"tags":["Connectors"],"description":"Upsert a tool policy for an MCP server","parameters":[{"schema":{"type":"string"},"in":"path","name":"serverId","required":true},{"schema":{"type":"string"},"in":"path","name":"tool","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Connectors"],"description":"Delete a tool policy for an MCP server","parameters":[{"schema":{"type":"string"},"in":"path","name":"serverId","required":true},{"schema":{"type":"string"},"in":"path","name":"tool","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/servers/{serverId}/health-check":{"post":{"tags":["Connectors"],"description":"Trigger a health check for an MCP server","parameters":[{"schema":{"type":"string"},"in":"path","name":"serverId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/governance/baseline":{"get":{"tags":["Connectors"],"description":"Get org-level MCP governance baseline","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"put":{"tags":["Connectors"],"description":"Update org-level MCP governance baseline","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/governance/summary":{"get":{"tags":["Connectors"],"description":"Get MCP governance dashboard summary statistics","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/org-policies":{"get":{"tags":["Connectors"],"description":"List org-level MCP governance policies","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Connectors"],"description":"Create an org-level MCP governance policy","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/org-policies/{id}":{"patch":{"tags":["Connectors"],"description":"Update an org-level MCP governance policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Connectors"],"description":"Delete an org-level MCP governance policy","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/governance-templates":{"get":{"tags":["Connectors"],"description":"List MCP governance policy templates","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/check-permission":{"post":{"tags":["Connectors"],"description":"Check if an MCP tool call would be allowed","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/mcp/servers/{serverId}/governance/effective":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"serverId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/workflows/{workflowId}/schedule":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"workflowId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"workflowId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"workflowId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/actions":{"post":{"tags":["Actions"],"description":"Submit a new action request for policy evaluation","security":[{"AgentKey":[]}],"responses":{"200":{"description":"Action processed successfully","content":{"application/json":{"schema":{"description":"Action processed successfully","type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string"},"reason":{"type":"string"},"risk_level":{"type":"string"}}},"approval_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"execution":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"status":{"type":"string"},"attempts":{"type":"number"},"started_at":{"type":"string","nullable":true},"completed_at":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"result":{}}},"is_duplicate":{"type":"boolean","nullable":true}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Payment required - action limit exceeded","content":{"application/json":{"schema":{"description":"Payment required - action limit exceeded","type":"object","additionalProperties":true}}}},"403":{"description":"Action denied by policy","content":{"application/json":{"schema":{"description":"Action denied by policy","type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string"},"reason":{"type":"string"},"risk_level":{"type":"string"}}},"created_at":{"type":"string"}},"additionalProperties":true}}}}}}},"/v1/actions/{id}":{"get":{"tags":["Actions"],"description":"Get action status and details by ID","security":[{"AgentKey":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Action details","content":{"application/json":{"schema":{"description":"Action details","type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"tool":{"type":"string"},"operation":{"type":"string"},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string"},"reason":{"type":"string"},"risk_level":{"type":"string"}}},"approval":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"status":{"type":"string"},"approver_id":{"type":"string","nullable":true},"decided_at":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true}}},"execution":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"status":{"type":"string"},"attempts":{"type":"number"},"started_at":{"type":"string","nullable":true},"completed_at":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"result":{}}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/actions":{"get":{"tags":["Actions"],"description":"List actions with filtering and pagination (admin only)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"List of actions with pagination","content":{"application/json":{"schema":{"description":"List of actions with pagination","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/actions/{id}/delegation-chain":{"get":{"tags":["Actions"],"description":"Get the full delegation chain tree for an action (orchestrator to sub-agents)","security":[{"AgentKey":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Delegation chain tree","content":{"application/json":{"schema":{"description":"Delegation chain tree","type":"object","additionalProperties":true}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/approvals/expire":{"post":{"tags":["Approvals"],"description":"Manually trigger expiration of pending approvals past their expiry time","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Expired approvals count","content":{"application/json":{"schema":{"description":"Expired approvals count","type":"object","properties":{"expired_count":{"type":"integer","description":"Number of approvals expired"},"expired_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"IDs of expired approvals"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/approvals/{id}":{"get":{"tags":["Approvals"],"description":"Get a single approval by ID","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Approval details","content":{"application/json":{"schema":{"description":"Approval details","type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"action_request_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","approved","denied","expired"]},"decided_by":{"type":"string","format":"uuid"},"decider_id":{"type":"string","format":"uuid"},"decision_reason":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"decided_at":{"type":"string","format":"date-time"},"action_status":{"type":"string","description":"Current action status after decision"},"action":{"type":"object","properties":{"tool":{"type":"string"},"operation":{"type":"string"}},"description":"Action details"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"risk_level":{"type":"string","enum":["low","medium","high","critical"]},"approver_name":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/approvals":{"get":{"tags":["Approvals"],"description":"List approval requests with filtering and pagination","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"List of approvals with pagination","content":{"application/json":{"schema":{"description":"List of approvals with pagination","type":"object","properties":{"approvals":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"action_request_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","approved","denied","expired"]},"decided_by":{"type":"string","format":"uuid"},"decider_id":{"type":"string","format":"uuid"},"decision_reason":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"decided_at":{"type":"string","format":"date-time"},"action_status":{"type":"string","description":"Current action status after decision"},"action":{"type":"object","properties":{"tool":{"type":"string"},"operation":{"type":"string"}},"description":"Action details"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"risk_level":{"type":"string","enum":["low","medium","high","critical"]},"approver_name":{"type":"string"}}}},"pagination":{"type":"object","properties":{"page":{"type":"integer","description":"Current page number (1-based)"},"limit":{"type":"integer","description":"Items per page"},"total":{"type":"integer","description":"Total number of items"},"totalPages":{"type":"integer","description":"Total number of pages"},"hasNext":{"type":"boolean","description":"Whether there are more items"},"hasPrev":{"type":"boolean","description":"Whether there are previous items"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/approvals/{id}/approve":{"post":{"tags":["Approvals"],"description":"Approve a pending approval request","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Approval accepted","content":{"application/json":{"schema":{"description":"Approval accepted","type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"action_request_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","approved","denied","expired"]},"decided_by":{"type":"string","format":"uuid"},"decider_id":{"type":"string","format":"uuid"},"decision_reason":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"decided_at":{"type":"string","format":"date-time"},"action_status":{"type":"string","description":"Current action status after decision"},"action":{"type":"object","properties":{"tool":{"type":"string"},"operation":{"type":"string"}},"description":"Action details"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"risk_level":{"type":"string","enum":["low","medium","high","critical"]},"approver_name":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/approvals/{id}/deny":{"post":{"tags":["Approvals"],"description":"Deny a pending approval request","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Approval denied","content":{"application/json":{"schema":{"description":"Approval denied","type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"action_request_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","approved","denied","expired"]},"decided_by":{"type":"string","format":"uuid"},"decider_id":{"type":"string","format":"uuid"},"decision_reason":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"decided_at":{"type":"string","format":"date-time"},"action_status":{"type":"string","description":"Current action status after decision"},"action":{"type":"object","properties":{"tool":{"type":"string"},"operation":{"type":"string"}},"description":"Action details"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"risk_level":{"type":"string","enum":["low","medium","high","critical"]},"approver_name":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/actions/{id}/approve":{"post":{"tags":["Approvals"],"description":"Approve an action request directly by its ID","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Action approved","content":{"application/json":{"schema":{"description":"Action approved","type":"object","properties":{"message":{"type":"string"},"action_id":{"type":"string","format":"uuid"},"approval_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Action already processed","content":{"application/json":{"schema":{"description":"Action already processed","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/admin/actions/{id}/deny":{"post":{"tags":["Approvals"],"description":"Deny an action request directly by its ID","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Action denied","content":{"application/json":{"schema":{"description":"Action denied","type":"object","properties":{"message":{"type":"string"},"action_id":{"type":"string","format":"uuid"},"approval_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Action already processed","content":{"application/json":{"schema":{"description":"Action already processed","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/v1/approvals/bulk":{"post":{"tags":["Approvals"],"description":"Bulk approve or reject up to 50 pending approvals","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"approvalIds":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"checks":[{},{}]},"type":"array","element":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"decision":{"def":{"type":"enum","entries":{"approve":"approve","reject":"reject"}},"type":"enum","enum":{"approve":"approve","reject":"reject"},"options":["approve","reject"]},"reason":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}}},"type":"object"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"processed":{"type":"number"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}}}}}}}}}}}},"/v1/approvals/sla-metrics":{"get":{"tags":["Approvals"],"description":"Get SLA compliance metrics for approval workflows","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"days":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":0,"maxValue":90,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":7},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"compliance":{"type":"number"},"avgResponseTimeMs":{"type":"number"},"overdueCount":{"type":"number"},"totalPending":{"type":"number"},"p95ResponseTimeMs":{"type":"number"}}}}}}}}},"/admin/proof-pack/{actionId}":{"get":{"tags":["Proof Pack"],"description":"Generate and download a proof pack for an action","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"actionId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/proof-pack/{actionId}/pdf":{"get":{"tags":["Proof Pack"],"description":"Generate a signed PDF proof pack","security":[{"BearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"actionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/proof-pack/{actionId}/attest":{"post":{"tags":["Proof Pack"],"description":"Create an API attestation for an action","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"actionId":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/audit":{"get":{"tags":["Audit"],"description":"List audit events with filtering and pagination","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"action_request_id":{"type":"string","format":"uuid"},"event_type":{"type":"string","description":"Type of audit event"},"actor_id":{"type":"string"},"actor_type":{"type":"string","enum":["agent","user","system"]},"payload":{"type":"object","additionalProperties":true},"hash":{"type":"string","description":"Cryptographic hash for tamper-evidence"},"prev_hash":{"type":"string","description":"Previous event hash in chain"},"created_at":{"type":"string","format":"date-time"}}}},"pagination":{"type":"object","properties":{"page":{"type":"integer","description":"Current page number (1-based)"},"limit":{"type":"integer","description":"Items per page"},"total":{"type":"integer","description":"Total number of items"},"totalPages":{"type":"integer","description":"Total number of pages"},"hasNext":{"type":"boolean","description":"Whether there are more items"},"hasPrev":{"type":"boolean","description":"Whether there are previous items"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/audit/verify-chain":{"post":{"tags":["Audit"],"description":"Verify audit event hash chain integrity. Returns detailed verification results.","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"fromDate":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}},"type":"optional"},"toDate":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}},"type":"optional"},"limit":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":100000,"isInt":true,"isFinite":true,"format":"safeint"}},"type":"optional"},"includeAllInvalid":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"}}},"type":"object"}},"type":"optional"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"verification":{"type":"object","properties":{"orgId":{"type":"string"},"valid":{"type":"boolean"},"totalEvents":{"type":"number"},"validEvents":{"type":"number"},"invalidEvents":{"type":"number"},"durationMs":{"type":"number"},"lastEventId":{"type":"string"},"lastEventHash":{"type":"string"},"firstInvalidEvent":{"type":"object","nullable":true,"properties":{"eventId":{"type":"string"},"error":{"type":"string"}}}}},"metrics":{"type":"object","properties":{"passRate":{"type":"number"},"totalEvents":{"type":"number"},"durationMs":{"type":"number"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/audit/chain-integrity":{"get":{"tags":["Audit"],"description":"Quick chain integrity check — returns summary without full event list.","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":10000,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":100},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"totalEvents":{"type":"number"},"validEvents":{"type":"number"},"invalidEvents":{"type":"number"},"brokenAt":{"type":"string","nullable":true},"firstEvent":{"type":"string","nullable":true},"latestEvent":{"type":"string","nullable":true},"durationMs":{"type":"number"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/audit/export":{"get":{"tags":["Audit"],"description":"Export audit events in JSON or CSV format","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"format":{"def":{"type":"default","innerType":{"def":{"type":"enum","entries":{"json":"json","csv":"csv"}},"type":"enum","enum":{"json":"json","csv":"csv"},"options":["json","csv"]},"defaultValue":"json"},"type":"default"},"from_date":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":true,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}},"type":"optional"},"to_date":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":true,"local":false,"precision":null,"pattern":{}},"type":"string","format":"datetime","minLength":null,"maxLength":null}]},"type":"string","format":"datetime","minLength":null,"maxLength":null}},"type":"optional"},"event_type":{"def":{"type":"optional","innerType":{"def":{"type":"union","options":[{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"array","element":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}]},"type":"union","options":[{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"array","element":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}]}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":10000,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":1000},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Export data in requested format","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array"},"metadata":{"type":"object","properties":{"exportedAt":{"type":"string"},"totalEvents":{"type":"number"},"format":{"type":"string"},"filters":{"type":"object"},"orgId":{"type":"string"}}}}}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/audit/{eventId}/sensitive-data":{"get":{"tags":["Audit"],"description":"Decrypt and retrieve the original unsanitized audit event payload. Admin-only. Creates an audit trail entry for the access.","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"eventId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string"},"decryptedPayload":{"type":"object"},"keyVersion":{"type":"number","nullable":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/agents/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/guardrails/inspect":{"post":{"tags":["Guardrails"],"description":"Inspect content for prompt injection and other threats","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"content":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100000},"categories":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"enum","entries":{"prompt_injection":"prompt_injection","jailbreak":"jailbreak","toxic_content":"toxic_content","system_prompt_leak":"system_prompt_leak"}},"type":"enum","enum":{"prompt_injection":"prompt_injection","jailbreak":"jailbreak","toxic_content":"toxic_content","system_prompt_leak":"system_prompt_leak"},"options":["prompt_injection","jailbreak","toxic_content","system_prompt_leak"]}},"type":"array","element":{"def":{"type":"enum","entries":{"prompt_injection":"prompt_injection","jailbreak":"jailbreak","toxic_content":"toxic_content","system_prompt_leak":"system_prompt_leak"}},"type":"enum","enum":{"prompt_injection":"prompt_injection","jailbreak":"jailbreak","toxic_content":"toxic_content","system_prompt_leak":"system_prompt_leak"},"options":["prompt_injection","jailbreak","toxic_content","system_prompt_leak"]}}},"type":"optional"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"safe":{"type":"boolean"},"confidence":{"type":"number"},"threats":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"confidence":{"type":"number"},"method":{"type":"string"},"evidence":{"type":"string"},"severity":{"type":"string"}}}},"latency_ms":{"type":"number"}}}}}}}}},"/v1/agents/heartbeat":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/api/beta-codes/validate":{"post":{"tags":["Beta"],"description":"Validate a beta code","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/beta-codes/redeem":{"post":{"tags":["Beta"],"description":"Redeem a beta code (authenticated users only)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/beta/status":{"get":{"tags":["Beta"],"description":"Get beta mode status","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/beta-mode":{"get":{"tags":["Beta"],"description":"Get beta mode status (legacy)","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/beta-codes":{"get":{"tags":["Beta"],"description":"List all beta codes","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Beta"],"description":"Create a new beta code","security":[{"BearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/beta-codes/{id}":{"get":{"tags":["Beta"],"description":"Get a beta code","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Beta"],"description":"Delete a beta code","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}}},"/admin/beta-codes/{id}/stats":{"get":{"tags":["Beta"],"description":"Get beta code usage stats","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/beta-codes/{id}/deactivate":{"post":{"tags":["Beta"],"description":"Deactivate a beta code","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/beta-codes/{id}/reactivate":{"post":{"tags":["Beta"],"description":"Reactivate a beta code","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/stats":{"get":{"tags":["Platform Admin"],"description":"Get platform statistics","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/system/health":{"get":{"tags":["Platform Admin"],"description":"Get platform system health","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/orgs":{"get":{"tags":["Platform Admin"],"description":"List organizations (platform admin)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/orgs/{id}":{"get":{"tags":["Platform Admin"],"description":"Get organization (platform admin)","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/orgs/{id}/tier":{"patch":{"tags":["Platform Admin"],"description":"Update organization tier (platform admin)","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/users":{"get":{"tags":["Platform Admin"],"description":"List users (platform admin)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/users/{id}":{"get":{"tags":["Platform Admin"],"description":"Get user (platform admin)","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/users/{id}/admin":{"patch":{"tags":["Platform Admin"],"description":"Toggle platform admin status","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/beta-codes":{"get":{"tags":["Platform Admin"],"description":"List beta codes (platform admin)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Platform Admin"],"description":"Create a beta code (platform admin)","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/beta-codes/{id}":{"get":{"tags":["Platform Admin"],"description":"Get a beta code (platform admin)","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"tags":["Platform Admin"],"description":"Update a beta code (platform admin)","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/platform-admin/actions/recent":{"get":{"tags":["Platform Admin"],"description":"Get recent actions (platform admin)","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/ttfv/stats":{"get":{"tags":["Platform Admin"],"description":"Get time-to-first-value statistics","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/instant-demo":{"post":{"summary":"Create instant demo environment","tags":["Instant Demo"],"description":"Creates a temporary sandbox organization with pre-loaded demo data","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"userId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}},"type":"optional"},"userEmail":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"email","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"email","minLength":null,"maxLength":null}]},"type":"string","format":"email","minLength":null,"maxLength":null}},"type":"optional"}}},"type":"object"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"sandbox":{"type":"object","properties":{"orgId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"expiresAt":{"type":"string","format":"date-time"}},"required":["orgId","sessionId","expiresAt"]},"demoData":{"type":"object","properties":{"provisioned":{"type":"boolean"},"message":{"type":"string"}},"required":["provisioned","message"]}},"required":["success","sandbox","demoData"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}},"required":["error","message"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}},"required":["error","message"]}}}}}}},"/instant-demo/{sessionId}":{"get":{"summary":"Get sandbox session","tags":["Instant Demo"],"description":"Retrieves sandbox organization details by session ID","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"sessionId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"sandbox":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string","format":"uuid"},"userId":{"type":["string","null"]},"demoDataLoaded":{"type":"boolean"},"sessionId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","orgId","sessionId","createdAt","expiresAt"]}},"required":["success","sandbox"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}},"required":["error","message"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}},"required":["error","message"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}},"required":["error","message"]}}}}}}},"/admin/credential-migration/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/credential-migration/run":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/credential-migration/retry-failed":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/api-key-migration/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/api-key-migration/legacy-agents":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/api-key-migration/org/{orgId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/api-key-migration/migrate/{agentId}":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"agentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/api-key-migration/health":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/key-rotation/status":{"get":{"tags":["admin","security"],"description":"Get security configuration and key rotation status","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"profile":{"type":"string"}}},"summary":{"type":"object","properties":{"profile":{"type":"string"},"keysConfigured":{"type":"array","items":{"type":"string"}},"keysMissing":{"type":"array","items":{"type":"string"}},"httpsSecurity":{"type":"boolean"}}},"keys":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"configured":{"type":"boolean"},"currentVersion":{"type":"number"},"lastRotatedAt":{"type":["string","null"]},"gracePeriodActive":{"type":"boolean"},"previousVersionExpires":{"type":["string","null"]},"rotationRecommended":{"type":"boolean"},"rotationReason":{"type":["string","null"]}}}}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/key-rotation/{keyName}/history":{"get":{"tags":["admin","security"],"description":"Get rotation history for a specific encryption key","parameters":[{"schema":{"type":"string"},"in":"path","name":"keyName","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/key-rotation/{keyName}/record":{"post":{"tags":["admin","security"],"description":"Record a key rotation event after updating the environment variable","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"keyName","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/key-rotation/{keyName}/emergency-revoke":{"post":{"tags":["admin","security"],"description":"Emergency revocation - immediately terminate all grace periods for a key","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"keyName","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/key-rotation/retire-expired":{"post":{"tags":["admin","security"],"description":"Retire all keys past their grace period (maintenance task)","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/admin/siem":{"get":{"tags":["SIEM"],"description":"List all SIEM integrations","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/siem/{provider}":{"get":{"tags":["SIEM"],"description":"Get SIEM integration details","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"provider":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"put":{"tags":["SIEM"],"description":"Create or update a SIEM integration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"provider":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["SIEM"],"description":"Delete a SIEM integration","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"provider":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/siem/{provider}/test":{"post":{"tags":["SIEM"],"description":"Test SIEM integration connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"provider":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/siem/{provider}/deliveries":{"get":{"tags":["SIEM"],"description":"Get SIEM delivery history","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"provider":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/anomaly/refresh-baselines":{"post":{"tags":["Admin"],"description":"Refresh anomaly detection baselines","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/anomaly/baseline-status":{"get":{"tags":["Admin"],"description":"Get anomaly detection baseline status","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/database/partition-status":{"get":{"tags":["Admin"],"description":"Get database partition status","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/database/partition-maintenance":{"post":{"tags":["Admin"],"description":"Run database partition maintenance","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/opa-bundles/policies":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/opa-bundles/policies/hash":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/license/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/license/activate":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/license/deactivate":{"delete":{"responses":{"200":{"description":"Default Response"}}}},"/v1/vault/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/vault/rotate":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/vault/audit":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/agents/inventory/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/agents/inventory/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/agents/inventory/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/agents/inventory/{id}/risk":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/discovery/sessions":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/discovery/sessions/{id}":{"patch":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/profiles":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/agents/{id}/profile":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/agents/{id}/classify":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/profiles/{id}/fingerprints":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/profiles/{id}/assess-risk":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/summary":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/inventory/process-action":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/gdpr/preview":{"get":{"tags":["GDPR","Admin"],"description":"Preview what data would be erased for a user","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"email":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"email","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"email","minLength":null,"maxLength":null}]},"type":"string","format":"email","minLength":null,"maxLength":null}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"userFound":{"type":"boolean"},"userId":{"type":"string"},"dataToErase":{"type":"object","properties":{"userAccount":{"type":"boolean"},"approvalDecisions":{"type":"number"},"auditEvents":{"type":"number"},"otherReferences":{"type":"number"}}}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/gdpr/erase":{"post":{"tags":["GDPR","Admin"],"description":"Permanently erase all personal data for a user","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"email":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"email","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"email","minLength":null,"maxLength":null}]},"type":"string","format":"email","minLength":null,"maxLength":null},"reason":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"erasedUserId":{"type":"string"},"summary":{"type":"object","properties":{"userAccount":{"type":"boolean"},"approvalDecisions":{"type":"number"},"auditEvents":{"type":"number"},"otherReferences":{"type":"number"}}},"errors":{"type":"array","items":{"type":"string"}}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/gdpr/audit":{"get":{"tags":["GDPR","Admin","Audit"],"description":"Get audit log of GDPR erasure operations","parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"limit":{"def":{"type":"pipe","in":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":1,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":50},"type":"default"},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":1,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":50},"type":"default"},"out":{"def":{"type":"transform"},"type":"transform"}},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{}]},"type":"number","minValue":0,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"erasureEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"requestedBy":{"type":"string"},"erasedEmail":{"type":"string"},"reason":{"type":"string"},"summary":{"type":"object"}}}},"total":{"type":"number"}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/welcome-emails/send":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"userId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"uuid","minLength":null,"maxLength":null}]},"type":"string","format":"uuid","minLength":null,"maxLength":null},"userEmail":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"email","check":"string_format","abort":false,"pattern":{}},"type":"string","format":"email","minLength":null,"maxLength":null}]},"type":"string","format":"email","minLength":null,"maxLength":null},"userName":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"},"emailNumber":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","minValue":-9007199254740991,"maxValue":9007199254740991,"isInt":true,"isFinite":true,"format":"safeint"},{},{}]},"type":"number","minValue":1,"maxValue":3,"isInt":true,"isFinite":true,"format":"safeint"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/welcome-emails/health":{"get":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/welcome-emails/pending":{"get":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/sso/check-domain":{"get":{"tags":["SSO"],"description":"Check if an email domain has SSO configured","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"sso_available":{"type":"boolean","description":"Whether SSO is available for this domain"},"sso_required":{"type":"boolean","description":"Whether SSO is required (enforce_sso)"},"domain":{"type":"string","description":"The email domain checked"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/sso/domains":{"get":{"tags":["SSO"],"description":"List SSO domains for the organization","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string","description":"Email domain (e.g., example.com)"},"idp_type":{"type":"string","enum":["saml","oidc"],"default":"saml"},"metadata_url":{"type":"string","format":"uri","description":"IdP metadata URL"},"entity_id":{"type":"string","description":"SAML Entity ID"},"default_role":{"type":"string","enum":["admin","approver","viewer"]},"enforce_sso":{"type":"boolean","description":"Require SSO login for this domain"},"is_verified":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}},"total":{"type":"integer","description":"Total number of domains"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"post":{"tags":["SSO"],"description":"Create a new SSO domain configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string","description":"Email domain (e.g., example.com)"},"idp_type":{"type":"string","enum":["saml","oidc"],"default":"saml"},"metadata_url":{"type":"string","format":"uri","description":"IdP metadata URL"},"entity_id":{"type":"string","description":"SAML Entity ID"},"default_role":{"type":"string","enum":["admin","approver","viewer"]},"enforce_sso":{"type":"boolean","description":"Require SSO login for this domain"},"is_verified":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/sso/domains/{id}":{"get":{"tags":["SSO"],"description":"Get SSO domain details by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string","description":"Email domain (e.g., example.com)"},"idp_type":{"type":"string","enum":["saml","oidc"],"default":"saml"},"metadata_url":{"type":"string","format":"uri","description":"IdP metadata URL"},"entity_id":{"type":"string","description":"SAML Entity ID"},"default_role":{"type":"string","enum":["admin","approver","viewer"]},"enforce_sso":{"type":"boolean","description":"Require SSO login for this domain"},"is_verified":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"put":{"tags":["SSO"],"description":"Update SSO domain configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string","description":"Email domain (e.g., example.com)"},"idp_type":{"type":"string","enum":["saml","oidc"],"default":"saml"},"metadata_url":{"type":"string","format":"uri","description":"IdP metadata URL"},"entity_id":{"type":"string","description":"SAML Entity ID"},"default_role":{"type":"string","enum":["admin","approver","viewer"]},"enforce_sso":{"type":"boolean","description":"Require SSO login for this domain"},"is_verified":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"delete":{"tags":["SSO"],"description":"Delete an SSO domain configuration","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/sso/domains/{id}/verify":{"post":{"tags":["SSO"],"description":"Start DNS verification for an SSO domain","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"verified":{"type":"boolean"},"message":{"type":"string"},"verification_record":{"type":"string"},"verification_type":{"type":"string"},"verification_value":{"type":"string"},"instructions":{"type":"string"},"expected_record":{"type":"string"},"expected_value":{"type":"string"},"hint":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}},"get":{"tags":["SSO"],"description":"Check DNS verification status for an SSO domain","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"verified":{"type":"boolean"},"message":{"type":"string"},"verification_record":{"type":"string"},"verification_type":{"type":"string"},"verification_value":{"type":"string"},"instructions":{"type":"string"},"expected_record":{"type":"string"},"expected_value":{"type":"string"},"hint":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/sso/domains/{id}/activate":{"post":{"tags":["SSO"],"description":"Activate SSO for a verified domain","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"activated":{"type":"boolean"},"message":{"type":"string"},"domain":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/v1/sso/provision-user":{"post":{"tags":["SSO"],"description":"Provision or update a user after SSO login (internal)","requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"success":{"type":"boolean"},"user_id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"role":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"error":{"def":{"type":"optional","innerType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"optional"},"message":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/invitations":{"get":{"tags":["Invitations"],"description":"List all invitations","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"tags":["Invitations"],"description":"Create and send an invitation","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/invitations/{id}":{"get":{"tags":["Invitations"],"description":"Get invitation details","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Invitations"],"description":"Revoke an invitation","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/invitations/{id}/resend":{"post":{"tags":["Invitations"],"description":"Resend an invitation","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/invitations/validate":{"get":{"tags":["Invitations"],"description":"Validate an invitation token","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/invitations/accept":{"post":{"tags":["Invitations"],"description":"Accept an invitation","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/users/me":{"get":{"tags":["Users"],"description":"Get current user details","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/users":{"get":{"tags":["Users"],"description":"List all users in the organization","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/users/{id}":{"get":{"tags":["Users"],"description":"Get user details","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"tags":["Users"],"description":"Remove user from organization","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/admin/users/{id}/role":{"patch":{"tags":["Users"],"description":"Update user role","parameters":[{"in":"path","name":"toJSONSchema","required":true},{"schema":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"path","name":"def","required":true},{"schema":"object","in":"path","name":"type","required":true},{"in":"path","name":"parse","required":true},{"in":"path","name":"safeParse","required":true},{"in":"path","name":"parseAsync","required":true},{"in":"path","name":"safeParseAsync","required":true},{"in":"path","name":"spa","required":true},{"in":"path","name":"encode","required":true},{"in":"path","name":"decode","required":true},{"in":"path","name":"encodeAsync","required":true},{"in":"path","name":"decodeAsync","required":true},{"in":"path","name":"safeEncode","required":true},{"in":"path","name":"safeDecode","required":true},{"in":"path","name":"safeEncodeAsync","required":true},{"in":"path","name":"safeDecodeAsync","required":true}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/onboarding/complete":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"org":{"def":{"type":"object","shape":{"name":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100},"slug":{"def":{"type":"string","checks":[{},{},{}]},"type":"string","format":"regex","minLength":3,"maxLength":50}}},"type":"object"},"profile":{"def":{"type":"object","shape":{"name":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":100}}},"type":"object"},"tos":{"def":{"type":"object","shape":{"accepted":{"def":{"type":"literal","values":[true]},"type":"literal","values":{}},"version":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":50}}},"type":"object"}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response"}}}},"/api/onboarding/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/onboarding/funnel-status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/onboarding/state":{"get":{"responses":{"200":{"description":"Default Response"}}},"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"state":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"union","options":[{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null},{"def":{"type":"boolean"},"type":"boolean"},{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}]},"type":"union","options":[{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null},{"def":{"type":"boolean"},"type":"boolean"},{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}]},"checks":[{"def":{"type":"custom","check":"custom"},"type":"custom"}]},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"union","options":[{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null},{"def":{"type":"boolean"},"type":"boolean"},{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}]},"type":"union","options":[{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null},{"def":{"type":"boolean"},"type":"boolean"},{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}]}}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response"}}}},"/api/onboarding/check-slug":{"get":{"parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"slug":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response"}}}},"/admin/testimonials/{id}/approve":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/entitlements/sync":{"post":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"message":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"planTier":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"},"subscriptionStatus":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"},"stripeSubscriptionId":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"},"stripeSubscriptions":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"status":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"status":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}}},"type":"object"}}},"type":"optional"}}},"type":"object"}}}}}}},"/admin/entitlements/refresh":{"post":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"message":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"entitlement":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"any"},"type":"any"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"valueType":{"def":{"type":"any"},"type":"any"}}}},"type":"object"}}}}}}},"/admin/entitlements":{"get":{"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"def":{"type":"object","shape":{"orgId":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"},"planTier":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"subscriptionStatus":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null},"actionsLimit":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"actionsUsed":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"approvalsEnabled":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"auditExportEnabled":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"seatsLimit":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"seatsUsed":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"agentsLimit":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"agentsUsed":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[]},"type":"number","minValue":null,"maxValue":null,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"updatedAt":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string","format":null,"minLength":null,"maxLength":null}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}}}}},"/admin/billing/checkout":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/billing/upgrade-to-enforcement":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/admin/billing/portal":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/ping":{"post":{"tags":["Webhooks"],"description":"Webhook ping health check","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/webhooks/stripe":{"post":{"tags":["Webhooks"],"description":"Handle Stripe webhook events","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/referrals/program":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/referrals/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/referrals":{"get":{"parameters":[{"in":"query","name":"toJSONSchema"},{"schema":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{},{}]},"type":"number","minValue":1,"maxValue":100,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{}]},"type":"number","minValue":0,"maxValue":null,"isInt":false,"isFinite":true,"format":null}},"type":"optional"},"defaultValue":0},"type":"default"}}},"in":"query","name":"def"},{"schema":"object","in":"query","name":"type"},{"in":"query","name":"parse"},{"in":"query","name":"safeParse"},{"in":"query","name":"parseAsync"},{"in":"query","name":"safeParseAsync"},{"in":"query","name":"spa"},{"in":"query","name":"encode"},{"in":"query","name":"decode"},{"in":"query","name":"encodeAsync"},{"in":"query","name":"decodeAsync"},{"in":"query","name":"safeEncode"},{"in":"query","name":"safeDecode"},{"in":"query","name":"safeEncodeAsync"},{"in":"query","name":"safeDecodeAsync"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/referrals/credits":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/referrals/bonus":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/referrals/validate":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"object","shape":{"code":{"def":{"type":"string","checks":[{},{}]},"type":"string","format":null,"minLength":1,"maxLength":32}}},"type":"object"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/referrals/record-signup":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/api/email-approve":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/api/email-approve/validate-token":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/api/email-approve/process":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/templates/{type}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"type","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/pending":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/history":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/disable":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"def":{"type":"unknown"},"type":"unknown"}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/analytics":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/nps-status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/onboarding-status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/surveys/nps-calculation":{"get":{"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"https://api.agentactionfirewall.com","description":"Production API"},{"url":"http://localhost:3001","description":"Local Development"}],"tags":[{"name":"Actions","description":"Submit and manage agent actions for policy evaluation"},{"name":"Approvals","description":"Manage human approval workflows for flagged actions"},{"name":"Policies","description":"Configure and test policy rules"},{"name":"Audit","description":"Query tamper-evident audit logs"},{"name":"Dashboard","description":"Analytics and metrics endpoints"},{"name":"Settings","description":"Organization settings and configuration"},{"name":"Billing","description":"Subscription and usage management"},{"name":"Teams","description":"Team and member management"},{"name":"Webhooks","description":"Third-party integration webhooks"},{"name":"Health","description":"Service health and readiness checks"},{"name":"Workflows","description":"Visual workflow editor and Rego policy management"},{"name":"Discovery","description":"Tool discovery and schema inference"},{"name":"DLP","description":"Data Loss Prevention scanning and patterns"},{"name":"Guardrails","description":"Prompt injection and threat detection"},{"name":"Analytics","description":"Usage analytics and reporting"},{"name":"Connectors","description":"Platform integration connectors (Slack, Jira, etc.)"}],"externalDocs":{"description":"Full Documentation","url":"https://agentactionfirewall.com/docs"}}