From 7bbff7264ff2f93384025478d376154ae0ec3ce9 Mon Sep 17 00:00:00 2001 From: Rushil Patel Date: Fri, 18 Apr 2025 12:15:24 -0700 Subject: [PATCH 1/5] fix: test openapi docs --- docs/agents/create-agent-run.mdx | 3 +++ docs/agents/get-agent-run.mdx | 3 +++ docs/mint.json | 2 +- docs/organizations/get-organizations.mdx | 3 +++ docs/users/get-user.mdx | 3 +++ docs/users/get-users.mdx | 3 +++ 6 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 docs/agents/create-agent-run.mdx create mode 100644 docs/agents/get-agent-run.mdx create mode 100644 docs/organizations/get-organizations.mdx create mode 100644 docs/users/get-user.mdx create mode 100644 docs/users/get-users.mdx diff --git a/docs/agents/create-agent-run.mdx b/docs/agents/create-agent-run.mdx new file mode 100644 index 000000000..e6af99b0c --- /dev/null +++ b/docs/agents/create-agent-run.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /v1/organizations/{org_id}/agent/run +--- \ No newline at end of file diff --git a/docs/agents/get-agent-run.mdx b/docs/agents/get-agent-run.mdx new file mode 100644 index 000000000..5b9e68106 --- /dev/null +++ b/docs/agents/get-agent-run.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /v1/organizations/{org_id}/agent/run/{agent_run_id} +--- \ No newline at end of file diff --git a/docs/mint.json b/docs/mint.json index 60d2f09a3..a9863d3ae 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -47,7 +47,7 @@ "tabs": [ { "name": "API Reference", - "openapi": "https://codegen-sh--rest-api.modal.run/api/openapi.json", + "openapi": "https://api.codegen.com/api/openapi.json", "url": "/api-reference" }, { diff --git a/docs/organizations/get-organizations.mdx b/docs/organizations/get-organizations.mdx new file mode 100644 index 000000000..fb20cdd62 --- /dev/null +++ b/docs/organizations/get-organizations.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /v1/organizations +--- \ No newline at end of file diff --git a/docs/users/get-user.mdx b/docs/users/get-user.mdx new file mode 100644 index 000000000..8fde95c28 --- /dev/null +++ b/docs/users/get-user.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /v1/organizations/{org_id}/users/{user_id} +--- \ No newline at end of file diff --git a/docs/users/get-users.mdx b/docs/users/get-users.mdx new file mode 100644 index 000000000..8448ef000 --- /dev/null +++ b/docs/users/get-users.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /v1/organizations/{org_id}/users +--- \ No newline at end of file From c33dcd019c31fcb315def22c448416c379d97ba3 Mon Sep 17 00:00:00 2001 From: Rushil Patel Date: Fri, 18 Apr 2025 13:49:02 -0700 Subject: [PATCH 2/5] fix: upgrade --- docs/docs.json | 114 +++++++++++++++++++++++++++++++++++++++++++++++++ docs/mint.json | 102 ------------------------------------------- 2 files changed, 114 insertions(+), 102 deletions(-) create mode 100644 docs/docs.json delete mode 100644 docs/mint.json diff --git a/docs/docs.json b/docs/docs.json new file mode 100644 index 000000000..f2f221374 --- /dev/null +++ b/docs/docs.json @@ -0,0 +1,114 @@ +{ + "$schema": "https://mintlify.com/docs.json", + "theme": "mint", + "name": "Codegen", + "colors": { + "primary": "#a277ff", + "light": "#a277ff", + "dark": "#a277ff" + }, + "favicon": "/favicon.svg", + "navigation": { + "tabs": [ + { + "tab": "Documentation", + "groups": [ + { + "group": "Introduction", + "pages": [ + "introduction/overview", + "introduction/capabilities", + "introduction/api", + "introduction/prompting", + "introduction/community", + "introduction/about", + "introduction/faq" + ] + }, + { + "group": "Integrations", + "pages": [ + "integrations/slack", + "integrations/linear", + "integrations/github", + "integrations/web-search", + "integrations/sandboxes" + ] + } + ] + }, + { + "tab": "API Reference", + "openapi": { + "source": "https://api.codegen.com/api/openapi.json", + "directory": "/api-reference" + } + }, + { + "tab": "Blog", + "groups": [ + { + "group": "Blog", + "pages": [ + "blog/posts", + "blog/devin", + "blog/act-via-code" + ] + } + ] + }, + { + "tab": "Changelog", + "groups": [ + { + "group": "Changelog", + "pages": [ + "changelog/changelog" + ] + } + ] + } + ] + }, + "logo": { + "light": "https://cdn.prod.website-files.com/67070304751b9b01bf6a161c/679bcf45bf55446746125835_Codegen_Logomark_Light.svg", + "dark": "https://cdn.prod.website-files.com/67070304751b9b01bf6a161c/679bcf45a3e32761c42b324b_Codegen_Logomark_Dark.svg" + }, + "appearance": { + "default": "dark" + }, + "background": { + "decoration": "gradient" + }, + "navbar": { + "primary": { + "type": "button", + "label": "GitHub", + "href": "https://github.com/codegen-sh/codegen-sdk" + } + }, + "seo": { + "metatags": { + "og:site_name": "Codegen", + "og:title": "Codegen - The SWE that Never Sleeps", + "og:description": "Code agents accessible via API, Slack, Linear, Github, and more.", + "og:url": "https://docs.codegen.com", + "og:locale": "en_US", + "og:logo": "https://i.imgur.com/f4OVOqI.png", + "article:publisher": "Codegen, Inc.", + "twitter:site": "@codegen" + }, + "indexing": "navigable" + }, + "footer": { + "socials": { + "x": "https://x.com/codegen", + "linkedin": "https://linkedin.com/company/codegen-dot-com" + } + }, + "integrations": { + "posthog": { + "apiKey": "phc_GLxaINoQJnuyCyxDmTciQqzdKBYFVDkY7bRBO4bDdso" + } + } +} \ No newline at end of file diff --git a/docs/mint.json b/docs/mint.json deleted file mode 100644 index a9863d3ae..000000000 --- a/docs/mint.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "$schema": "https://mintlify.com/schema.json", - "name": "Codegen", - "logo": { - "dark": "https://cdn.prod.website-files.com/67070304751b9b01bf6a161c/679bcf45a3e32761c42b324b_Codegen_Logomark_Dark.svg", - "light": "https://cdn.prod.website-files.com/67070304751b9b01bf6a161c/679bcf45bf55446746125835_Codegen_Logomark_Light.svg" - }, - "modeToggle": { - "default": "dark" - }, - "metadata": { - "og:site_name": "Codegen", - "og:title": "Codegen - The SWE that Never Sleeps", - "og:description": "Code agents accessible via API, Slack, Linear, Github, and more.", - "og:url": "https://docs.codegen.com", - "og:locale": "en_US", - "og:logo": "https://i.imgur.com/f4OVOqI.png", - "article:publisher": "Codegen, Inc.", - "twitter:site": "@codegen" - }, - "favicon": "/favicon.svg", - "colors": { - "primary": "#a277ff", - "light": "#a277ff", - "dark": "#a277ff", - "anchors": { - "from": "#61ffca", - "to": "#61ffca" - } - }, - "theme": "prism", - "background": { - "style": "gradient" - }, - "analytics": { - "posthog": { - "apiKey": "phc_GLxaINoQJnuyCyxDmTciQqzdKBYFVDkY7bRBO4bDdso" - } - }, - "feedback": { - "thumbsRating": true - }, - "topbarCtaButton": { - "name": "GitHub", - "url": "https://github.com/codegen-sh/codegen-sdk" - }, - "tabs": [ - { - "name": "API Reference", - "openapi": "https://api.codegen.com/api/openapi.json", - "url": "/api-reference" - }, - { - "name": "Blog", - "url": "/blog" - }, - { - "name": "Changelog", - "url": "/changelog" - }, - { - "name": "Graph-sitter", - "url": "/graph-sitter" - } - ], - "navigation": [ - { - "group": "Introduction", - "pages": [ - "introduction/overview", - "introduction/capabilities", - "introduction/api", - "introduction/prompting", - "introduction/community", - "introduction/about", - "introduction/faq" - ] - }, - { - "group": "Integrations", - "pages": [ - "integrations/slack", - "integrations/linear", - "integrations/github", - "integrations/web-search", - "integrations/sandboxes" - ] - }, - { - "group": "Changelog", - "pages": ["changelog/changelog"] - }, - { - "group": "Blog", - "pages": ["blog/posts", "blog/devin", "blog/act-via-code"] - } - ], - "footerSocials": { - "x": "https://x.com/codegen", - "linkedin": "https://linkedin.com/company/codegen-dot-com" - } -} From a45de199514bbb050b868254f992889ffb420150 Mon Sep 17 00:00:00 2001 From: rushilpatel0 <171610820+rushilpatel0@users.noreply.github.com> Date: Fri, 18 Apr 2025 20:49:51 +0000 Subject: [PATCH 3/5] Automated pre-commit update --- docs/docs.json | 220 ++++++++++++++++++++++++------------------------- 1 file changed, 107 insertions(+), 113 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f2f221374..dd2e9a3d2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1,114 +1,108 @@ { - "$schema": "https://mintlify.com/docs.json", - "theme": "mint", - "name": "Codegen", - "colors": { - "primary": "#a277ff", - "light": "#a277ff", - "dark": "#a277ff" - }, - "favicon": "/favicon.svg", - "navigation": { - "tabs": [ - { - "tab": "Documentation", - "groups": [ - { - "group": "Introduction", - "pages": [ - "introduction/overview", - "introduction/capabilities", - "introduction/api", - "introduction/prompting", - "introduction/community", - "introduction/about", - "introduction/faq" - ] - }, - { - "group": "Integrations", - "pages": [ - "integrations/slack", - "integrations/linear", - "integrations/github", - "integrations/web-search", - "integrations/sandboxes" - ] - } - ] - }, - { - "tab": "API Reference", - "openapi": { - "source": "https://api.codegen.com/api/openapi.json", - "directory": "/api-reference" - } - }, - { - "tab": "Blog", - "groups": [ - { - "group": "Blog", - "pages": [ - "blog/posts", - "blog/devin", - "blog/act-via-code" - ] - } - ] - }, - { - "tab": "Changelog", - "groups": [ - { - "group": "Changelog", - "pages": [ - "changelog/changelog" - ] - } - ] - } - ] - }, - "logo": { - "light": "https://cdn.prod.website-files.com/67070304751b9b01bf6a161c/679bcf45bf55446746125835_Codegen_Logomark_Light.svg", - "dark": "https://cdn.prod.website-files.com/67070304751b9b01bf6a161c/679bcf45a3e32761c42b324b_Codegen_Logomark_Dark.svg" - }, - "appearance": { - "default": "dark" - }, - "background": { - "decoration": "gradient" - }, - "navbar": { - "primary": { - "type": "button", - "label": "GitHub", - "href": "https://github.com/codegen-sh/codegen-sdk" - } - }, - "seo": { - "metatags": { - "og:site_name": "Codegen", - "og:title": "Codegen - The SWE that Never Sleeps", - "og:description": "Code agents accessible via API, Slack, Linear, Github, and more.", - "og:url": "https://docs.codegen.com", - "og:locale": "en_US", - "og:logo": "https://i.imgur.com/f4OVOqI.png", - "article:publisher": "Codegen, Inc.", - "twitter:site": "@codegen" - }, - "indexing": "navigable" - }, - "footer": { - "socials": { - "x": "https://x.com/codegen", - "linkedin": "https://linkedin.com/company/codegen-dot-com" - } - }, - "integrations": { - "posthog": { - "apiKey": "phc_GLxaINoQJnuyCyxDmTciQqzdKBYFVDkY7bRBO4bDdso" - } - } -} \ No newline at end of file + "$schema": "https://mintlify.com/docs.json", + "theme": "mint", + "name": "Codegen", + "colors": { + "primary": "#a277ff", + "light": "#a277ff", + "dark": "#a277ff" + }, + "favicon": "/favicon.svg", + "navigation": { + "tabs": [ + { + "tab": "Documentation", + "groups": [ + { + "group": "Introduction", + "pages": [ + "introduction/overview", + "introduction/capabilities", + "introduction/api", + "introduction/prompting", + "introduction/community", + "introduction/about", + "introduction/faq" + ] + }, + { + "group": "Integrations", + "pages": [ + "integrations/slack", + "integrations/linear", + "integrations/github", + "integrations/web-search", + "integrations/sandboxes" + ] + } + ] + }, + { + "tab": "API Reference", + "openapi": { + "source": "https://api.codegen.com/api/openapi.json", + "directory": "/api-reference" + } + }, + { + "tab": "Blog", + "groups": [ + { + "group": "Blog", + "pages": ["blog/posts", "blog/devin", "blog/act-via-code"] + } + ] + }, + { + "tab": "Changelog", + "groups": [ + { + "group": "Changelog", + "pages": ["changelog/changelog"] + } + ] + } + ] + }, + "logo": { + "light": "https://cdn.prod.website-files.com/67070304751b9b01bf6a161c/679bcf45bf55446746125835_Codegen_Logomark_Light.svg", + "dark": "https://cdn.prod.website-files.com/67070304751b9b01bf6a161c/679bcf45a3e32761c42b324b_Codegen_Logomark_Dark.svg" + }, + "appearance": { + "default": "dark" + }, + "background": { + "decoration": "gradient" + }, + "navbar": { + "primary": { + "type": "button", + "label": "GitHub", + "href": "https://github.com/codegen-sh/codegen-sdk" + } + }, + "seo": { + "metatags": { + "og:site_name": "Codegen", + "og:title": "Codegen - The SWE that Never Sleeps", + "og:description": "Code agents accessible via API, Slack, Linear, Github, and more.", + "og:url": "https://docs.codegen.com", + "og:locale": "en_US", + "og:logo": "https://i.imgur.com/f4OVOqI.png", + "article:publisher": "Codegen, Inc.", + "twitter:site": "@codegen" + }, + "indexing": "navigable" + }, + "footer": { + "socials": { + "x": "https://x.com/codegen", + "linkedin": "https://linkedin.com/company/codegen-dot-com" + } + }, + "integrations": { + "posthog": { + "apiKey": "phc_GLxaINoQJnuyCyxDmTciQqzdKBYFVDkY7bRBO4bDdso" + } + } +} From 46ea0edb68b682cd69d3d9358da40901e73fc8eb Mon Sep 17 00:00:00 2001 From: Rushil Patel Date: Fri, 18 Apr 2025 14:30:47 -0700 Subject: [PATCH 4/5] fix: ref local schema --- docs/api-reference/openapi3.json | 1 + docs/docs.json | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 docs/api-reference/openapi3.json diff --git a/docs/api-reference/openapi3.json b/docs/api-reference/openapi3.json new file mode 100644 index 000000000..2352589be --- /dev/null +++ b/docs/api-reference/openapi3.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"Developer API","description":"API for application developers","version":"1.0.0"},"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"}}}},"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/{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"}},"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"}}}} \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index dd2e9a3d2..8333377c8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -39,10 +39,15 @@ }, { "tab": "API Reference", - "openapi": { - "source": "https://api.codegen.com/api/openapi.json", - "directory": "/api-reference" - } + "groups": [ + { + "group": "Endpoints", + "openapi": { + "source": "/api-reference/openapi3.json", + "directory": "api-reference" + } + } + ] }, { "tab": "Blog", From e4a1aeb4face0ff8cfcdc017fe9917d17e2f0964 Mon Sep 17 00:00:00 2001 From: rushilpatel0 <171610820+rushilpatel0@users.noreply.github.com> Date: Fri, 18 Apr 2025 21:31:36 +0000 Subject: [PATCH 5/5] Automated pre-commit update --- docs/api-reference/openapi3.json | 623 ++++++++++++++++++++++++++++++- 1 file changed, 622 insertions(+), 1 deletion(-) diff --git a/docs/api-reference/openapi3.json b/docs/api-reference/openapi3.json index 2352589be..a1283d875 100644 --- a/docs/api-reference/openapi3.json +++ b/docs/api-reference/openapi3.json @@ -1 +1,622 @@ -{"openapi":"3.1.0","info":{"title":"Developer API","description":"API for application developers","version":"1.0.0"},"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"}}}},"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/{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"}},"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"}}}} \ No newline at end of file +{ + "openapi": "3.1.0", + "info": { + "title": "Developer API", + "description": "API for application developers", + "version": "1.0.0" + }, + "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" } + } + } + }, + "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/{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" } + }, + "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" + } + } + } +}