listProjectThreads()
Returns project threads in a paginated response with optional archived filtering.
Usage
The following example shows a basic usage of the backend client from @wacht/nextjs/server.
import { wachtClient } from '@wacht/nextjs/server';export async function listProjectThreads(projectId: string) { const client = await wachtClient(); return client.ai.listProjectThreads(projectId, false);}Signature
function listProjectThreads( projectId: string, includeArchived?: boolean,): Promise<PaginatedResponse<AgentThread>>Parameters
›projectId?: string | undefined;
projectId?: string | undefined;Project id that owns the threads.
›includeArchived?: boolean | undefined;
includeArchived?: boolean | undefined;When true, include archived threads.
Return value
›data?: AgentThread[] | undefined;
data?: AgentThread[] | undefined;Thread rows in the current page.
›has_more?: boolean | undefined;
has_more?: boolean | undefined;Whether another page exists.
›limit?: number | undefined;
limit?: number | undefined;Effective page size from backend response.
›offset?: number | undefined;
offset?: number | undefined;Effective page offset from backend response.
Behavior
- Returns a backend-scoped list response for this resource.
- Use pagination and filters from this method to build admin list views.