chore(sdk): update @hey-api/openapi-ts to 0.90.4 (#8921)

This commit is contained in:
Cole Leavitt
2026-01-16 10:11:07 -07:00
committed by GitHub
parent 88fd6a294b
commit d075c097ac
5 changed files with 186 additions and 74 deletions

View File

@@ -20,7 +20,7 @@
"dist"
],
"devDependencies": {
"@hey-api/openapi-ts": "0.88.1",
"@hey-api/openapi-ts": "0.90.4",
"@tsconfig/node22": "catalog:",
"@types/node": "catalog:",
"typescript": "catalog:",

View File

@@ -162,10 +162,16 @@ 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
@@ -244,6 +250,7 @@ export const createClient = (config: Config = {}): Client => {
}
return request
},
serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,
url,
})
}

View File

@@ -151,6 +151,8 @@ 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() ?? ""

View File

@@ -7,7 +7,7 @@ import type {
AppAgentsResponses,
AppLogErrors,
AppLogResponses,
Auth as Auth2,
Auth as Auth3,
AuthSetErrors,
AuthSetResponses,
CommandListResponses,
@@ -2023,7 +2023,10 @@ export class Provider extends HeyApiClient {
})
}
oauth = new Oauth({ client: this.client })
private _oauth?: Oauth
get oauth(): Oauth {
return (this._oauth ??= new Oauth({ client: this.client }))
}
}
export class Find extends HeyApiClient {
@@ -2398,43 +2401,6 @@ 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 {
@@ -2550,7 +2516,10 @@ export class Mcp extends HeyApiClient {
})
}
auth = new Auth({ client: this.client })
private _auth?: Auth
get auth(): Auth {
return (this._auth ??= new Auth({ client: this.client }))
}
}
export class Resource extends HeyApiClient {
@@ -2575,7 +2544,10 @@ export class Resource extends HeyApiClient {
}
export class Experimental extends HeyApiClient {
resource = new Resource({ client: this.client })
private _resource?: Resource
get resource(): Resource {
return (this._resource ??= new Resource({ client: this.client }))
}
}
export class Lsp extends HeyApiClient {
@@ -2952,7 +2924,49 @@ export class Tui extends HeyApiClient {
})
}
control = new Control({ client: this.client })
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,
},
})
}
}
export class Event extends HeyApiClient {
@@ -2984,53 +2998,128 @@ export class OpencodeClient extends HeyApiClient {
OpencodeClient.__registry.set(this, args?.key)
}
global = new Global({ client: this.client })
private _global?: Global
get global(): Global {
return (this._global ??= new Global({ client: this.client }))
}
project = new Project({ client: this.client })
private _project?: Project
get project(): Project {
return (this._project ??= new Project({ client: this.client }))
}
pty = new Pty({ client: this.client })
private _pty?: Pty
get pty(): Pty {
return (this._pty ??= new Pty({ client: this.client }))
}
config = new Config({ client: this.client })
private _config?: Config
get config(): Config {
return (this._config ??= new Config({ client: this.client }))
}
tool = new Tool({ client: this.client })
private _tool?: Tool
get tool(): Tool {
return (this._tool ??= new Tool({ client: this.client }))
}
instance = new Instance({ client: this.client })
private _instance?: Instance
get instance(): Instance {
return (this._instance ??= new Instance({ client: this.client }))
}
path = new Path({ client: this.client })
private _path?: Path
get path(): Path {
return (this._path ??= new Path({ client: this.client }))
}
worktree = new Worktree({ client: this.client })
private _worktree?: Worktree
get worktree(): Worktree {
return (this._worktree ??= new Worktree({ client: this.client }))
}
vcs = new Vcs({ client: this.client })
private _vcs?: Vcs
get vcs(): Vcs {
return (this._vcs ??= new Vcs({ client: this.client }))
}
session = new Session({ client: this.client })
private _session?: Session
get session(): Session {
return (this._session ??= new Session({ client: this.client }))
}
part = new Part({ client: this.client })
private _part?: Part
get part(): Part {
return (this._part ??= new Part({ client: this.client }))
}
permission = new Permission({ client: this.client })
private _permission?: Permission
get permission(): Permission {
return (this._permission ??= new Permission({ client: this.client }))
}
question = new Question({ client: this.client })
private _question?: Question
get question(): Question {
return (this._question ??= new Question({ client: this.client }))
}
command = new Command({ client: this.client })
private _command?: Command
get command(): Command {
return (this._command ??= new Command({ client: this.client }))
}
provider = new Provider({ client: this.client })
private _provider?: Provider
get provider(): Provider {
return (this._provider ??= new Provider({ client: this.client }))
}
find = new Find({ client: this.client })
private _find?: Find
get find(): Find {
return (this._find ??= new Find({ client: this.client }))
}
file = new File({ client: this.client })
private _file?: File
get file(): File {
return (this._file ??= new File({ client: this.client }))
}
app = new App({ client: this.client })
private _app?: App
get app(): App {
return (this._app ??= new App({ client: this.client }))
}
mcp = new Mcp({ client: this.client })
private _mcp?: Mcp
get mcp(): Mcp {
return (this._mcp ??= new Mcp({ client: this.client }))
}
experimental = new Experimental({ client: this.client })
private _experimental?: Experimental
get experimental(): Experimental {
return (this._experimental ??= new Experimental({ client: this.client }))
}
lsp = new Lsp({ client: this.client })
private _lsp?: Lsp
get lsp(): Lsp {
return (this._lsp ??= new Lsp({ client: this.client }))
}
formatter = new Formatter({ client: this.client })
private _formatter?: Formatter
get formatter(): Formatter {
return (this._formatter ??= new Formatter({ client: this.client }))
}
tui = new Tui({ client: this.client })
private _tui?: Tui
get tui(): Tui {
return (this._tui ??= new Tui({ client: this.client }))
}
auth = new Auth({ client: this.client })
private _auth?: Auth2
get auth(): Auth2 {
return (this._auth ??= new Auth2({ client: this.client }))
}
event = new Event({ client: this.client })
private _event?: Event
get event(): Event {
return (this._event ??= new Event({ client: this.client }))
}
}