diff options
| author | opencode <[email protected]> | 2025-09-26 09:40:16 +0000 |
|---|---|---|
| committer | opencode <[email protected]> | 2025-09-26 09:40:16 +0000 |
| commit | 9cc1f2884fb662eb5ed9a825fd2d55a5b0aac00d (patch) | |
| tree | d31f310c667f3f821cc66390742bb652ab97a3ca /packages/sdk/js/src | |
| parent | f2b547cc45aa169a13956fb5d6f09e811c59c261 (diff) | |
| download | opencode-9cc1f2884fb662eb5ed9a825fd2d55a5b0aac00d.tar.gz opencode-9cc1f2884fb662eb5ed9a825fd2d55a5b0aac00d.zip | |
release: v0.11.5
Diffstat (limited to 'packages/sdk/js/src')
| -rw-r--r-- | packages/sdk/js/src/gen/sdk.gen.ts | 17 | ||||
| -rw-r--r-- | packages/sdk/js/src/gen/types.gen.ts | 31 |
2 files changed, 46 insertions, 2 deletions
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 |
