From d95954ca53983ba8c52df782c3ca16b11130942b Mon Sep 17 00:00:00 2001 From: Rushil Patel Date: Wed, 21 May 2025 11:05:41 -0700 Subject: [PATCH 1/2] update api openapi spec --- docs/api-reference/openapi3.json | 1450 ++++++++++++++++++------------ 1 file changed, 853 insertions(+), 597 deletions(-) diff --git a/docs/api-reference/openapi3.json b/docs/api-reference/openapi3.json index 35d885826..dfb87fe12 100644 --- a/docs/api-reference/openapi3.json +++ b/docs/api-reference/openapi3.json @@ -1,628 +1,884 @@ { "openapi": "3.1.0", "info": { - "title": "Developer API", - "description": "API for application developers", - "version": "1.0.0" + "title": "Developer API", + "description": "API for application developers", + "version": "1.0.0" }, "servers": [ - { - "url": "https://api.codegen.com", - "description": "Codegen API" - } + { + "url": "https://api.codegen.com", + "description": "Codegen API" + } ], "paths": { - "/v1/organizations/{org_id}/users": { - "get": { - "tags": ["users", "users", "users"], - "summary": "Get Users", - "description": "Get paginated list of users for a specific organization.\n\nReturns a paginated list of all users associated with the specified organization.\nThe requesting user must be a member of the organization to access this endpoint.\n\nRate limit: 60 requests per 30 seconds.", - "operationId": "get_users_v1_organizations__org_id__users_get", - "parameters": [ - { - "name": "org_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Org Id" } - }, - { - "name": "skip", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "default": 0, - "title": "Skip" - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "default": 100, - "title": "Limit" - } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { "title": "Authorization" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/Page_UserResponse_" } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionsErrorResponse" - } - } - }, - "description": "Forbidden" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } + "/v1/organizations/{org_id}/users": { + "get": { + "tags": [ + "users", + "users", + "users" + ], + "summary": "Get Users", + "description": "Get paginated list of users for a specific organization.\n\nReturns a paginated list of all users associated with the specified organization.\nThe requesting user must be a member of the organization to access this endpoint.\n\nRate limit: 60 requests per 30 seconds.", + "operationId": "get_users_v1_organizations__org_id__users_get", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "skip", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0, + "title": "Skip" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "default": 100, + "title": "Limit" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_UserResponse_" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionsErrorResponse" + } } + }, + "description": "Forbidden" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } } - }, - "/v1/organizations/{org_id}/users/{user_id}": { - "get": { - "tags": ["users", "users", "users"], - "summary": "Get User", - "description": "Get details for a specific user in an organization.\n\nReturns detailed information about a user within the specified organization.\nThe requesting user must be a member of the organization to access this endpoint.\n\nRate limit: 60 requests per 30 seconds.", - "operationId": "get_user_v1_organizations__org_id__users__user_id__get", - "parameters": [ - { - "name": "org_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Org Id" } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "User Id" } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { "title": "Authorization" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/UserResponse" } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionsErrorResponse" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserNotFoundErrorResponse" - } - } - }, - "description": "Not Found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } + } + } + }, + "/v1/organizations/{org_id}/users/{user_id}": { + "get": { + "tags": [ + "users", + "users", + "users" + ], + "summary": "Get User", + "description": "Get details for a specific user in an organization.\n\nReturns detailed information about a user within the specified organization.\nThe requesting user must be a member of the organization to access this endpoint.\n\nRate limit: 60 requests per 30 seconds.", + "operationId": "get_user_v1_organizations__org_id__users__user_id__get", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionsErrorResponse" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNotFoundErrorResponse" + } } + }, + "description": "Not Found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } } - }, - "/v1/organizations/{org_id}/agent/run": { - "post": { - "tags": ["agents", "agents", "agents"], - "summary": "Create Agent Run", - "description": "Create a new agent run.\n\nCreates and initiates a long-running agent process based on the provided prompt.\nThe process will complete asynchronously, and the response contains the agent run ID\nwhich can be used to check the status later. The requesting user must be a member\nof the specified organization.\n\nRate limit: 10 requests per minute.", - "operationId": "create_agent_run_v1_organizations__org_id__agent_run_post", - "parameters": [ - { - "name": "org_id", - "in": "path", - "required": true, - "schema": { "type": "integer", "title": "Org Id" } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { "title": "Authorization" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/CreateAgentRunInput" } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/AgentRunResponse" } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "402": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentRunLimitReachedErrorResponse" - } - } - }, - "description": "Payment Required" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionsErrorResponse" - } - } - }, - "description": "Forbidden" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } + } + } + }, + "/v1/organizations/{org_id}/agent/run": { + "post": { + "tags": [ + "agents", + "agents", + "agents" + ], + "summary": "Create Agent Run", + "description": "Create a new agent run.\n\nCreates and initiates a long-running agent process based on the provided prompt.\nThe process will complete asynchronously, and the response contains the agent run ID\nwhich can be used to check the status later. The requesting user must be a member\nof the specified organization.\n\nThis endpoint accepts both a text prompt and an optional image file upload.\n\nRate limit: 10 requests per minute.", + "operationId": "create_agent_run_v1_organizations__org_id__agent_run_post", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Org Id" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentRunInput" } + } } - }, - "/v1/organizations/{org_id}/agent/run/{agent_run_id}": { - "get": { - "tags": ["agents", "agents", "agents"], - "summary": "Get Agent Run", - "description": "Retrieve the status and result of an agent run.\n\nReturns the current status, progress, and any available results for the specified agent run.\nThe agent run must belong to the specified organization. If the agent run is still in progress,\nthis endpoint can be polled to check for completion.\n\nRate limit: 60 requests per 30 seconds.", - "operationId": "get_agent_run_v1_organizations__org_id__agent_run__agent_run_id__get", - "parameters": [ - { - "name": "agent_run_id", - "in": "path", - "required": true, - "schema": { "type": "integer", "title": "Agent Run Id" } - }, - { - "name": "org_id", - "in": "path", - "required": true, - "schema": { "type": "integer", "title": "Org Id" } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { "title": "Authorization" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/AgentRunResponse" } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionsErrorResponse" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentRunNotFoundErrorResponse" - } - } - }, - "description": "Not Found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentRunResponse" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "402": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentRunLimitReachedErrorResponse" + } } + }, + "description": "Payment Required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionsErrorResponse" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoReposFoundInOrgErrorResponse" + } + } + }, + "description": "Not Found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } } - }, - "/v1/organizations": { - "get": { - "tags": ["organizations", "organizations", "organizations"], - "summary": "Get Organizations", - "description": "Get organizations for the authenticated user.\n\nReturns a paginated list of all organizations that the authenticated user is a member of.\nResults include basic organization details such as name, ID, and membership information.\nUse pagination parameters to control the number of results returned.\n\nRate limit: 60 requests per 30 seconds.", - "operationId": "get_organizations_v1_organizations_get", - "parameters": [ - { - "name": "skip", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "default": 0, - "title": "Skip" - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "default": 100, - "title": "Limit" - } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { "title": "Authorization" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_OrganizationResponse_" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } + } + } + }, + "/v1/organizations/{org_id}/agent/run/{agent_run_id}": { + "get": { + "tags": [ + "agents", + "agents", + "agents" + ], + "summary": "Get Agent Run", + "description": "Retrieve the status and result of an agent run.\n\nReturns the current status, progress, and any available results for the specified agent run.\nThe agent run must belong to the specified organization. If the agent run is still in progress,\nthis endpoint can be polled to check for completion.\n\nRate limit: 60 requests per 30 seconds.", + "operationId": "get_agent_run_v1_organizations__org_id__agent_run__agent_run_id__get", + "parameters": [ + { + "name": "agent_run_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Agent Run Id" + } + }, + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Org Id" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentRunResponse" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionsErrorResponse" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentRunNotFoundErrorResponse" + } } + }, + "description": "Not Found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/organizations": { + "get": { + "tags": [ + "organizations", + "organizations", + "organizations" + ], + "summary": "Get Organizations", + "description": "Get organizations for the authenticated user.\n\nReturns a paginated list of all organizations that the authenticated user is a member of.\nResults include basic organization details such as name, ID, and membership information.\nUse pagination parameters to control the number of results returned.\n\nRate limit: 60 requests per 30 seconds.", + "operationId": "get_organizations_v1_organizations_get", + "parameters": [ + { + "name": "skip", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0, + "title": "Skip" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "default": 100, + "title": "Limit" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_OrganizationResponse_" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } } + } } + } }, "components": { - "schemas": { - "APIRateLimitErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "Rate limit exceeded. Please try again later." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 429 - } - }, - "type": "object", - "title": "APIRateLimitErrorResponse" - }, - "AgentRunLimitReachedErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "Alloted agent runs for the current billing plan have been reached. Please upgrade your plan to continue." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 402 - } - }, - "type": "object", - "title": "AgentRunLimitReachedErrorResponse" - }, - "AgentRunNotFoundErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "Agent run not found." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 404 - } - }, - "type": "object", - "title": "AgentRunNotFoundErrorResponse" - }, - "AgentRunResponse": { - "properties": { - "id": { "type": "integer", "title": "Id" }, - "organization_id": { "type": "integer", "title": "Organization Id" }, - "status": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Status" - }, - "created_at": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Created At" - }, - "web_url": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Web Url" - }, - "result": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Result" - } - }, - "type": "object", - "required": ["id", "organization_id"], - "title": "AgentRunResponse", - "description": "Represents an agent run in API responses" - }, - "CreateAgentRunInput": { - "properties": { "prompt": { "type": "string", "title": "Prompt" } }, - "type": "object", - "required": ["prompt"], - "title": "CreateAgentRunInput" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { "$ref": "#/components/schemas/ValidationError" }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "OrganizationResponse": { - "properties": { - "id": { "type": "integer", "title": "Id" }, - "name": { "type": "string", "title": "Name" }, - "settings": { "$ref": "#/components/schemas/OrganizationSettings" } + "schemas": { + "APIRateLimitErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "Rate limit exceeded. Please try again later." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 429 + } + }, + "type": "object", + "title": "APIRateLimitErrorResponse" + }, + "AgentRunLimitReachedErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "Alloted agent runs for the current billing plan have been reached. Please upgrade your plan to continue." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 402 + } + }, + "type": "object", + "title": "AgentRunLimitReachedErrorResponse" + }, + "AgentRunNotFoundErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "Agent run not found." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 404 + } + }, + "type": "object", + "title": "AgentRunNotFoundErrorResponse" + }, + "AgentRunResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "organization_id": { + "type": "integer", + "title": "Organization Id" + }, + "status": { + "anyOf": [ + { + "type": "string" }, - "type": "object", - "required": ["id", "name", "settings"], - "title": "OrganizationResponse", - "description": "Represents an organization in API responses" - }, - "OrganizationSettings": { - "properties": { - "enable_pr_creation": { - "type": "boolean", - "title": "Enable Pr Creation", - "default": true - }, - "enable_rules_detection": { - "type": "boolean", - "title": "Enable Rules Detection", - "default": true - } + { + "type": "null" + } + ], + "title": "Status" + }, + "created_at": { + "anyOf": [ + { + "type": "string" }, - "type": "object", - "title": "OrganizationSettings" - }, - "Page_OrganizationResponse_": { - "properties": { - "items": { - "items": { "$ref": "#/components/schemas/OrganizationResponse" }, - "type": "array", - "title": "Items" - }, - "total": { "type": "integer", "title": "Total" }, - "page": { "type": "integer", "title": "Page" }, - "size": { "type": "integer", "title": "Size" }, - "pages": { "type": "integer", "title": "Pages" } + { + "type": "null" + } + ], + "title": "Created At" + }, + "web_url": { + "anyOf": [ + { + "type": "string" }, - "type": "object", - "required": ["items", "total", "page", "size", "pages"], - "title": "Page[OrganizationResponse]" - }, - "Page_UserResponse_": { - "properties": { - "items": { - "items": { "$ref": "#/components/schemas/UserResponse" }, - "type": "array", - "title": "Items" - }, - "total": { "type": "integer", "title": "Total" }, - "page": { "type": "integer", "title": "Page" }, - "size": { "type": "integer", "title": "Size" }, - "pages": { "type": "integer", "title": "Pages" } + { + "type": "null" + } + ], + "title": "Web Url" + }, + "result": { + "anyOf": [ + { + "type": "string" }, - "type": "object", - "required": ["items", "total", "page", "size", "pages"], - "title": "Page[UserResponse]" - }, - "PermissionsErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "You do not have access to this organization." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 403 - } + { + "type": "null" + } + ], + "title": "Result" + } + }, + "type": "object", + "required": [ + "id", + "organization_id" + ], + "title": "AgentRunResponse", + "description": "Represents an agent run in API responses" + }, + "CreateAgentRunInput": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt" + }, + "images": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" }, - "type": "object", - "title": "PermissionsErrorResponse" - }, - "UserNotFoundErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "User not found." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 404 - } + { + "type": "null" + } + ], + "title": "Images", + "description": "List of base64 encoded data URIs representing images to be processed by the agent" + } + }, + "type": "object", + "required": [ + "prompt" + ], + "title": "CreateAgentRunInput" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "NoReposFoundInOrgErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "No repos found in the organization. Please add some repos and try again." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 404 + } + }, + "type": "object", + "title": "NoReposFoundInOrgErrorResponse" + }, + "OrganizationResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "settings": { + "$ref": "#/components/schemas/OrganizationSettings" + } + }, + "type": "object", + "required": [ + "id", + "name", + "settings" + ], + "title": "OrganizationResponse", + "description": "Represents an organization in API responses" + }, + "OrganizationSettings": { + "properties": { + "enable_pr_creation": { + "type": "boolean", + "title": "Enable Pr Creation", + "default": true + }, + "enable_rules_detection": { + "type": "boolean", + "title": "Enable Rules Detection", + "default": true + } + }, + "type": "object", + "title": "OrganizationSettings" + }, + "Page_OrganizationResponse_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/OrganizationResponse" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "title": "Total" + }, + "page": { + "type": "integer", + "title": "Page" + }, + "size": { + "type": "integer", + "title": "Size" + }, + "pages": { + "type": "integer", + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size", + "pages" + ], + "title": "Page[OrganizationResponse]" + }, + "Page_UserResponse_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "title": "Total" + }, + "page": { + "type": "integer", + "title": "Page" + }, + "size": { + "type": "integer", + "title": "Size" + }, + "pages": { + "type": "integer", + "title": "Pages" + } + }, + "type": "object", + "required": [ + "items", + "total", + "page", + "size", + "pages" + ], + "title": "Page[UserResponse]" + }, + "PermissionsErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "You do not have access to this organization." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 403 + } + }, + "type": "object", + "title": "PermissionsErrorResponse" + }, + "UserNotFoundErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "User not found." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 404 + } + }, + "type": "object", + "title": "UserNotFoundErrorResponse" + }, + "UserResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "email": { + "anyOf": [ + { + "type": "string" }, - "type": "object", - "title": "UserNotFoundErrorResponse" - }, - "UserResponse": { - "properties": { - "id": { "type": "integer", "title": "Id" }, - "email": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Email" - }, - "github_user_id": { "type": "string", "title": "Github User Id" }, - "github_username": { "type": "string", "title": "Github Username" }, - "avatar_url": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Avatar Url" - }, - "full_name": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Full Name" - } + { + "type": "null" + } + ], + "title": "Email" + }, + "github_user_id": { + "type": "string", + "title": "Github User Id" + }, + "github_username": { + "type": "string", + "title": "Github Username" + }, + "avatar_url": { + "anyOf": [ + { + "type": "string" }, - "type": "object", - "required": [ - "id", - "email", - "github_user_id", - "github_username", - "avatar_url", - "full_name" - ], - "title": "UserResponse", - "description": "Represents a user in API responses" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, - "type": "array", - "title": "Location" - }, - "msg": { "type": "string", "title": "Message" }, - "type": { "type": "string", "title": "Error Type" } + { + "type": "null" + } + ], + "title": "Avatar Url" + }, + "full_name": { + "anyOf": [ + { + "type": "string" }, - "type": "object", - "required": ["loc", "msg", "type"], - "title": "ValidationError" + { + "type": "null" + } + ], + "title": "Full Name" + } + }, + "type": "object", + "required": [ + "id", + "email", + "github_user_id", + "github_username", + "avatar_url", + "full_name" + ], + "title": "UserResponse", + "description": "Represents a user in API responses" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" } + } } -} + } \ No newline at end of file From 88eb5e3193e9a4a5032d55141721aa0af1bb7476 Mon Sep 17 00:00:00 2001 From: rushilpatel0 <171610820+rushilpatel0@users.noreply.github.com> Date: Wed, 21 May 2025 19:11:28 +0000 Subject: [PATCH 2/2] Automated pre-commit update --- docs/api-reference/openapi3.json | 1661 +++++++++++++++--------------- 1 file changed, 808 insertions(+), 853 deletions(-) diff --git a/docs/api-reference/openapi3.json b/docs/api-reference/openapi3.json index dfb87fe12..eebd42bd8 100644 --- a/docs/api-reference/openapi3.json +++ b/docs/api-reference/openapi3.json @@ -1,884 +1,839 @@ { "openapi": "3.1.0", "info": { - "title": "Developer API", - "description": "API for application developers", - "version": "1.0.0" + "title": "Developer API", + "description": "API for application developers", + "version": "1.0.0" }, "servers": [ - { - "url": "https://api.codegen.com", - "description": "Codegen API" - } + { + "url": "https://api.codegen.com", + "description": "Codegen API" + } ], "paths": { - "/v1/organizations/{org_id}/users": { - "get": { - "tags": [ - "users", - "users", - "users" - ], - "summary": "Get Users", - "description": "Get paginated list of users for a specific organization.\n\nReturns a paginated list of all users associated with the specified organization.\nThe requesting user must be a member of the organization to access this endpoint.\n\nRate limit: 60 requests per 30 seconds.", - "operationId": "get_users_v1_organizations__org_id__users_get", - "parameters": [ - { - "name": "org_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Org Id" - } - }, - { - "name": "skip", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "default": 0, - "title": "Skip" - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "default": 100, - "title": "Limit" - } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { - "title": "Authorization" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_UserResponse_" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionsErrorResponse" - } - } - }, - "description": "Forbidden" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/organizations/{org_id}/users/{user_id}": { - "get": { - "tags": [ - "users", - "users", - "users" - ], - "summary": "Get User", - "description": "Get details for a specific user in an organization.\n\nReturns detailed information about a user within the specified organization.\nThe requesting user must be a member of the organization to access this endpoint.\n\nRate limit: 60 requests per 30 seconds.", - "operationId": "get_user_v1_organizations__org_id__users__user_id__get", - "parameters": [ - { - "name": "org_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Org Id" - } - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "User Id" - } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { - "title": "Authorization" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserResponse" - } + "/v1/organizations/{org_id}/users": { + "get": { + "tags": ["users", "users", "users"], + "summary": "Get Users", + "description": "Get paginated list of users for a specific organization.\n\nReturns a paginated list of all users associated with the specified organization.\nThe requesting user must be a member of the organization to access this endpoint.\n\nRate limit: 60 requests per 30 seconds.", + "operationId": "get_users_v1_organizations__org_id__users_get", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "skip", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0, + "title": "Skip" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "default": 100, + "title": "Limit" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_UserResponse_" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionsErrorResponse" + } + } + }, + "description": "Forbidden" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionsErrorResponse" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserNotFoundErrorResponse" - } - } - }, - "description": "Not Found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } } - } - } - }, - "/v1/organizations/{org_id}/agent/run": { - "post": { - "tags": [ - "agents", - "agents", - "agents" - ], - "summary": "Create Agent Run", - "description": "Create a new agent run.\n\nCreates and initiates a long-running agent process based on the provided prompt.\nThe process will complete asynchronously, and the response contains the agent run ID\nwhich can be used to check the status later. The requesting user must be a member\nof the specified organization.\n\nThis endpoint accepts both a text prompt and an optional image file upload.\n\nRate limit: 10 requests per minute.", - "operationId": "create_agent_run_v1_organizations__org_id__agent_run_post", - "parameters": [ - { - "name": "org_id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "title": "Org Id" - } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { - "title": "Authorization" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentRunInput" + }, + "/v1/organizations/{org_id}/users/{user_id}": { + "get": { + "tags": ["users", "users", "users"], + "summary": "Get User", + "description": "Get details for a specific user in an organization.\n\nReturns detailed information about a user within the specified organization.\nThe requesting user must be a member of the organization to access this endpoint.\n\nRate limit: 60 requests per 30 seconds.", + "operationId": "get_user_v1_organizations__org_id__users__user_id__get", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionsErrorResponse" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNotFoundErrorResponse" + } + } + }, + "description": "Not Found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentRunResponse" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "402": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentRunLimitReachedErrorResponse" - } - } - }, - "description": "Payment Required" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionsErrorResponse" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoReposFoundInOrgErrorResponse" - } - } - }, - "description": "Not Found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + }, + "/v1/organizations/{org_id}/agent/run": { + "post": { + "tags": ["agents", "agents", "agents"], + "summary": "Create Agent Run", + "description": "Create a new agent run.\n\nCreates and initiates a long-running agent process based on the provided prompt.\nThe process will complete asynchronously, and the response contains the agent run ID\nwhich can be used to check the status later. The requesting user must be a member\nof the specified organization.\n\nThis endpoint accepts both a text prompt and an optional image file upload.\n\nRate limit: 10 requests per minute.", + "operationId": "create_agent_run_v1_organizations__org_id__agent_run_post", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Org Id" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentRunInput" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentRunResponse" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "402": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentRunLimitReachedErrorResponse" + } + } + }, + "description": "Payment Required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionsErrorResponse" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NoReposFoundInOrgErrorResponse" + } + } + }, + "description": "Not Found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - } - } - }, - "/v1/organizations/{org_id}/agent/run/{agent_run_id}": { - "get": { - "tags": [ - "agents", - "agents", - "agents" - ], - "summary": "Get Agent Run", - "description": "Retrieve the status and result of an agent run.\n\nReturns the current status, progress, and any available results for the specified agent run.\nThe agent run must belong to the specified organization. If the agent run is still in progress,\nthis endpoint can be polled to check for completion.\n\nRate limit: 60 requests per 30 seconds.", - "operationId": "get_agent_run_v1_organizations__org_id__agent_run__agent_run_id__get", - "parameters": [ - { - "name": "agent_run_id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "title": "Agent Run Id" - } - }, - { - "name": "org_id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "title": "Org Id" - } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { - "title": "Authorization" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentRunResponse" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionsErrorResponse" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentRunNotFoundErrorResponse" - } - } - }, - "description": "Not Found" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + }, + "/v1/organizations/{org_id}/agent/run/{agent_run_id}": { + "get": { + "tags": ["agents", "agents", "agents"], + "summary": "Get Agent Run", + "description": "Retrieve the status and result of an agent run.\n\nReturns the current status, progress, and any available results for the specified agent run.\nThe agent run must belong to the specified organization. If the agent run is still in progress,\nthis endpoint can be polled to check for completion.\n\nRate limit: 60 requests per 30 seconds.", + "operationId": "get_agent_run_v1_organizations__org_id__agent_run__agent_run_id__get", + "parameters": [ + { + "name": "agent_run_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Agent Run Id" + } + }, + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Org Id" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentRunResponse" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionsErrorResponse" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentRunNotFoundErrorResponse" + } + } + }, + "description": "Not Found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - } - } - }, - "/v1/organizations": { - "get": { - "tags": [ - "organizations", - "organizations", - "organizations" - ], - "summary": "Get Organizations", - "description": "Get organizations for the authenticated user.\n\nReturns a paginated list of all organizations that the authenticated user is a member of.\nResults include basic organization details such as name, ID, and membership information.\nUse pagination parameters to control the number of results returned.\n\nRate limit: 60 requests per 30 seconds.", - "operationId": "get_organizations_v1_organizations_get", - "parameters": [ - { - "name": "skip", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "default": 0, - "title": "Skip" - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "default": 100, - "title": "Limit" - } - }, - { - "name": "authorization", - "in": "header", - "required": false, - "schema": { - "title": "Authorization" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_OrganizationResponse_" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIRateLimitErrorResponse" - } - } - }, - "description": "Too Many Requests" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + }, + "/v1/organizations": { + "get": { + "tags": ["organizations", "organizations", "organizations"], + "summary": "Get Organizations", + "description": "Get organizations for the authenticated user.\n\nReturns a paginated list of all organizations that the authenticated user is a member of.\nResults include basic organization details such as name, ID, and membership information.\nUse pagination parameters to control the number of results returned.\n\nRate limit: 60 requests per 30 seconds.", + "operationId": "get_organizations_v1_organizations_get", + "parameters": [ + { + "name": "skip", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0, + "title": "Skip" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "default": 100, + "title": "Limit" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "title": "Authorization" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_OrganizationResponse_" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIRateLimitErrorResponse" + } + } + }, + "description": "Too Many Requests" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - } } - } }, "components": { - "schemas": { - "APIRateLimitErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "Rate limit exceeded. Please try again later." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 429 - } - }, - "type": "object", - "title": "APIRateLimitErrorResponse" - }, - "AgentRunLimitReachedErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "Alloted agent runs for the current billing plan have been reached. Please upgrade your plan to continue." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 402 - } - }, - "type": "object", - "title": "AgentRunLimitReachedErrorResponse" - }, - "AgentRunNotFoundErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "Agent run not found." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 404 - } - }, - "type": "object", - "title": "AgentRunNotFoundErrorResponse" - }, - "AgentRunResponse": { - "properties": { - "id": { - "type": "integer", - "title": "Id" - }, - "organization_id": { - "type": "integer", - "title": "Organization Id" - }, - "status": { - "anyOf": [ - { - "type": "string" + "schemas": { + "APIRateLimitErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "Rate limit exceeded. Please try again later." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 429 + } }, - { - "type": "null" - } - ], - "title": "Status" - }, - "created_at": { - "anyOf": [ - { - "type": "string" + "type": "object", + "title": "APIRateLimitErrorResponse" + }, + "AgentRunLimitReachedErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "Alloted agent runs for the current billing plan have been reached. Please upgrade your plan to continue." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 402 + } }, - { - "type": "null" - } - ], - "title": "Created At" - }, - "web_url": { - "anyOf": [ - { - "type": "string" + "type": "object", + "title": "AgentRunLimitReachedErrorResponse" + }, + "AgentRunNotFoundErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "Agent run not found." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 404 + } }, - { - "type": "null" - } - ], - "title": "Web Url" - }, - "result": { - "anyOf": [ - { - "type": "string" + "type": "object", + "title": "AgentRunNotFoundErrorResponse" + }, + "AgentRunResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "organization_id": { + "type": "integer", + "title": "Organization Id" + }, + "status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status" + }, + "created_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created At" + }, + "web_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Web Url" + }, + "result": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Result" + } }, - { - "type": "null" - } - ], - "title": "Result" - } - }, - "type": "object", - "required": [ - "id", - "organization_id" - ], - "title": "AgentRunResponse", - "description": "Represents an agent run in API responses" - }, - "CreateAgentRunInput": { - "properties": { - "prompt": { - "type": "string", - "title": "Prompt" - }, - "images": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" + "type": "object", + "required": ["id", "organization_id"], + "title": "AgentRunResponse", + "description": "Represents an agent run in API responses" + }, + "CreateAgentRunInput": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt" + }, + "images": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Images", + "description": "List of base64 encoded data URIs representing images to be processed by the agent" + } }, - { - "type": "null" - } - ], - "title": "Images", - "description": "List of base64 encoded data URIs representing images to be processed by the agent" - } - }, - "type": "object", - "required": [ - "prompt" - ], - "title": "CreateAgentRunInput" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "NoReposFoundInOrgErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "No repos found in the organization. Please add some repos and try again." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 404 - } - }, - "type": "object", - "title": "NoReposFoundInOrgErrorResponse" - }, - "OrganizationResponse": { - "properties": { - "id": { - "type": "integer", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "settings": { - "$ref": "#/components/schemas/OrganizationSettings" - } - }, - "type": "object", - "required": [ - "id", - "name", - "settings" - ], - "title": "OrganizationResponse", - "description": "Represents an organization in API responses" - }, - "OrganizationSettings": { - "properties": { - "enable_pr_creation": { - "type": "boolean", - "title": "Enable Pr Creation", - "default": true - }, - "enable_rules_detection": { - "type": "boolean", - "title": "Enable Rules Detection", - "default": true - } - }, - "type": "object", - "title": "OrganizationSettings" - }, - "Page_OrganizationResponse_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/OrganizationResponse" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "title": "Total" - }, - "page": { - "type": "integer", - "title": "Page" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "pages": { - "type": "integer", - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items", - "total", - "page", - "size", - "pages" - ], - "title": "Page[OrganizationResponse]" - }, - "Page_UserResponse_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/UserResponse" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "title": "Total" - }, - "page": { - "type": "integer", - "title": "Page" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "pages": { - "type": "integer", - "title": "Pages" - } - }, - "type": "object", - "required": [ - "items", - "total", - "page", - "size", - "pages" - ], - "title": "Page[UserResponse]" - }, - "PermissionsErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "You do not have access to this organization." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 403 - } - }, - "type": "object", - "title": "PermissionsErrorResponse" - }, - "UserNotFoundErrorResponse": { - "properties": { - "message": { - "type": "string", - "title": "Message", - "default": "User not found." - }, - "status_code": { - "type": "integer", - "title": "Status Code", - "default": 404 - } - }, - "type": "object", - "title": "UserNotFoundErrorResponse" - }, - "UserResponse": { - "properties": { - "id": { - "type": "integer", - "title": "Id" - }, - "email": { - "anyOf": [ - { - "type": "string" + "type": "object", + "required": ["prompt"], + "title": "CreateAgentRunInput" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } }, - { - "type": "null" - } - ], - "title": "Email" - }, - "github_user_id": { - "type": "string", - "title": "Github User Id" - }, - "github_username": { - "type": "string", - "title": "Github Username" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" + "type": "object", + "title": "HTTPValidationError" + }, + "NoReposFoundInOrgErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "No repos found in the organization. Please add some repos and try again." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 404 + } }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "full_name": { - "anyOf": [ - { - "type": "string" + "type": "object", + "title": "NoReposFoundInOrgErrorResponse" + }, + "OrganizationResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "settings": { + "$ref": "#/components/schemas/OrganizationSettings" + } }, - { - "type": "null" - } - ], - "title": "Full Name" - } - }, - "type": "object", - "required": [ - "id", - "email", - "github_user_id", - "github_username", - "avatar_url", - "full_name" - ], - "title": "UserResponse", - "description": "Represents a user in API responses" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" + "type": "object", + "required": ["id", "name", "settings"], + "title": "OrganizationResponse", + "description": "Represents an organization in API responses" + }, + "OrganizationSettings": { + "properties": { + "enable_pr_creation": { + "type": "boolean", + "title": "Enable Pr Creation", + "default": true + }, + "enable_rules_detection": { + "type": "boolean", + "title": "Enable Rules Detection", + "default": true + } + }, + "type": "object", + "title": "OrganizationSettings" + }, + "Page_OrganizationResponse_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/OrganizationResponse" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "title": "Total" + }, + "page": { + "type": "integer", + "title": "Page" + }, + "size": { + "type": "integer", + "title": "Size" + }, + "pages": { + "type": "integer", + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[OrganizationResponse]" + }, + "Page_UserResponse_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "title": "Total" + }, + "page": { + "type": "integer", + "title": "Page" + }, + "size": { + "type": "integer", + "title": "Size" + }, + "pages": { + "type": "integer", + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[UserResponse]" + }, + "PermissionsErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "You do not have access to this organization." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 403 + } + }, + "type": "object", + "title": "PermissionsErrorResponse" + }, + "UserNotFoundErrorResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "default": "User not found." + }, + "status_code": { + "type": "integer", + "title": "Status Code", + "default": 404 + } + }, + "type": "object", + "title": "UserNotFoundErrorResponse" + }, + "UserResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email" + }, + "github_user_id": { + "type": "string", + "title": "Github User Id" + }, + "github_username": { + "type": "string", + "title": "Github Username" + }, + "avatar_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Avatar Url" + }, + "full_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Full Name" + } + }, + "type": "object", + "required": [ + "id", + "email", + "github_user_id", + "github_username", + "avatar_url", + "full_name" + ], + "title": "UserResponse", + "description": "Represents a user in API responses" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": ["loc", "msg", "type"], + "title": "ValidationError" } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" } - } } - } \ No newline at end of file +}