|
|
@@ -47,6 +47,11 @@ import type {
|
|
|
McpLocalConfig,
|
|
|
McpRemoteConfig,
|
|
|
McpStatusResponses,
|
|
|
+ Part as Part2,
|
|
|
+ PartDeleteErrors,
|
|
|
+ PartDeleteResponses,
|
|
|
+ PartUpdateErrors,
|
|
|
+ PartUpdateResponses,
|
|
|
PathGetResponses,
|
|
|
PermissionRespondErrors,
|
|
|
PermissionRespondResponses,
|
|
|
@@ -1486,6 +1491,79 @@ export class Session extends HeyApiClient {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+export class Part extends HeyApiClient {
|
|
|
+ /**
|
|
|
+ * Delete a part from a message
|
|
|
+ */
|
|
|
+ public delete<ThrowOnError extends boolean = false>(
|
|
|
+ parameters: {
|
|
|
+ sessionID: string
|
|
|
+ messageID: string
|
|
|
+ partID: string
|
|
|
+ directory?: string
|
|
|
+ },
|
|
|
+ options?: Options<never, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ const params = buildClientParams(
|
|
|
+ [parameters],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ args: [
|
|
|
+ { in: "path", key: "sessionID" },
|
|
|
+ { in: "path", key: "messageID" },
|
|
|
+ { in: "path", key: "partID" },
|
|
|
+ { in: "query", key: "directory" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ return (options?.client ?? this.client).delete<PartDeleteResponses, PartDeleteErrors, ThrowOnError>({
|
|
|
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
|
|
|
+ ...options,
|
|
|
+ ...params,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Update a part in a message
|
|
|
+ */
|
|
|
+ public update<ThrowOnError extends boolean = false>(
|
|
|
+ parameters: {
|
|
|
+ sessionID: string
|
|
|
+ messageID: string
|
|
|
+ partID: string
|
|
|
+ directory?: string
|
|
|
+ part?: Part2
|
|
|
+ },
|
|
|
+ options?: Options<never, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ const params = buildClientParams(
|
|
|
+ [parameters],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ args: [
|
|
|
+ { in: "path", key: "sessionID" },
|
|
|
+ { in: "path", key: "messageID" },
|
|
|
+ { in: "path", key: "partID" },
|
|
|
+ { in: "query", key: "directory" },
|
|
|
+ { key: "part", map: "body" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ return (options?.client ?? this.client).patch<PartUpdateResponses, PartUpdateErrors, ThrowOnError>({
|
|
|
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
|
|
|
+ ...options,
|
|
|
+ ...params,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ ...options?.headers,
|
|
|
+ ...params.headers,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export class Permission extends HeyApiClient {
|
|
|
/**
|
|
|
* Respond to permission
|
|
|
@@ -2588,6 +2666,8 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
|
|
|
session = new Session({ client: this.client })
|
|
|
|
|
|
+ part = new Part({ client: this.client })
|
|
|
+
|
|
|
permission = new Permission({ client: this.client })
|
|
|
|
|
|
command = new Command({ client: this.client })
|