File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 158158 ]
159159 }
160160 },
161+ "/global/upgrade" : {
162+ "post" : {
163+ "operationId" : " global.upgrade" ,
164+ "summary" : " Upgrade opencode" ,
165+ "description" : " Upgrade opencode to the specified version or latest if not specified." ,
166+ "responses" : {
167+ "200" : {
168+ "description" : " Upgrade result" ,
169+ "content" : {
170+ "application/json" : {
171+ "schema" : {
172+ "anyOf" : [
173+ {
174+ "type" : " object" ,
175+ "properties" : {
176+ "success" : {
177+ "type" : " boolean" ,
178+ "const" : true
179+ },
180+ "version" : {
181+ "type" : " string"
182+ }
183+ },
184+ "required" : [" success" , " version" ]
185+ },
186+ {
187+ "type" : " object" ,
188+ "properties" : {
189+ "success" : {
190+ "type" : " boolean" ,
191+ "const" : false
192+ },
193+ "error" : {
194+ "type" : " string"
195+ }
196+ },
197+ "required" : [" success" , " error" ]
198+ }
199+ ]
200+ }
201+ }
202+ }
203+ },
204+ "400" : {
205+ "description" : " Bad request" ,
206+ "content" : {
207+ "application/json" : {
208+ "schema" : {
209+ "$ref" : " #/components/schemas/BadRequestError"
210+ }
211+ }
212+ }
213+ }
214+ },
215+ "requestBody" : {
216+ "content" : {
217+ "application/json" : {
218+ "schema" : {
219+ "type" : " object" ,
220+ "properties" : {
221+ "target" : {
222+ "type" : " string"
223+ }
224+ }
225+ }
226+ }
227+ }
228+ },
229+ "x-codeSamples" : [
230+ {
231+ "lang" : " js" ,
232+ "source" : " import { createOpencodeClient } from \" @opencode-ai/sdk\n\n const client = createOpencodeClient()\n await client.global.upgrade({\n ...\n })"
233+ }
234+ ]
235+ }
236+ },
161237 "/auth/{providerID}" : {
162238 "put" : {
163239 "operationId" : " auth.set" ,
You can’t perform that action at this time.
0 commit comments