summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/sdk/openapi.json76
1 files changed, 76 insertions, 0 deletions
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json
index 9f3a69c54..a66ef6364 100644
--- a/packages/sdk/openapi.json
+++ b/packages/sdk/openapi.json
@@ -158,6 +158,82 @@
]
}
},
+ "/global/upgrade": {
+ "post": {
+ "operationId": "global.upgrade",
+ "summary": "Upgrade opencode",
+ "description": "Upgrade opencode to the specified version or latest if not specified.",
+ "responses": {
+ "200": {
+ "description": "Upgrade result",
+ "content": {
+ "application/json": {
+ "schema": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "success": {
+ "type": "boolean",
+ "const": true
+ },
+ "version": {
+ "type": "string"
+ }
+ },
+ "required": ["success", "version"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "success": {
+ "type": "boolean",
+ "const": false
+ },
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": ["success", "error"]
+ }
+ ]
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ }
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "target": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
+ }
+ ]
+ }
+ },
"/auth/{providerID}": {
"put": {
"operationId": "auth.set",