|
|
@@ -133,10 +133,10 @@ import type {
|
|
|
} from "./types.gen.js"
|
|
|
import { client as _heyApiClient } from "./client.gen.js"
|
|
|
|
|
|
-export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<
|
|
|
- TData,
|
|
|
- ThrowOnError
|
|
|
-> & {
|
|
|
+export type Options<
|
|
|
+ TData extends TDataShape = TDataShape,
|
|
|
+ ThrowOnError extends boolean = boolean,
|
|
|
+> = ClientOptions<TData, ThrowOnError> & {
|
|
|
/**
|
|
|
* You can provide a client instance returned by `createClient()` instead of
|
|
|
* individual options. This might be also useful if you want to implement a
|
|
|
@@ -164,7 +164,9 @@ class Project extends _HeyApiClient {
|
|
|
/**
|
|
|
* List all projects
|
|
|
*/
|
|
|
- public list<ThrowOnError extends boolean = false>(options?: Options<ProjectListData, ThrowOnError>) {
|
|
|
+ public list<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<ProjectListData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).get<ProjectListResponses, unknown, ThrowOnError>({
|
|
|
url: "/project",
|
|
|
...options,
|
|
|
@@ -174,7 +176,9 @@ class Project extends _HeyApiClient {
|
|
|
/**
|
|
|
* Get the current project
|
|
|
*/
|
|
|
- public current<ThrowOnError extends boolean = false>(options?: Options<ProjectCurrentData, ThrowOnError>) {
|
|
|
+ public current<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<ProjectCurrentData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).get<ProjectCurrentResponses, unknown, ThrowOnError>({
|
|
|
url: "/project/current",
|
|
|
...options,
|
|
|
@@ -196,8 +200,14 @@ class Config extends _HeyApiClient {
|
|
|
/**
|
|
|
* Update config
|
|
|
*/
|
|
|
- public update<ThrowOnError extends boolean = false>(options?: Options<ConfigUpdateData, ThrowOnError>) {
|
|
|
- return (options?.client ?? this._client).patch<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError>({
|
|
|
+ public update<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<ConfigUpdateData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options?.client ?? this._client).patch<
|
|
|
+ ConfigUpdateResponses,
|
|
|
+ ConfigUpdateErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/config",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -210,7 +220,9 @@ class Config extends _HeyApiClient {
|
|
|
/**
|
|
|
* List all providers
|
|
|
*/
|
|
|
- public providers<ThrowOnError extends boolean = false>(options?: Options<ConfigProvidersData, ThrowOnError>) {
|
|
|
+ public providers<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<ConfigProvidersData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).get<ConfigProvidersResponses, unknown, ThrowOnError>({
|
|
|
url: "/config/providers",
|
|
|
...options,
|
|
|
@@ -256,7 +268,9 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* List all sessions
|
|
|
*/
|
|
|
- public list<ThrowOnError extends boolean = false>(options?: Options<SessionListData, ThrowOnError>) {
|
|
|
+ public list<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<SessionListData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).get<SessionListResponses, unknown, ThrowOnError>({
|
|
|
url: "/session",
|
|
|
...options,
|
|
|
@@ -266,8 +280,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Create a new session
|
|
|
*/
|
|
|
- public create<ThrowOnError extends boolean = false>(options?: Options<SessionCreateData, ThrowOnError>) {
|
|
|
- return (options?.client ?? this._client).post<SessionCreateResponses, SessionCreateErrors, ThrowOnError>({
|
|
|
+ public create<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<SessionCreateData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options?.client ?? this._client).post<
|
|
|
+ SessionCreateResponses,
|
|
|
+ SessionCreateErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -280,8 +300,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Delete a session and all its data
|
|
|
*/
|
|
|
- public delete<ThrowOnError extends boolean = false>(options: Options<SessionDeleteData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).delete<SessionDeleteResponses, SessionDeleteErrors, ThrowOnError>({
|
|
|
+ public delete<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionDeleteData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).delete<
|
|
|
+ SessionDeleteResponses,
|
|
|
+ SessionDeleteErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -291,7 +317,11 @@ class Session extends _HeyApiClient {
|
|
|
* Get session
|
|
|
*/
|
|
|
public get<ThrowOnError extends boolean = false>(options: Options<SessionGetData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).get<SessionGetResponses, SessionGetErrors, ThrowOnError>({
|
|
|
+ return (options.client ?? this._client).get<
|
|
|
+ SessionGetResponses,
|
|
|
+ SessionGetErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -300,8 +330,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Update session properties
|
|
|
*/
|
|
|
- public update<ThrowOnError extends boolean = false>(options: Options<SessionUpdateData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).patch<SessionUpdateResponses, SessionUpdateErrors, ThrowOnError>({
|
|
|
+ public update<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionUpdateData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).patch<
|
|
|
+ SessionUpdateResponses,
|
|
|
+ SessionUpdateErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -314,8 +350,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Get a session's children
|
|
|
*/
|
|
|
- public children<ThrowOnError extends boolean = false>(options: Options<SessionChildrenData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).get<SessionChildrenResponses, SessionChildrenErrors, ThrowOnError>({
|
|
|
+ public children<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionChildrenData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).get<
|
|
|
+ SessionChildrenResponses,
|
|
|
+ SessionChildrenErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/children",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -324,8 +366,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Get the todo list for a session
|
|
|
*/
|
|
|
- public todo<ThrowOnError extends boolean = false>(options: Options<SessionTodoData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).get<SessionTodoResponses, SessionTodoErrors, ThrowOnError>({
|
|
|
+ public todo<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionTodoData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).get<
|
|
|
+ SessionTodoResponses,
|
|
|
+ SessionTodoErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/todo",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -334,8 +382,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Analyze the app and create an AGENTS.md file
|
|
|
*/
|
|
|
- public init<ThrowOnError extends boolean = false>(options: Options<SessionInitData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionInitResponses, SessionInitErrors, ThrowOnError>({
|
|
|
+ public init<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionInitData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionInitResponses,
|
|
|
+ SessionInitErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/init",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -348,7 +402,9 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Fork an existing session at a specific message
|
|
|
*/
|
|
|
- public fork<ThrowOnError extends boolean = false>(options: Options<SessionForkData, ThrowOnError>) {
|
|
|
+ public fork<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionForkData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options.client ?? this._client).post<SessionForkResponses, unknown, ThrowOnError>({
|
|
|
url: "/session/{id}/fork",
|
|
|
...options,
|
|
|
@@ -362,8 +418,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Abort a session
|
|
|
*/
|
|
|
- public abort<ThrowOnError extends boolean = false>(options: Options<SessionAbortData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionAbortResponses, SessionAbortErrors, ThrowOnError>({
|
|
|
+ public abort<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionAbortData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionAbortResponses,
|
|
|
+ SessionAbortErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/abort",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -372,8 +434,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Unshare the session
|
|
|
*/
|
|
|
- public unshare<ThrowOnError extends boolean = false>(options: Options<SessionUnshareData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).delete<SessionUnshareResponses, SessionUnshareErrors, ThrowOnError>({
|
|
|
+ public unshare<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionUnshareData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).delete<
|
|
|
+ SessionUnshareResponses,
|
|
|
+ SessionUnshareErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/share",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -382,8 +450,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Share a session
|
|
|
*/
|
|
|
- public share<ThrowOnError extends boolean = false>(options: Options<SessionShareData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionShareResponses, SessionShareErrors, ThrowOnError>({
|
|
|
+ public share<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionShareData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionShareResponses,
|
|
|
+ SessionShareErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/share",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -392,7 +466,9 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Get the diff that resulted from this user message
|
|
|
*/
|
|
|
- public diff<ThrowOnError extends boolean = false>(options: Options<SessionDiffData, ThrowOnError>) {
|
|
|
+ public diff<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionDiffData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options.client ?? this._client).get<SessionDiffResponses, unknown, ThrowOnError>({
|
|
|
url: "/session/{id}/diff",
|
|
|
...options,
|
|
|
@@ -402,8 +478,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Summarize the session
|
|
|
*/
|
|
|
- public summarize<ThrowOnError extends boolean = false>(options: Options<SessionSummarizeData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionSummarizeResponses, SessionSummarizeErrors, ThrowOnError>({
|
|
|
+ public summarize<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionSummarizeData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionSummarizeResponses,
|
|
|
+ SessionSummarizeErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/summarize",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -416,8 +498,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* List messages for a session
|
|
|
*/
|
|
|
- public messages<ThrowOnError extends boolean = false>(options: Options<SessionMessagesData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).get<SessionMessagesResponses, SessionMessagesErrors, ThrowOnError>({
|
|
|
+ public messages<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionMessagesData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).get<
|
|
|
+ SessionMessagesResponses,
|
|
|
+ SessionMessagesErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/message",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -426,8 +514,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Create and send a new message to a session
|
|
|
*/
|
|
|
- public prompt<ThrowOnError extends boolean = false>(options: Options<SessionPromptData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionPromptResponses, SessionPromptErrors, ThrowOnError>({
|
|
|
+ public prompt<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionPromptData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionPromptResponses,
|
|
|
+ SessionPromptErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/message",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -440,8 +534,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Get a message from a session
|
|
|
*/
|
|
|
- public message<ThrowOnError extends boolean = false>(options: Options<SessionMessageData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).get<SessionMessageResponses, SessionMessageErrors, ThrowOnError>({
|
|
|
+ public message<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionMessageData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).get<
|
|
|
+ SessionMessageResponses,
|
|
|
+ SessionMessageErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/message/{messageID}",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -450,8 +550,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Send a new command to a session
|
|
|
*/
|
|
|
- public command<ThrowOnError extends boolean = false>(options: Options<SessionCommandData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionCommandResponses, SessionCommandErrors, ThrowOnError>({
|
|
|
+ public command<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionCommandData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionCommandResponses,
|
|
|
+ SessionCommandErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/command",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -464,8 +570,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Run a shell command
|
|
|
*/
|
|
|
- public shell<ThrowOnError extends boolean = false>(options: Options<SessionShellData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionShellResponses, SessionShellErrors, ThrowOnError>({
|
|
|
+ public shell<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionShellData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionShellResponses,
|
|
|
+ SessionShellErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/shell",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -478,8 +590,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Revert a message
|
|
|
*/
|
|
|
- public revert<ThrowOnError extends boolean = false>(options: Options<SessionRevertData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionRevertResponses, SessionRevertErrors, ThrowOnError>({
|
|
|
+ public revert<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionRevertData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionRevertResponses,
|
|
|
+ SessionRevertErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/revert",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -492,8 +610,14 @@ class Session extends _HeyApiClient {
|
|
|
/**
|
|
|
* Restore all reverted messages
|
|
|
*/
|
|
|
- public unrevert<ThrowOnError extends boolean = false>(options: Options<SessionUnrevertData, ThrowOnError>) {
|
|
|
- return (options.client ?? this._client).post<SessionUnrevertResponses, SessionUnrevertErrors, ThrowOnError>({
|
|
|
+ public unrevert<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<SessionUnrevertData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options.client ?? this._client).post<
|
|
|
+ SessionUnrevertResponses,
|
|
|
+ SessionUnrevertErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/session/{id}/unrevert",
|
|
|
...options,
|
|
|
})
|
|
|
@@ -504,7 +628,9 @@ class Command extends _HeyApiClient {
|
|
|
/**
|
|
|
* List all commands
|
|
|
*/
|
|
|
- public list<ThrowOnError extends boolean = false>(options?: Options<CommandListData, ThrowOnError>) {
|
|
|
+ public list<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<CommandListData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).get<CommandListResponses, unknown, ThrowOnError>({
|
|
|
url: "/command",
|
|
|
...options,
|
|
|
@@ -526,7 +652,9 @@ class Find extends _HeyApiClient {
|
|
|
/**
|
|
|
* Find files
|
|
|
*/
|
|
|
- public files<ThrowOnError extends boolean = false>(options: Options<FindFilesData, ThrowOnError>) {
|
|
|
+ public files<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<FindFilesData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options.client ?? this._client).get<FindFilesResponses, unknown, ThrowOnError>({
|
|
|
url: "/find/file",
|
|
|
...options,
|
|
|
@@ -536,7 +664,9 @@ class Find extends _HeyApiClient {
|
|
|
/**
|
|
|
* Find workspace symbols
|
|
|
*/
|
|
|
- public symbols<ThrowOnError extends boolean = false>(options: Options<FindSymbolsData, ThrowOnError>) {
|
|
|
+ public symbols<ThrowOnError extends boolean = false>(
|
|
|
+ options: Options<FindSymbolsData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options.client ?? this._client).get<FindSymbolsResponses, unknown, ThrowOnError>({
|
|
|
url: "/find/symbol",
|
|
|
...options,
|
|
|
@@ -568,7 +698,9 @@ class File extends _HeyApiClient {
|
|
|
/**
|
|
|
* Get file status
|
|
|
*/
|
|
|
- public status<ThrowOnError extends boolean = false>(options?: Options<FileStatusData, ThrowOnError>) {
|
|
|
+ public status<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<FileStatusData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).get<FileStatusResponses, unknown, ThrowOnError>({
|
|
|
url: "/file/status",
|
|
|
...options,
|
|
|
@@ -594,7 +726,9 @@ class App extends _HeyApiClient {
|
|
|
/**
|
|
|
* List all agents
|
|
|
*/
|
|
|
- public agents<ThrowOnError extends boolean = false>(options?: Options<AppAgentsData, ThrowOnError>) {
|
|
|
+ public agents<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<AppAgentsData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).get<AppAgentsResponses, unknown, ThrowOnError>({
|
|
|
url: "/agent",
|
|
|
...options,
|
|
|
@@ -606,7 +740,9 @@ class Mcp extends _HeyApiClient {
|
|
|
/**
|
|
|
* Get MCP server status
|
|
|
*/
|
|
|
- public status<ThrowOnError extends boolean = false>(options?: Options<McpStatusData, ThrowOnError>) {
|
|
|
+ public status<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<McpStatusData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).get<McpStatusResponses, unknown, ThrowOnError>({
|
|
|
url: "/mcp",
|
|
|
...options,
|
|
|
@@ -618,8 +754,14 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Append prompt to the TUI
|
|
|
*/
|
|
|
- public appendPrompt<ThrowOnError extends boolean = false>(options?: Options<TuiAppendPromptData, ThrowOnError>) {
|
|
|
- return (options?.client ?? this._client).post<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError>({
|
|
|
+ public appendPrompt<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiAppendPromptData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options?.client ?? this._client).post<
|
|
|
+ TuiAppendPromptResponses,
|
|
|
+ TuiAppendPromptErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/tui/append-prompt",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -632,7 +774,9 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Open the help dialog
|
|
|
*/
|
|
|
- public openHelp<ThrowOnError extends boolean = false>(options?: Options<TuiOpenHelpData, ThrowOnError>) {
|
|
|
+ public openHelp<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiOpenHelpData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).post<TuiOpenHelpResponses, unknown, ThrowOnError>({
|
|
|
url: "/tui/open-help",
|
|
|
...options,
|
|
|
@@ -642,7 +786,9 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Open the session dialog
|
|
|
*/
|
|
|
- public openSessions<ThrowOnError extends boolean = false>(options?: Options<TuiOpenSessionsData, ThrowOnError>) {
|
|
|
+ public openSessions<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiOpenSessionsData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).post<TuiOpenSessionsResponses, unknown, ThrowOnError>({
|
|
|
url: "/tui/open-sessions",
|
|
|
...options,
|
|
|
@@ -652,7 +798,9 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Open the theme dialog
|
|
|
*/
|
|
|
- public openThemes<ThrowOnError extends boolean = false>(options?: Options<TuiOpenThemesData, ThrowOnError>) {
|
|
|
+ public openThemes<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiOpenThemesData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).post<TuiOpenThemesResponses, unknown, ThrowOnError>({
|
|
|
url: "/tui/open-themes",
|
|
|
...options,
|
|
|
@@ -662,7 +810,9 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Open the model dialog
|
|
|
*/
|
|
|
- public openModels<ThrowOnError extends boolean = false>(options?: Options<TuiOpenModelsData, ThrowOnError>) {
|
|
|
+ public openModels<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiOpenModelsData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).post<TuiOpenModelsResponses, unknown, ThrowOnError>({
|
|
|
url: "/tui/open-models",
|
|
|
...options,
|
|
|
@@ -672,7 +822,9 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Submit the prompt
|
|
|
*/
|
|
|
- public submitPrompt<ThrowOnError extends boolean = false>(options?: Options<TuiSubmitPromptData, ThrowOnError>) {
|
|
|
+ public submitPrompt<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiSubmitPromptData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).post<TuiSubmitPromptResponses, unknown, ThrowOnError>({
|
|
|
url: "/tui/submit-prompt",
|
|
|
...options,
|
|
|
@@ -682,7 +834,9 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Clear the prompt
|
|
|
*/
|
|
|
- public clearPrompt<ThrowOnError extends boolean = false>(options?: Options<TuiClearPromptData, ThrowOnError>) {
|
|
|
+ public clearPrompt<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiClearPromptData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).post<TuiClearPromptResponses, unknown, ThrowOnError>({
|
|
|
url: "/tui/clear-prompt",
|
|
|
...options,
|
|
|
@@ -692,8 +846,14 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Execute a TUI command (e.g. agent_cycle)
|
|
|
*/
|
|
|
- public executeCommand<ThrowOnError extends boolean = false>(options?: Options<TuiExecuteCommandData, ThrowOnError>) {
|
|
|
- return (options?.client ?? this._client).post<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError>({
|
|
|
+ public executeCommand<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiExecuteCommandData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options?.client ?? this._client).post<
|
|
|
+ TuiExecuteCommandResponses,
|
|
|
+ TuiExecuteCommandErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/tui/execute-command",
|
|
|
...options,
|
|
|
headers: {
|
|
|
@@ -706,7 +866,9 @@ class Tui extends _HeyApiClient {
|
|
|
/**
|
|
|
* Show a toast notification in the TUI
|
|
|
*/
|
|
|
- public showToast<ThrowOnError extends boolean = false>(options?: Options<TuiShowToastData, ThrowOnError>) {
|
|
|
+ public showToast<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<TuiShowToastData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
return (options?.client ?? this._client).post<TuiShowToastResponses, unknown, ThrowOnError>({
|
|
|
url: "/tui/show-toast",
|
|
|
...options,
|
|
|
@@ -738,8 +900,14 @@ class Event extends _HeyApiClient {
|
|
|
/**
|
|
|
* Get events
|
|
|
*/
|
|
|
- public subscribe<ThrowOnError extends boolean = false>(options?: Options<EventSubscribeData, ThrowOnError>) {
|
|
|
- return (options?.client ?? this._client).get.sse<EventSubscribeResponses, unknown, ThrowOnError>({
|
|
|
+ public subscribe<ThrowOnError extends boolean = false>(
|
|
|
+ options?: Options<EventSubscribeData, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ return (options?.client ?? this._client).get.sse<
|
|
|
+ EventSubscribeResponses,
|
|
|
+ unknown,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
url: "/event",
|
|
|
...options,
|
|
|
})
|