tui: add session search functionality with debounced input and server-side filtering
This commit is contained in:
parent
cdd6ea514b
commit
7304ba616e
9 changed files with 79 additions and 12 deletions
|
|
@ -774,10 +774,25 @@ export class Session extends HeyApiClient {
|
|||
public list<ThrowOnError extends boolean = false>(
|
||||
parameters?: {
|
||||
directory?: string
|
||||
start?: number
|
||||
search?: string
|
||||
limit?: number
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }])
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "query", key: "directory" },
|
||||
{ in: "query", key: "start" },
|
||||
{ in: "query", key: "search" },
|
||||
{ in: "query", key: "limit" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).get<SessionListResponses, unknown, ThrowOnError>({
|
||||
url: "/session",
|
||||
...options,
|
||||
|
|
|
|||
|
|
@ -2508,6 +2508,18 @@ export type SessionListData = {
|
|||
path?: never
|
||||
query?: {
|
||||
directory?: string
|
||||
/**
|
||||
* Filter sessions updated on or after this timestamp (milliseconds since epoch)
|
||||
*/
|
||||
start?: number
|
||||
/**
|
||||
* Filter sessions by title (case-insensitive)
|
||||
*/
|
||||
search?: string
|
||||
/**
|
||||
* Maximum number of sessions to return
|
||||
*/
|
||||
limit?: number
|
||||
}
|
||||
url: "/session"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue