feat(api): get session and session children routes

This commit is contained in:
adamdotdevin
2025-08-15 08:49:19 -05:00
parent 9609c1803e
commit 1ae38c90a3
8 changed files with 134 additions and 4 deletions

View File

@@ -21,6 +21,8 @@ import type {
SessionGetResponses,
SessionUpdateData,
SessionUpdateResponses,
SessionChildrenData,
SessionChildrenResponses,
SessionInitData,
SessionInitResponses,
SessionAbortData,
@@ -247,6 +249,16 @@ class Session extends _HeyApiClient {
})
}
/**
* Get a session's children
*/
public children<ThrowOnError extends boolean = false>(options: Options<SessionChildrenData, ThrowOnError>) {
return (options.client ?? this._client).get<SessionChildrenResponses, unknown, ThrowOnError>({
url: "/session/{id}/children",
...options,
})
}
/**
* Analyze the app and create an AGENTS.md file
*/