createProjectTaskBoardItem()
This method operates on actor project task board items and their related data.
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 projectId: string = 'projectid-123'; const request: CreateProjectTaskBoardItemRequest = { title: 'Investigate login issue', }; return client.ai.createProjectTaskBoardItem(projectId, request);}Signature
function createProjectTaskBoardItem( projectId: string, request: CreateProjectTaskBoardItemRequest, client?: WachtClient,): Promise<ProjectTaskBoardItem>Parameters
›projectId: string;
projectId: string;Target actor project id.
›request: CreateProjectTaskBoardItemRequest;
request: CreateProjectTaskBoardItemRequest;Request payload object sent to the backend API.
›title?: string | undefined;
title?: string | undefined;title value used by this request.
Return value
›id?: string | undefined;
id?: string | undefined;Task board item id.
›status?: string | undefined;
status?: string | undefined;Task board item status.
›title?: string | undefined;
title?: string | undefined;Task board item title.
Examples
AI usage pattern
import { wachtClient } from '@wacht/nextjs/server';export async function createAndInspectBoardItem(projectId: string) { const client = await wachtClient(); const item = await client.ai.createProjectTaskBoardItem(projectId, { title: 'Investigate incident' }); const events = await client.ai.listProjectTaskBoardItemEvents(projectId, item.id); return { item, events };}