diff options
Diffstat (limited to 'packages/sdk/js/src')
| -rw-r--r-- | packages/sdk/js/src/gen/sdk.gen.ts | 39 | ||||
| -rw-r--r-- | packages/sdk/js/src/gen/types.gen.ts | 40 |
2 files changed, 79 insertions, 0 deletions
diff --git a/packages/sdk/js/src/gen/sdk.gen.ts b/packages/sdk/js/src/gen/sdk.gen.ts index 42e575dc2..5eb12b0f5 100644 --- a/packages/sdk/js/src/gen/sdk.gen.ts +++ b/packages/sdk/js/src/gen/sdk.gen.ts @@ -125,6 +125,10 @@ import type { TuiExecuteCommandErrors, TuiShowToastData, TuiShowToastResponses, + TuiControlNextData, + TuiControlNextResponses, + TuiControlResponseData, + TuiControlResponseResponses, AuthSetData, AuthSetResponses, AuthSetErrors, @@ -750,6 +754,40 @@ class Mcp extends _HeyApiClient { } } +class Control extends _HeyApiClient { + /** + * Get the next TUI request from the queue + */ + public next<ThrowOnError extends boolean = false>( + options?: Options<TuiControlNextData, ThrowOnError>, + ) { + return (options?.client ?? this._client).get<TuiControlNextResponses, unknown, ThrowOnError>({ + url: "/tui/control/next", + ...options, + }) + } + + /** + * Submit a response to the TUI request queue + */ + public response<ThrowOnError extends boolean = false>( + options?: Options<TuiControlResponseData, ThrowOnError>, + ) { + return (options?.client ?? this._client).post< + TuiControlResponseResponses, + unknown, + ThrowOnError + >({ + url: "/tui/control/response", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, + }, + }) + } +} + class Tui extends _HeyApiClient { /** * Append prompt to the TUI @@ -878,6 +916,7 @@ class Tui extends _HeyApiClient { }, }) } + control = new Control({ client: this._client }) } class Auth extends _HeyApiClient { diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index 0b8948c57..14343f5a1 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -2632,6 +2632,46 @@ export type TuiShowToastResponses = { export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses] +export type TuiControlNextData = { + body?: never + path?: never + query?: { + directory?: string + } + url: "/tui/control/next" +} + +export type TuiControlNextResponses = { + /** + * Next TUI request + */ + 200: { + path: string + body: unknown + } +} + +export type TuiControlNextResponse = TuiControlNextResponses[keyof TuiControlNextResponses] + +export type TuiControlResponseData = { + body?: unknown + path?: never + query?: { + directory?: string + } + url: "/tui/control/response" +} + +export type TuiControlResponseResponses = { + /** + * Response submitted successfully + */ + 200: boolean +} + +export type TuiControlResponseResponse = + TuiControlResponseResponses[keyof TuiControlResponseResponses] + export type AuthSetData = { body?: Auth path: { |
