chore: generate
This commit is contained in:
@@ -333,6 +333,8 @@ import type {
|
|||||||
V2QuestionRequestListResponses,
|
V2QuestionRequestListResponses,
|
||||||
V2ReferenceListErrors,
|
V2ReferenceListErrors,
|
||||||
V2ReferenceListResponses,
|
V2ReferenceListResponses,
|
||||||
|
V2SessionActiveErrors,
|
||||||
|
V2SessionActiveResponses,
|
||||||
V2SessionCompactErrors,
|
V2SessionCompactErrors,
|
||||||
V2SessionCompactResponses,
|
V2SessionCompactResponses,
|
||||||
V2SessionContextErrors,
|
V2SessionContextErrors,
|
||||||
@@ -5501,6 +5503,18 @@ export class Session3 extends HeyApiClient {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List active sessions
|
||||||
|
*
|
||||||
|
* Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.
|
||||||
|
*/
|
||||||
|
public active<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) {
|
||||||
|
return (options?.client ?? this.client).get<V2SessionActiveResponses, V2SessionActiveErrors, ThrowOnError>({
|
||||||
|
url: "/api/session/active",
|
||||||
|
...options,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get session
|
* Get session
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2690,6 +2690,10 @@ export type InvalidCursorError = {
|
|||||||
message: string
|
message: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SessionActive = {
|
||||||
|
type: "running"
|
||||||
|
}
|
||||||
|
|
||||||
export type SessionNotFoundError = {
|
export type SessionNotFoundError = {
|
||||||
_tag: "SessionNotFoundError"
|
_tag: "SessionNotFoundError"
|
||||||
sessionID: string
|
sessionID: string
|
||||||
@@ -11940,6 +11944,39 @@ export type V2SessionCreateResponses = {
|
|||||||
|
|
||||||
export type V2SessionCreateResponse = V2SessionCreateResponses[keyof V2SessionCreateResponses]
|
export type V2SessionCreateResponse = V2SessionCreateResponses[keyof V2SessionCreateResponses]
|
||||||
|
|
||||||
|
export type V2SessionActiveData = {
|
||||||
|
body?: never
|
||||||
|
path?: never
|
||||||
|
query?: never
|
||||||
|
url: "/api/session/active"
|
||||||
|
}
|
||||||
|
|
||||||
|
export type V2SessionActiveErrors = {
|
||||||
|
/**
|
||||||
|
* InvalidRequestError
|
||||||
|
*/
|
||||||
|
400: InvalidRequestError
|
||||||
|
/**
|
||||||
|
* UnauthorizedError
|
||||||
|
*/
|
||||||
|
401: UnauthorizedError
|
||||||
|
}
|
||||||
|
|
||||||
|
export type V2SessionActiveError = V2SessionActiveErrors[keyof V2SessionActiveErrors]
|
||||||
|
|
||||||
|
export type V2SessionActiveResponses = {
|
||||||
|
/**
|
||||||
|
* Success
|
||||||
|
*/
|
||||||
|
200: {
|
||||||
|
data: {
|
||||||
|
[key: string]: unknown | SessionActive
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export type V2SessionActiveResponse = V2SessionActiveResponses[keyof V2SessionActiveResponses]
|
||||||
|
|
||||||
export type V2SessionGetData = {
|
export type V2SessionGetData = {
|
||||||
body?: never
|
body?: never
|
||||||
path: {
|
path: {
|
||||||
|
|||||||
@@ -10187,6 +10187,66 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/session/active": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["sessions"],
|
||||||
|
"operationId": "v2.session.active",
|
||||||
|
"parameters": [],
|
||||||
|
"security": [],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "object",
|
||||||
|
"patternProperties": {
|
||||||
|
"^ses": {
|
||||||
|
"$ref": "#/components/schemas/SessionActive"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["data"],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "InvalidRequestError",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/InvalidRequestError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "UnauthorizedError",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/UnauthorizedError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
|
||||||
|
"summary": "List active sessions",
|
||||||
|
"x-codeSamples": [
|
||||||
|
{
|
||||||
|
"lang": "js",
|
||||||
|
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.active({\n ...\n})"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/session/{sessionID}": {
|
"/api/session/{sessionID}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": ["sessions"],
|
"tags": ["sessions"],
|
||||||
@@ -23445,6 +23505,17 @@
|
|||||||
"required": ["_tag", "message"],
|
"required": ["_tag", "message"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
|
"SessionActive": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["running"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["type"],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
"SessionNotFoundError": {
|
"SessionNotFoundError": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
Reference in New Issue
Block a user