diff options
Diffstat (limited to 'packages/sdk/js/src/gen')
| -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 |
