feat: /tui/show-toast api
This commit is contained in:
@@ -77,6 +77,8 @@ import type {
|
||||
TuiClearPromptResponses,
|
||||
TuiExecuteCommandData,
|
||||
TuiExecuteCommandResponses,
|
||||
TuiShowToastData,
|
||||
TuiShowToastResponses,
|
||||
AuthSetData,
|
||||
AuthSetResponses,
|
||||
AuthSetErrors,
|
||||
@@ -518,6 +520,20 @@ class Tui extends _HeyApiClient {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a toast notification in the TUI
|
||||
*/
|
||||
public showToast<ThrowOnError extends boolean = false>(options?: Options<TuiShowToastData, ThrowOnError>) {
|
||||
return (options?.client ?? this._client).post<TuiShowToastResponses, unknown, ThrowOnError>({
|
||||
url: "/tui/show-toast",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
class Auth extends _HeyApiClient {
|
||||
|
||||
Reference in New Issue
Block a user