summaryrefslogtreecommitdiffhomepage
path: root/packages/sdk
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sdk')
-rw-r--r--packages/sdk/js/src/v2/gen/sdk.gen.ts38
-rw-r--r--packages/sdk/js/src/v2/gen/types.gen.ts26
-rw-r--r--packages/sdk/openapi.json71
3 files changed, 123 insertions, 12 deletions
diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts
index 7fba60fce..f297cb18e 100644
--- a/packages/sdk/js/src/v2/gen/sdk.gen.ts
+++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts
@@ -29,6 +29,7 @@ import type {
ExperimentalConsoleSwitchOrgResponses,
ExperimentalResourceListResponses,
ExperimentalSessionListResponses,
+ ExperimentalWorkspaceAdaptorListResponses,
ExperimentalWorkspaceCreateErrors,
ExperimentalWorkspaceCreateResponses,
ExperimentalWorkspaceListResponses,
@@ -1086,6 +1087,38 @@ export class Console extends HeyApiClient {
}
}
+export class Adaptor extends HeyApiClient {
+ /**
+ * List workspace adaptors
+ *
+ * List all available workspace adaptors for the current project.
+ */
+ public list<ThrowOnError extends boolean = false>(
+ parameters?: {
+ directory?: string
+ workspace?: string
+ },
+ options?: Options<never, ThrowOnError>,
+ ) {
+ const params = buildClientParams(
+ [parameters],
+ [
+ {
+ args: [
+ { in: "query", key: "directory" },
+ { in: "query", key: "workspace" },
+ ],
+ },
+ ],
+ )
+ return (options?.client ?? this.client).get<ExperimentalWorkspaceAdaptorListResponses, unknown, ThrowOnError>({
+ url: "/experimental/workspace/adaptor",
+ ...options,
+ ...params,
+ })
+ }
+}
+
export class Workspace extends HeyApiClient {
/**
* List workspaces
@@ -1229,6 +1262,11 @@ export class Workspace extends HeyApiClient {
...params,
})
}
+
+ private _adaptor?: Adaptor
+ get adaptor(): Adaptor {
+ return (this._adaptor ??= new Adaptor({ client: this.client }))
+ }
}
export class Session 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 6512f40a2..83ec3d751 100644
--- a/packages/sdk/js/src/v2/gen/types.gen.ts
+++ b/packages/sdk/js/src/v2/gen/types.gen.ts
@@ -1772,8 +1772,8 @@ export type ToolList = Array<ToolListItem>
export type Workspace = {
id: string
type: string
+ name: string
branch: string | null
- name: string | null
directory: string | null
extra: unknown | null
projectID: string
@@ -2812,6 +2812,30 @@ export type ToolListResponses = {
export type ToolListResponse = ToolListResponses[keyof ToolListResponses]
+export type ExperimentalWorkspaceAdaptorListData = {
+ body?: never
+ path?: never
+ query?: {
+ directory?: string
+ workspace?: string
+ }
+ url: "/experimental/workspace/adaptor"
+}
+
+export type ExperimentalWorkspaceAdaptorListResponses = {
+ /**
+ * Workspace adaptors
+ */
+ 200: Array<{
+ type: string
+ name: string
+ description: string
+ }>
+}
+
+export type ExperimentalWorkspaceAdaptorListResponse =
+ ExperimentalWorkspaceAdaptorListResponses[keyof ExperimentalWorkspaceAdaptorListResponses]
+
export type ExperimentalWorkspaceListData = {
body?: never
path?: never
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json
index 5369d1c2e..85443726f 100644
--- a/packages/sdk/openapi.json
+++ b/packages/sdk/openapi.json
@@ -1526,6 +1526,62 @@
]
}
},
+ "/experimental/workspace/adaptor": {
+ "get": {
+ "operationId": "experimental.workspace.adaptor.list",
+ "parameters": [
+ {
+ "in": "query",
+ "name": "directory",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "query",
+ "name": "workspace",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "summary": "List workspace adaptors",
+ "description": "List all available workspace adaptors for the current project.",
+ "responses": {
+ "200": {
+ "description": "Workspace adaptors",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": ["type", "name", "description"]
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adaptor.list({\n ...\n})"
+ }
+ ]
+ }
+ },
"/experimental/workspace": {
"post": {
"operationId": "experimental.workspace.create",
@@ -11885,17 +11941,10 @@
"type": {
"type": "string"
},
- "branch": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
"name": {
+ "type": "string"
+ },
+ "branch": {
"anyOf": [
{
"type": "string"
@@ -11927,7 +11976,7 @@
"type": "string"
}
},
- "required": ["id", "type", "branch", "name", "directory", "extra", "projectID"]
+ "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"]
},
"Worktree": {
"type": "object",