Namespaces
task
Methods and types of the `task` namespace (`client.task` / `bot.task`).
Interfaces
AcknowledgeAllTasksResponse
Properties
| Property | Type | Description |
|---|---|---|
acknowledged | number | Number of tasks that were acknowledged by this call. |
unacknowledgedCount | UnacknowledgedTaskCountResponse | The user's remaining unacknowledged count for the project (should be all-zero). |
BulkCreateTaskResult
Properties
| Property | Type |
|---|---|
clientId | string |
error? | { code: string; message: string; } |
error.code | string |
error.message | string |
status | "error" | "created" |
task? | Task |
BulkCreateTasksRequest
Properties
| Property | Type | Description |
|---|---|---|
announce? | { chatId: string; messageId: string; } | When present, the server posts a single Nu reply in the chat after the batch creates, threaded as replyToId = messageId and carrying every newly-created task as a taskCard. Replaces the standalone ai.announceTasksFromMessage endpoint we shipped previously. |
announce.chatId | string | - |
announce.messageId | string | - |
projectId | string | - |
tasks | BulkTaskDraft[] | - |
BulkCreateTasksResponse
Properties
| Property | Type |
|---|---|
announce? | { messageId: string | null; posted: boolean; } |
announce.messageId | string | null |
announce.posted | boolean |
results | BulkCreateTaskResult[] |
BulkTaskDraft
One task draft in a bulkCreate request.
Properties
GetTaskEventsParams
Properties
GetTasksBaseParams
Extends
Extended by
Properties
| Property | Type | Inherited from |
|---|---|---|
acknowledged? | boolean | - |
creatorId? | string | - |
limit? | number | - |
projectId? | string | - |
relatedToId? | string | - |
sort? | Record<string, -1 | 1> | SortParams.sort |
visibility? | TaskVisibility | - |
GetTasksCursorParams
Extends
Properties
| Property | Type | Inherited from |
|---|---|---|
acknowledged? | boolean | GetTasksBaseParams.acknowledged |
creatorId? | string | GetTasksBaseParams.creatorId |
cursor? | string | - |
includeCounts? | boolean | - |
includeCursorRecord? | boolean | - |
includeStartAtRecord? | boolean | - |
limit? | number | GetTasksBaseParams.limit |
paginate | "cursor" | - |
paginateReverse? | boolean | - |
projectId? | string | GetTasksBaseParams.projectId |
relatedToId? | string | GetTasksBaseParams.relatedToId |
sort? | Record<string, -1 | 1> | GetTasksBaseParams.sort |
startAt? | string | - |
visibility? | TaskVisibility | GetTasksBaseParams.visibility |
GetTasksIndexParams
Extends
Properties
| Property | Type | Inherited from |
|---|---|---|
acknowledged? | boolean | GetTasksBaseParams.acknowledged |
createdAfter? | string | number | - |
createdBefore? | string | number | - |
creatorId? | string | GetTasksBaseParams.creatorId |
limit? | number | GetTasksBaseParams.limit |
page? | number | - |
paginate? | "index" | - |
projectId? | string | GetTasksBaseParams.projectId |
relatedToId? | string | GetTasksBaseParams.relatedToId |
sort? | Record<string, -1 | 1> | GetTasksBaseParams.sort |
visibility? | TaskVisibility | GetTasksBaseParams.visibility |
SortParams
Extended by
Properties
TaskEvent
Properties
| Property | Type |
|---|---|
actor | TaskEventActor | null |
createdAt | string |
detail? | Record<string, unknown> |
eventType | string |
id | string |
projectId | string |
taskId | string |
TaskEventActor
Properties
| Property | Type |
|---|---|
avatar? | unknown |
color? | string |
displayName? | string |
firstName? | string |
id | string |
lastName? | string |
UnacknowledgedTaskCountResponse
Properties
UpdateTaskStatusData
Properties
| Property | Type |
|---|---|
status | TaskStatus |
Type Aliases
GetTaskEventsResponse
type GetTaskEventsResponse = PaginatedResponse<TaskEvent>;GetTasksParams
type GetTasksParams =
| GetTasksIndexParams
| GetTasksCursorParams;GetTasksResponse
type GetTasksResponse = PaginatedResponse<Task>;PaginatedResponse
type PaginatedResponse<T> = PaginatedResult | CursorPaginatedResult & {
results?: T[];
};Type Declaration
| Name | Type |
|---|---|
results? | T[] |
Type Parameters
| Type Parameter |
|---|
T |
TaskStatus
type TaskStatus = "pending" | "complete" | "cancelled";TaskVisibility
type TaskVisibility = "creator" | "reviewer";Functions
default()
function default(client): {
acknowledgeAllTasks: Promise<AcknowledgeAllTasksResponse>;
acknowledgeTask: Promise<Task>;
bulkCreate: Promise<BulkCreateTasksResponse>;
deleteTask: Promise<void>;
followTask: Promise<Task>;
getMyTasks: Promise<GetTasksResponse>;
getTaskEvents: Promise<GetTaskEventsResponse>;
getTaskLinks: Promise<TaskLink[]>;
getUnacknowledgedTaskCount: Promise<UnacknowledgedTaskCountResponse>;
linkTask: Promise<TaskLink>;
tagTask: Promise<Task>;
unfollowTask: Promise<Task>;
unlinkTask: Promise<void>;
untagTask: Promise<Task>;
updateTaskDetails: Promise<Task>;
updateTaskStatus: Promise<Task>;
};Defines task-related methods for the NuramaClient.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | default | The NuramaClient instance. |
Returns
An object containing the task-related methods.
| Name | Type | Description |
|---|---|---|
acknowledgeAllTasks() | (projectId) => Promise<AcknowledgeAllTasksResponse> | Acknowledge every unacknowledged mention-task the current user has in a project. Idempotent server-side. |
acknowledgeTask() | (taskId) => Promise<Task> | Toggles the acknowledgement status of a specific task. Requires authentication and permission. |
bulkCreate() | (data) => Promise<BulkCreateTasksResponse> | Bulk-create one or more tasks under a single project in a single round-trip. Per-task partial success is returned in results[]; if announce is set and at least one task creates, the server also posts a Nu reply linking the new tasks back to the source message and rendering them as inline taskCards. |
deleteTask() | (taskId) => Promise<void> | Permanently delete a task. Gated server-side by canRemove{Visibility}BoardTask for at least one of the parent board's visibility tiers (see boardPermission('Remove', 'BoardTask')). Returns void; the server responds with 204 No Content. |
followTask() | (taskId) => Promise<Task> | Add the calling user to a task's followers list. Idempotent server-side — following an already-followed task is a no-op and still returns the current task. |
getMyTasks() | (params?) => Promise<GetTasksResponse> | Retrieves tasks assigned to the currently authenticated user. Supports filtering, sorting, and both index and cursor pagination. |
getTaskEvents() | (taskId, params?) => Promise<GetTaskEventsResponse> | Retrieves the event log for a specific task. Returns paginated events in reverse chronological order with populated actor info. |
getTaskLinks() | (taskId) => Promise<TaskLink[]> | List the tasks linked to a task, with the relation type of each link. Throws 'taskId is required.' when taskId is falsy. |
getUnacknowledgedTaskCount() | (projectId) => Promise<UnacknowledgedTaskCountResponse> | Retrieves the count of unacknowledged tasks for the current user within a specific project. Requires authentication. |
linkTask() | (taskId, data) => Promise<TaskLink> | Link two tasks with a typed relation (related, blocks, blockedBy, duplicate). The link is symmetrical: both tasks reflect the relationship. Throws 'taskId is required.' or 'linkedTaskId is required.'. |
tagTask() | (taskId, tagId) => Promise<Task> | Attach a project tag to a task. Throws 'taskId is required.' or 'tagId is required.'. |
unfollowTask() | (taskId) => Promise<Task> | Remove the calling user from a task's followers list. Idempotent server-side — unfollowing a task you don't follow is a no-op and still returns the current task. |
unlinkTask() | (taskId, linkedTaskId) => Promise<void> | Remove a task-to-task link. Throws 'taskId is required.' or 'linkedTaskId is required.'. |
untagTask() | (taskId, tagId) => Promise<Task> | Detach a project tag from a task. Throws 'taskId is required.' or 'tagId is required.'. |
updateTaskDetails() | (taskId, data) => Promise<Task> | Update a board task's subject, description, assignee or status. Requires the boards capability and board-task write permission. Throws 'taskId is required.' when taskId is falsy. |
updateTaskStatus() | (taskId, data) => Promise<Task> | Updates the status of a specific task. Requires authentication and permission. |