mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-01 22:10:23 +00:00
release: v0.11.5
This commit is contained in:
parent
f2b547cc45
commit
9cc1f2884f
14 changed files with 66 additions and 22 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "@opencode-ai/sdk",
|
||||
"version": "0.11.4",
|
||||
"version": "0.11.5",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ import type {
|
|||
ProjectCurrentResponses,
|
||||
ConfigGetData,
|
||||
ConfigGetResponses,
|
||||
ConfigUpdateData,
|
||||
ConfigUpdateResponses,
|
||||
ConfigUpdateErrors,
|
||||
ToolIdsData,
|
||||
ToolIdsResponses,
|
||||
ToolIdsErrors,
|
||||
|
|
@ -161,6 +164,20 @@ class Config extends _HeyApiClient {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Update config
|
||||
*/
|
||||
public update<ThrowOnError extends boolean = false>(options?: Options<ConfigUpdateData, ThrowOnError>) {
|
||||
return (options?.client ?? this._client).patch<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError>({
|
||||
url: "/config",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* List all providers
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -504,14 +504,14 @@ export type Config = {
|
|||
}
|
||||
}
|
||||
|
||||
export type ToolIds = Array<string>
|
||||
|
||||
export type _Error = {
|
||||
data: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type ToolIds = Array<string>
|
||||
|
||||
export type ToolListItem = {
|
||||
id: string
|
||||
description: string
|
||||
|
|
@ -1209,6 +1209,33 @@ export type ConfigGetResponses = {
|
|||
|
||||
export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses]
|
||||
|
||||
export type ConfigUpdateData = {
|
||||
body?: Config
|
||||
path?: never
|
||||
query?: {
|
||||
directory?: string
|
||||
}
|
||||
url: "/config"
|
||||
}
|
||||
|
||||
export type ConfigUpdateErrors = {
|
||||
/**
|
||||
* Bad request
|
||||
*/
|
||||
400: _Error
|
||||
}
|
||||
|
||||
export type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors]
|
||||
|
||||
export type ConfigUpdateResponses = {
|
||||
/**
|
||||
* Successfully updated config
|
||||
*/
|
||||
200: Config
|
||||
}
|
||||
|
||||
export type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses]
|
||||
|
||||
export type ToolIdsData = {
|
||||
body?: never
|
||||
path?: never
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue