|
|
@@ -37,6 +37,8 @@ import type {
|
|
|
SessionChatResponses,
|
|
|
SessionMessageData,
|
|
|
SessionMessageResponses,
|
|
|
+ SessionShellData,
|
|
|
+ SessionShellResponses,
|
|
|
SessionRevertData,
|
|
|
SessionRevertResponses,
|
|
|
SessionUnrevertData,
|
|
|
@@ -332,6 +334,20 @@ 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, unknown, ThrowOnError>({
|
|
|
+ url: "/session/{id}/shell",
|
|
|
+ ...options,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ ...options.headers,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Revert a message
|
|
|
*/
|