summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-01-16 09:11:33 -0800
committerGitHub <[email protected]>2026-01-16 11:11:33 -0600
commit91b8ba2186170cbefc338867b69369d42ff9344a (patch)
tree1b187dab4b86528430498edc3ec3d3d4a243ea5f /packages
parentd075c097acce5ef34f52b4758b039eec232bba0b (diff)
downloadopencode-91b8ba2186170cbefc338867b69369d42ff9344a.tar.gz
opencode-91b8ba2186170cbefc338867b69369d42ff9344a.zip
Revert "chore(sdk): update @hey-api/openapi-ts to 0.90.4" (#8927)
Diffstat (limited to 'packages')
-rw-r--r--packages/sdk/js/package.json2
-rw-r--r--packages/sdk/js/src/v2/gen/client/client.gen.ts9
-rw-r--r--packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts2
-rw-r--r--packages/sdk/js/src/v2/gen/sdk.gen.ts223
4 files changed, 69 insertions, 167 deletions
diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json
index 37b324f34..ec9391a49 100644
--- a/packages/sdk/js/package.json
+++ b/packages/sdk/js/package.json
@@ -20,7 +20,7 @@
"dist"
],
"devDependencies": {
- "@hey-api/openapi-ts": "0.90.4",
+ "@hey-api/openapi-ts": "0.88.1",
"@tsconfig/node22": "catalog:",
"@types/node": "catalog:",
"typescript": "catalog:",
diff --git a/packages/sdk/js/src/v2/gen/client/client.gen.ts b/packages/sdk/js/src/v2/gen/client/client.gen.ts
index 627e98ec4..47f140342 100644
--- a/packages/sdk/js/src/v2/gen/client/client.gen.ts
+++ b/packages/sdk/js/src/v2/gen/client/client.gen.ts
@@ -162,16 +162,10 @@ export const createClient = (config: Config = {}): Client => {
case "arrayBuffer":
case "blob":
case "formData":
+ case "json":
case "text":
data = await response[parseAs]()
break
- case "json": {
- // Some servers return 200 with no Content-Length and empty body.
- // response.json() would throw; read as text and parse if non-empty.
- const text = await response.text()
- data = text ? JSON.parse(text) : {}
- break
- }
case "stream":
return opts.responseStyle === "data"
? response.body
@@ -250,7 +244,6 @@ export const createClient = (config: Config = {}): Client => {
}
return request
},
- serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,
url,
})
}
diff --git a/packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts b/packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts
index 056a81259..09ef3fb39 100644
--- a/packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts
+++ b/packages/sdk/js/src/v2/gen/core/serverSentEvents.gen.ts
@@ -151,8 +151,6 @@ export const createSseClient = <TData = unknown>({
const { done, value } = await reader.read()
if (done) break
buffer += value
- // Normalize line endings: CRLF -> LF, then CR -> LF
- buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n")
const chunks = buffer.split("\n\n")
buffer = chunks.pop() ?? ""
diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts
index 09b193c7c..697dac7ee 100644
--- a/packages/sdk/js/src/v2/gen/sdk.gen.ts
+++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts
@@ -7,7 +7,7 @@ import type {
AppAgentsResponses,
AppLogErrors,
AppLogResponses,
- Auth as Auth3,
+ Auth as Auth2,
AuthSetErrors,
AuthSetResponses,
CommandListResponses,
@@ -2023,10 +2023,7 @@ export class Provider extends HeyApiClient {
})
}
- private _oauth?: Oauth
- get oauth(): Oauth {
- return (this._oauth ??= new Oauth({ client: this.client }))
- }
+ oauth = new Oauth({ client: this.client })
}
export class Find extends HeyApiClient {
@@ -2401,6 +2398,43 @@ export class Auth extends HeyApiClient {
},
)
}
+
+ /**
+ * Set auth credentials
+ *
+ * Set authentication credentials
+ */
+ public set<ThrowOnError extends boolean = false>(
+ parameters: {
+ providerID: string
+ directory?: string
+ auth?: Auth2
+ },
+ options?: Options<never, ThrowOnError>,
+ ) {
+ const params = buildClientParams(
+ [parameters],
+ [
+ {
+ args: [
+ { in: "path", key: "providerID" },
+ { in: "query", key: "directory" },
+ { key: "auth", map: "body" },
+ ],
+ },
+ ],
+ )
+ return (options?.client ?? this.client).put<AuthSetResponses, AuthSetErrors, ThrowOnError>({
+ url: "/auth/{providerID}",
+ ...options,
+ ...params,
+ headers: {
+ "Content-Type": "application/json",
+ ...options?.headers,
+ ...params.headers,
+ },
+ })
+ }
}
export class Mcp extends HeyApiClient {
@@ -2516,10 +2550,7 @@ export class Mcp extends HeyApiClient {
})
}
- private _auth?: Auth
- get auth(): Auth {
- return (this._auth ??= new Auth({ client: this.client }))
- }
+ auth = new Auth({ client: this.client })
}
export class Resource extends HeyApiClient {
@@ -2544,10 +2575,7 @@ export class Resource extends HeyApiClient {
}
export class Experimental extends HeyApiClient {
- private _resource?: Resource
- get resource(): Resource {
- return (this._resource ??= new Resource({ client: this.client }))
- }
+ resource = new Resource({ client: this.client })
}
export class Lsp extends HeyApiClient {
@@ -2924,49 +2952,7 @@ export class Tui extends HeyApiClient {
})
}
- private _control?: Control
- get control(): Control {
- return (this._control ??= new Control({ client: this.client }))
- }
-}
-
-export class Auth2 extends HeyApiClient {
- /**
- * Set auth credentials
- *
- * Set authentication credentials
- */
- public set<ThrowOnError extends boolean = false>(
- parameters: {
- providerID: string
- directory?: string
- auth?: Auth3
- },
- options?: Options<never, ThrowOnError>,
- ) {
- const params = buildClientParams(
- [parameters],
- [
- {
- args: [
- { in: "path", key: "providerID" },
- { in: "query", key: "directory" },
- { key: "auth", map: "body" },
- ],
- },
- ],
- )
- return (options?.client ?? this.client).put<AuthSetResponses, AuthSetErrors, ThrowOnError>({
- url: "/auth/{providerID}",
- ...options,
- ...params,
- headers: {
- "Content-Type": "application/json",
- ...options?.headers,
- ...params.headers,
- },
- })
- }
+ control = new Control({ client: this.client })
}
export class Event extends HeyApiClient {
@@ -2998,128 +2984,53 @@ export class OpencodeClient extends HeyApiClient {
OpencodeClient.__registry.set(this, args?.key)
}
- private _global?: Global
- get global(): Global {
- return (this._global ??= new Global({ client: this.client }))
- }
+ global = new Global({ client: this.client })
- private _project?: Project
- get project(): Project {
- return (this._project ??= new Project({ client: this.client }))
- }
+ project = new Project({ client: this.client })
- private _pty?: Pty
- get pty(): Pty {
- return (this._pty ??= new Pty({ client: this.client }))
- }
+ pty = new Pty({ client: this.client })
- private _config?: Config
- get config(): Config {
- return (this._config ??= new Config({ client: this.client }))
- }
+ config = new Config({ client: this.client })
- private _tool?: Tool
- get tool(): Tool {
- return (this._tool ??= new Tool({ client: this.client }))
- }
+ tool = new Tool({ client: this.client })
- private _instance?: Instance
- get instance(): Instance {
- return (this._instance ??= new Instance({ client: this.client }))
- }
+ instance = new Instance({ client: this.client })
- private _path?: Path
- get path(): Path {
- return (this._path ??= new Path({ client: this.client }))
- }
+ path = new Path({ client: this.client })
- private _worktree?: Worktree
- get worktree(): Worktree {
- return (this._worktree ??= new Worktree({ client: this.client }))
- }
+ worktree = new Worktree({ client: this.client })
- private _vcs?: Vcs
- get vcs(): Vcs {
- return (this._vcs ??= new Vcs({ client: this.client }))
- }
+ vcs = new Vcs({ client: this.client })
- private _session?: Session
- get session(): Session {
- return (this._session ??= new Session({ client: this.client }))
- }
+ session = new Session({ client: this.client })
- private _part?: Part
- get part(): Part {
- return (this._part ??= new Part({ client: this.client }))
- }
+ part = new Part({ client: this.client })
- private _permission?: Permission
- get permission(): Permission {
- return (this._permission ??= new Permission({ client: this.client }))
- }
+ permission = new Permission({ client: this.client })
- private _question?: Question
- get question(): Question {
- return (this._question ??= new Question({ client: this.client }))
- }
+ question = new Question({ client: this.client })
- private _command?: Command
- get command(): Command {
- return (this._command ??= new Command({ client: this.client }))
- }
+ command = new Command({ client: this.client })
- private _provider?: Provider
- get provider(): Provider {
- return (this._provider ??= new Provider({ client: this.client }))
- }
+ provider = new Provider({ client: this.client })
- private _find?: Find
- get find(): Find {
- return (this._find ??= new Find({ client: this.client }))
- }
+ find = new Find({ client: this.client })
- private _file?: File
- get file(): File {
- return (this._file ??= new File({ client: this.client }))
- }
+ file = new File({ client: this.client })
- private _app?: App
- get app(): App {
- return (this._app ??= new App({ client: this.client }))
- }
+ app = new App({ client: this.client })
- private _mcp?: Mcp
- get mcp(): Mcp {
- return (this._mcp ??= new Mcp({ client: this.client }))
- }
+ mcp = new Mcp({ client: this.client })
- private _experimental?: Experimental
- get experimental(): Experimental {
- return (this._experimental ??= new Experimental({ client: this.client }))
- }
+ experimental = new Experimental({ client: this.client })
- private _lsp?: Lsp
- get lsp(): Lsp {
- return (this._lsp ??= new Lsp({ client: this.client }))
- }
+ lsp = new Lsp({ client: this.client })
- private _formatter?: Formatter
- get formatter(): Formatter {
- return (this._formatter ??= new Formatter({ client: this.client }))
- }
+ formatter = new Formatter({ client: this.client })
- private _tui?: Tui
- get tui(): Tui {
- return (this._tui ??= new Tui({ client: this.client }))
- }
+ tui = new Tui({ client: this.client })
- private _auth?: Auth2
- get auth(): Auth2 {
- return (this._auth ??= new Auth2({ client: this.client }))
- }
+ auth = new Auth({ client: this.client })
- private _event?: Event
- get event(): Event {
- return (this._event ??= new Event({ client: this.client }))
- }
+ event = new Event({ client: this.client })
}