|
|
@@ -107,6 +107,8 @@ import type {
|
|
|
SessionCreateErrors,
|
|
|
SessionCreateResponses,
|
|
|
SessionDeleteErrors,
|
|
|
+ SessionDeleteMessageErrors,
|
|
|
+ SessionDeleteMessageResponses,
|
|
|
SessionDeleteResponses,
|
|
|
SessionDiffResponses,
|
|
|
SessionForkResponses,
|
|
|
@@ -1561,6 +1563,42 @@ export class Session2 extends HeyApiClient {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Delete message
|
|
|
+ *
|
|
|
+ * Permanently delete a specific message (and all of its parts) from a session. This does not revert any file changes that may have been made while processing the message.
|
|
|
+ */
|
|
|
+ public deleteMessage<ThrowOnError extends boolean = false>(
|
|
|
+ parameters: {
|
|
|
+ sessionID: string
|
|
|
+ messageID: string
|
|
|
+ directory?: string
|
|
|
+ },
|
|
|
+ options?: Options<never, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ const params = buildClientParams(
|
|
|
+ [parameters],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ args: [
|
|
|
+ { in: "path", key: "sessionID" },
|
|
|
+ { in: "path", key: "messageID" },
|
|
|
+ { in: "query", key: "directory" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ return (options?.client ?? this.client).delete<
|
|
|
+ SessionDeleteMessageResponses,
|
|
|
+ SessionDeleteMessageErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
+ url: "/session/{sessionID}/message/{messageID}",
|
|
|
+ ...options,
|
|
|
+ ...params,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Get message
|
|
|
*
|