|
|
@@ -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",
|