mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-20 01:04:22 +01:00
release: v0.11.5
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user