feat: background blocking tools
This commit is contained in:
parent
a10733dbf4
commit
e2bca216a2
15 changed files with 392 additions and 66 deletions
|
|
@ -43,6 +43,8 @@ import type {
|
|||
SessionEventsOutput,
|
||||
SessionInterruptInput,
|
||||
SessionInterruptOutput,
|
||||
SessionBackgroundInput,
|
||||
SessionBackgroundOutput,
|
||||
SessionMessageInput,
|
||||
SessionMessageOutput,
|
||||
MessageListInput,
|
||||
|
|
@ -561,6 +563,17 @@ export function make(options: ClientOptions) {
|
|||
},
|
||||
requestOptions,
|
||||
),
|
||||
background: (input: SessionBackgroundInput, requestOptions?: RequestOptions) =>
|
||||
request<SessionBackgroundOutput>(
|
||||
{
|
||||
method: "POST",
|
||||
path: `/api/session/${encodeURIComponent(input.sessionID)}/background`,
|
||||
successStatus: 204,
|
||||
declaredStatuses: [404, 400, 401],
|
||||
empty: true,
|
||||
},
|
||||
requestOptions,
|
||||
),
|
||||
message: (input: SessionMessageInput, requestOptions?: RequestOptions) =>
|
||||
request<{ readonly data: SessionMessageOutput }>(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1775,6 +1775,10 @@ export type SessionInterruptInput = { readonly sessionID: { readonly sessionID:
|
|||
|
||||
export type SessionInterruptOutput = void
|
||||
|
||||
export type SessionBackgroundInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }
|
||||
|
||||
export type SessionBackgroundOutput = void
|
||||
|
||||
export type SessionMessageInput = {
|
||||
readonly sessionID: { readonly sessionID: string; readonly messageID: string }["sessionID"]
|
||||
readonly messageID: { readonly sessionID: string; readonly messageID: string }["messageID"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue