chore: generate

This commit is contained in:
opencode-agent[bot]
2026-06-14 10:48:03 +00:00
parent f2cf607376
commit 8cc2276dba
6 changed files with 1358 additions and 43 deletions
+271
View File
@@ -309,6 +309,20 @@ import type {
V2ProviderGetResponses,
V2ProviderListErrors,
V2ProviderListResponses,
V2PtyConnectErrors,
V2PtyConnectResponses,
V2PtyConnectTokenErrors,
V2PtyConnectTokenResponses,
V2PtyCreateErrors,
V2PtyCreateResponses,
V2PtyGetErrors,
V2PtyGetResponses,
V2PtyListErrors,
V2PtyListResponses,
V2PtyRemoveErrors,
V2PtyRemoveResponses,
V2PtyUpdateErrors,
V2PtyUpdateResponses,
V2QuestionRequestListErrors,
V2QuestionRequestListResponses,
V2ReferenceListErrors,
@@ -6101,6 +6115,258 @@ export class Event2 extends HeyApiClient {
}
}
export class Pty2 extends HeyApiClient {
/**
* List PTY sessions
*
* List PTY sessions for a location, including exited sessions retained until removal.
*/
public list<ThrowOnError extends boolean = false>(
parameters?: {
location?: {
directory?: string
workspace?: string
}
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }])
return (options?.client ?? this.client).get<V2PtyListResponses, V2PtyListErrors, ThrowOnError>({
url: "/api/pty",
...options,
...params,
})
}
/**
* Create PTY session
*
* Create a pseudo-terminal session for a location.
*/
public create<ThrowOnError extends boolean = false>(
parameters?: {
location?: {
directory?: string
workspace?: string
}
command?: string
args?: Array<string>
cwd?: string
title?: string
env?: {
[key: string]: string
}
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "query", key: "location" },
{ in: "body", key: "command" },
{ in: "body", key: "args" },
{ in: "body", key: "cwd" },
{ in: "body", key: "title" },
{ in: "body", key: "env" },
],
},
],
)
return (options?.client ?? this.client).post<V2PtyCreateResponses, V2PtyCreateErrors, ThrowOnError>({
url: "/api/pty",
...options,
...params,
headers: {
"Content-Type": "application/json",
...options?.headers,
...params.headers,
},
})
}
/**
* Remove PTY session
*
* Terminate and remove one PTY session.
*/
public remove<ThrowOnError extends boolean = false>(
parameters: {
ptyID: string
location?: {
directory?: string
workspace?: string
}
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "path", key: "ptyID" },
{ in: "query", key: "location" },
],
},
],
)
return (options?.client ?? this.client).delete<V2PtyRemoveResponses, V2PtyRemoveErrors, ThrowOnError>({
url: "/api/pty/{ptyID}",
...options,
...params,
})
}
/**
* Get PTY session
*
* Get one PTY session, including its exit code once exited.
*/
public get<ThrowOnError extends boolean = false>(
parameters: {
ptyID: string
location?: {
directory?: string
workspace?: string
}
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "path", key: "ptyID" },
{ in: "query", key: "location" },
],
},
],
)
return (options?.client ?? this.client).get<V2PtyGetResponses, V2PtyGetErrors, ThrowOnError>({
url: "/api/pty/{ptyID}",
...options,
...params,
})
}
/**
* Update PTY session
*
* Update the title or viewport size of one PTY session.
*/
public update<ThrowOnError extends boolean = false>(
parameters: {
ptyID: string
location?: {
directory?: string
workspace?: string
}
title?: string
size?: {
rows: number
cols: number
}
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "path", key: "ptyID" },
{ in: "query", key: "location" },
{ in: "body", key: "title" },
{ in: "body", key: "size" },
],
},
],
)
return (options?.client ?? this.client).put<V2PtyUpdateResponses, V2PtyUpdateErrors, ThrowOnError>({
url: "/api/pty/{ptyID}",
...options,
...params,
headers: {
"Content-Type": "application/json",
...options?.headers,
...params.headers,
},
})
}
/**
* Create PTY WebSocket token
*
* Create a short-lived single-use ticket for opening a PTY WebSocket connection.
*/
public connectToken<ThrowOnError extends boolean = false>(
parameters: {
ptyID: string
location?: {
directory?: string
workspace?: string
}
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "path", key: "ptyID" },
{ in: "query", key: "location" },
],
},
],
)
return (options?.client ?? this.client).post<V2PtyConnectTokenResponses, V2PtyConnectTokenErrors, ThrowOnError>({
url: "/api/pty/{ptyID}/connect-token",
...options,
...params,
})
}
/**
* Connect to PTY session
*
* Establish a WebSocket connection streaming PTY output and accepting terminal input.
*/
public connect<ThrowOnError extends boolean = false>(
parameters: {
ptyID: string
"location[directory]"?: string
"location[workspace]"?: string
cursor?: string
ticket?: string
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "path", key: "ptyID" },
{ in: "query", key: "location[directory]" },
{ in: "query", key: "location[workspace]" },
{ in: "query", key: "cursor" },
{ in: "query", key: "ticket" },
],
},
],
)
return (options?.client ?? this.client).get<V2PtyConnectResponses, V2PtyConnectErrors, ThrowOnError>({
url: "/api/pty/{ptyID}/connect",
...options,
...params,
})
}
}
export class Request2 extends HeyApiClient {
/**
* List pending question requests
@@ -6342,6 +6608,11 @@ export class V2 extends HeyApiClient {
return (this._event ??= new Event2({ client: this.client }))
}
private _pty?: Pty2
get pty(): Pty2 {
return (this._pty ??= new Pty2({ client: this.client }))
}
private _question?: Question3
get question(): Question3 {
return (this._question ??= new Question3({ client: this.client }))