summaryrefslogtreecommitdiffhomepage
path: root/packages/sdk/js/src/v2
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-01-16 15:31:03 -0600
committerAdam <[email protected]>2026-01-20 07:33:44 -0600
commit924fc9ed803d4dfa89faed65579a5a85cd7666c0 (patch)
treeceaa1080079e4b876ff65c925bd83a8977096062 /packages/sdk/js/src/v2
parentdf094a10ff1f1a95f66abc6bdccfa69080480afa (diff)
downloadopencode-924fc9ed803d4dfa89faed65579a5a85cd7666c0.tar.gz
opencode-924fc9ed803d4dfa89faed65579a5a85cd7666c0.zip
wip(app): settings
Diffstat (limited to 'packages/sdk/js/src/v2')
-rw-r--r--packages/sdk/js/src/v2/gen/sdk.gen.ts39
-rw-r--r--packages/sdk/js/src/v2/gen/types.gen.ts41
2 files changed, 80 insertions, 0 deletions
diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts
index 706d0f9c2..139940ef6 100644
--- a/packages/sdk/js/src/v2/gen/sdk.gen.ts
+++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts
@@ -32,6 +32,9 @@ import type {
FindSymbolsResponses,
FindTextResponses,
FormatterStatusResponses,
+ GlobalConfigGetResponses,
+ GlobalConfigUpdateErrors,
+ GlobalConfigUpdateResponses,
GlobalDisposeResponses,
GlobalEventResponses,
GlobalHealthResponses,
@@ -249,6 +252,42 @@ export class Global extends HeyApiClient {
...options,
})
}
+
+ /**
+ * Get global configuration
+ *
+ * Retrieve the global OpenCode configuration settings and preferences.
+ */
+ public configGet<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) {
+ return (options?.client ?? this.client).get<GlobalConfigGetResponses, unknown, ThrowOnError>({
+ url: "/global/config",
+ ...options,
+ })
+ }
+
+ /**
+ * Update global configuration
+ *
+ * Update global OpenCode configuration settings and preferences.
+ */
+ public configUpdate<ThrowOnError extends boolean = false>(
+ parameters?: {
+ config?: Config2
+ },
+ options?: Options<never, ThrowOnError>,
+ ) {
+ const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }])
+ return (options?.client ?? this.client).patch<GlobalConfigUpdateResponses, GlobalConfigUpdateErrors, ThrowOnError>({
+ url: "/global/config",
+ ...options,
+ ...params,
+ headers: {
+ "Content-Type": "application/json",
+ ...options?.headers,
+ ...params.headers,
+ },
+ })
+ }
}
export class Project extends HeyApiClient {
diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts
index b7e72fbad..736af471f 100644
--- a/packages/sdk/js/src/v2/gen/types.gen.ts
+++ b/packages/sdk/js/src/v2/gen/types.gen.ts
@@ -2189,6 +2189,47 @@ export type GlobalDisposeResponses = {
export type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses]
+export type GlobalConfigGetData = {
+ body?: never
+ path?: never
+ query?: never
+ url: "/global/config"
+}
+
+export type GlobalConfigGetResponses = {
+ /**
+ * Global config
+ */
+ 200: Config
+}
+
+export type GlobalConfigGetResponse = GlobalConfigGetResponses[keyof GlobalConfigGetResponses]
+
+export type GlobalConfigUpdateData = {
+ body?: Config
+ path?: never
+ query?: never
+ url: "/global/config"
+}
+
+export type GlobalConfigUpdateErrors = {
+ /**
+ * Bad request
+ */
+ 400: BadRequestError
+}
+
+export type GlobalConfigUpdateError = GlobalConfigUpdateErrors[keyof GlobalConfigUpdateErrors]
+
+export type GlobalConfigUpdateResponses = {
+ /**
+ * Successfully updated global config
+ */
+ 200: Config
+}
+
+export type GlobalConfigUpdateResponse = GlobalConfigUpdateResponses[keyof GlobalConfigUpdateResponses]
+
export type ProjectListData = {
body?: never
path?: never