diff options
Diffstat (limited to 'packages/sdk')
| -rw-r--r-- | packages/sdk/js/package.json | 2 | ||||
| -rw-r--r-- | packages/sdk/js/src/gen/sdk.gen.ts | 17 | ||||
| -rw-r--r-- | packages/sdk/js/src/gen/types.gen.ts | 31 |
3 files changed, 47 insertions, 3 deletions
diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index 2146b9661..f58eaac02 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -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", diff --git a/packages/sdk/js/src/gen/sdk.gen.ts b/packages/sdk/js/src/gen/sdk.gen.ts index b6dfcb8f6..ab49e18d2 100644 --- a/packages/sdk/js/src/gen/sdk.gen.ts +++ b/packages/sdk/js/src/gen/sdk.gen.ts @@ -8,6 +8,9 @@ import type { ProjectCurrentResponses, ConfigGetData, ConfigGetResponses, + ConfigUpdateData, + ConfigUpdateResponses, + ConfigUpdateErrors, ToolIdsData, ToolIdsResponses, ToolIdsErrors, @@ -162,6 +165,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 */ public providers<ThrowOnError extends boolean = false>(options?: Options<ConfigProvidersData, ThrowOnError>) { diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index 9baf2dcdb..798fd779e 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -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 |
