searchActorProjects()
This method performs cursor-based search across projects for one actor.
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 example() { const client = await wachtClient(); const actorId: string = 'actorid-123'; const options: { q?: string; limit?: number; cursor?: string } = { q: 'support', limit: 20, }; return client.ai.searchActorProjects(actorId, options);}Signature
function searchActorProjects( actorId: string, options: { q?: string; limit?: number; cursor?: string }, client?: WachtClient,): Promise<CursorPage<ActorProject>>Parameters
›actorId: string;
actorId: string;Actor id used for actor-scoped AI endpoints.
›options: { q?: string; limit?: number; cursor?: string };
options: { q?: string; limit?: number; cursor?: string };Optional query/filter object used to shape list/search behavior.
›q?: string | undefined;
q?: string | undefined;q value used by this request.
›limit?: number | undefined;
limit?: number | undefined;limit value used by this request.
Return value
›data?: ActorProject[] | undefined;
data?: ActorProject[] | undefined;Current page result items.
›next_cursor?: string | undefined;
next_cursor?: string | undefined;Cursor token for the next page.
Examples
AI usage pattern
import { wachtClient } from '@wacht/nextjs/server';export async function searchProjects(actorId: string, cursor?: string) { const client = await wachtClient(); return client.ai.searchActorProjects(actorId, { q: 'support', limit: 20, cursor, });}