release: v0.4.40

This commit is contained in:
opencode
2025-08-12 21:51:19 +00:00
parent 482239b848
commit 296cc41a07
11 changed files with 45 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/sdk",
"version": "0.4.37",
"version": "0.4.40",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit"

View File

@@ -19,6 +19,8 @@ import type {
SessionDeleteResponses,
SessionGetData,
SessionGetResponses,
SessionUpdateData,
SessionUpdateResponses,
SessionInitData,
SessionInitResponses,
SessionAbortData,
@@ -224,6 +226,20 @@ class Session extends _HeyApiClient {
})
}
/**
* Update session properties
*/
public update<ThrowOnError extends boolean = false>(options: Options<SessionUpdateData, ThrowOnError>) {
return (options.client ?? this._client).patch<SessionUpdateResponses, unknown, ThrowOnError>({
url: "/session/{id}",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
})
}
/**
* Analyze the app and create an AGENTS.md file
*/

View File

@@ -1240,6 +1240,26 @@ export type SessionGetResponses = {
export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses]
export type SessionUpdateData = {
body?: {
title?: string
}
path: {
id: string
}
query?: never
url: "/session/{id}"
}
export type SessionUpdateResponses = {
/**
* Successfully updated session
*/
200: Session
}
export type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses]
export type SessionInitData = {
body?: {
messageID: string