chore: generate
This commit is contained in:
parent
f2cf607376
commit
8cc2276dba
6 changed files with 1358 additions and 43 deletions
|
|
@ -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 }))
|
||||
|
|
|
|||
|
|
@ -650,6 +650,7 @@ export type Pty = {
|
|||
cwd: string
|
||||
status: "running" | "exited"
|
||||
pid: number
|
||||
exitCode?: number
|
||||
}
|
||||
|
||||
export type Todo = {
|
||||
|
|
@ -2759,6 +2760,11 @@ export type ProviderNotFoundError = {
|
|||
message: string
|
||||
}
|
||||
|
||||
export type ForbiddenError = {
|
||||
_tag: "ForbiddenError"
|
||||
message: string
|
||||
}
|
||||
|
||||
export type ProjectCopyError = {
|
||||
name: "ProjectCopyError"
|
||||
data: {
|
||||
|
|
@ -10702,6 +10708,314 @@ export type V2EventSubscribeResponses = {
|
|||
|
||||
export type V2EventSubscribeResponse = V2EventSubscribeResponses[keyof V2EventSubscribeResponses]
|
||||
|
||||
export type V2PtyListData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/pty"
|
||||
}
|
||||
|
||||
export type V2PtyListErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2PtyListError = V2PtyListErrors[keyof V2PtyListErrors]
|
||||
|
||||
export type V2PtyListResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: Array<Pty>
|
||||
}
|
||||
}
|
||||
|
||||
export type V2PtyListResponse = V2PtyListResponses[keyof V2PtyListResponses]
|
||||
|
||||
export type V2PtyCreateData = {
|
||||
body: {
|
||||
command?: string
|
||||
args?: Array<string>
|
||||
cwd?: string
|
||||
title?: string
|
||||
env?: {
|
||||
[key: string]: string
|
||||
}
|
||||
}
|
||||
path?: never
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/pty"
|
||||
}
|
||||
|
||||
export type V2PtyCreateErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2PtyCreateError = V2PtyCreateErrors[keyof V2PtyCreateErrors]
|
||||
|
||||
export type V2PtyCreateResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: Pty
|
||||
}
|
||||
}
|
||||
|
||||
export type V2PtyCreateResponse = V2PtyCreateResponses[keyof V2PtyCreateResponses]
|
||||
|
||||
export type V2PtyRemoveData = {
|
||||
body?: never
|
||||
path: {
|
||||
ptyID: string
|
||||
}
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/pty/{ptyID}"
|
||||
}
|
||||
|
||||
export type V2PtyRemoveErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
/**
|
||||
* PtyNotFoundError
|
||||
*/
|
||||
404: PtyNotFoundError
|
||||
}
|
||||
|
||||
export type V2PtyRemoveError = V2PtyRemoveErrors[keyof V2PtyRemoveErrors]
|
||||
|
||||
export type V2PtyRemoveResponses = {
|
||||
/**
|
||||
* <No Content>
|
||||
*/
|
||||
204: void
|
||||
}
|
||||
|
||||
export type V2PtyRemoveResponse = V2PtyRemoveResponses[keyof V2PtyRemoveResponses]
|
||||
|
||||
export type V2PtyGetData = {
|
||||
body?: never
|
||||
path: {
|
||||
ptyID: string
|
||||
}
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/pty/{ptyID}"
|
||||
}
|
||||
|
||||
export type V2PtyGetErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
/**
|
||||
* PtyNotFoundError
|
||||
*/
|
||||
404: PtyNotFoundError
|
||||
}
|
||||
|
||||
export type V2PtyGetError = V2PtyGetErrors[keyof V2PtyGetErrors]
|
||||
|
||||
export type V2PtyGetResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: Pty
|
||||
}
|
||||
}
|
||||
|
||||
export type V2PtyGetResponse = V2PtyGetResponses[keyof V2PtyGetResponses]
|
||||
|
||||
export type V2PtyUpdateData = {
|
||||
body: {
|
||||
title?: string
|
||||
size?: {
|
||||
rows: number
|
||||
cols: number
|
||||
}
|
||||
}
|
||||
path: {
|
||||
ptyID: string
|
||||
}
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/pty/{ptyID}"
|
||||
}
|
||||
|
||||
export type V2PtyUpdateErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
/**
|
||||
* PtyNotFoundError
|
||||
*/
|
||||
404: PtyNotFoundError
|
||||
}
|
||||
|
||||
export type V2PtyUpdateError = V2PtyUpdateErrors[keyof V2PtyUpdateErrors]
|
||||
|
||||
export type V2PtyUpdateResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: Pty
|
||||
}
|
||||
}
|
||||
|
||||
export type V2PtyUpdateResponse = V2PtyUpdateResponses[keyof V2PtyUpdateResponses]
|
||||
|
||||
export type V2PtyConnectTokenData = {
|
||||
body?: never
|
||||
path: {
|
||||
ptyID: string
|
||||
}
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/pty/{ptyID}/connect-token"
|
||||
}
|
||||
|
||||
export type V2PtyConnectTokenErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
/**
|
||||
* ForbiddenError
|
||||
*/
|
||||
403: ForbiddenError
|
||||
/**
|
||||
* PtyNotFoundError
|
||||
*/
|
||||
404: PtyNotFoundError
|
||||
}
|
||||
|
||||
export type V2PtyConnectTokenError = V2PtyConnectTokenErrors[keyof V2PtyConnectTokenErrors]
|
||||
|
||||
export type V2PtyConnectTokenResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: {
|
||||
ticket: string
|
||||
expires_in: number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type V2PtyConnectTokenResponse = V2PtyConnectTokenResponses[keyof V2PtyConnectTokenResponses]
|
||||
|
||||
export type V2PtyConnectData = {
|
||||
body?: never
|
||||
path: {
|
||||
ptyID: string
|
||||
}
|
||||
query?: {
|
||||
"location[directory]"?: string
|
||||
"location[workspace]"?: string
|
||||
cursor?: string
|
||||
ticket?: string
|
||||
}
|
||||
url: "/api/pty/{ptyID}/connect"
|
||||
}
|
||||
|
||||
export type V2PtyConnectErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
/**
|
||||
* ForbiddenError
|
||||
*/
|
||||
403: ForbiddenError
|
||||
/**
|
||||
* PtyNotFoundError
|
||||
*/
|
||||
404: PtyNotFoundError
|
||||
}
|
||||
|
||||
export type V2PtyConnectError = V2PtyConnectErrors[keyof V2PtyConnectErrors]
|
||||
|
||||
export type V2PtyConnectResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: boolean
|
||||
}
|
||||
|
||||
export type V2PtyConnectResponse = V2PtyConnectResponses[keyof V2PtyConnectResponses]
|
||||
|
||||
export type V2QuestionRequestListData = {
|
||||
body?: never
|
||||
path?: never
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue