Nurama Developers
Namespaces

taskRelation

Methods and types of the `taskRelation` namespace (`client.taskRelation` / `bot.taskRelation`).

Interfaces

PaginatedTaskRelations

Properties

PropertyType
hasNextPage?boolean
hasPrevPage?boolean
limitnumber
pagenumber
resultsTaskRelation[]
totalPagesnumber
totalResultsnumber

TaskRelation

Properties

PropertyType
asset?any
chat?| { chatType: string; id: string; publicId?: string | null; subject?: string | null; topicId: string; topicType: string; visibility: string; } | null
createdAtstring
creatorIdstring
idstring
message?| { assetMentions: string[]; author: any; authorId: string | null; chatId: string; content: string | null; createdAt: string; folderMentions: string[]; id: string; mentions: string[]; } | null
publicLink?| { id: string; name: string; } | null
relatedBy?any
resourceIdstring
resourceTypeRelationResourceType
submission?| { id: string; name: string; } | null
taskIdstring

Type Aliases

RelationResourceType

type RelationResourceType = "chat" | "chatMessage";

Functions

default()

function default(client): {
  createTaskRelation: Promise<TaskRelation>;
  deleteTaskRelation: Promise<void>;
  getRelationsForChat: Promise<PaginatedTaskRelations>;
  getRelationsForMessage: Promise<PaginatedTaskRelations>;
  getTaskRelations: Promise<PaginatedTaskRelations>;
};

Parameters

ParameterType
clientdefault

Returns

NameTypeDescription
createTaskRelation()(taskId, data) => Promise<TaskRelation>Attach a related resource (chat message, chat, etc.) to a task, so the task surface shows the originating context.
deleteTaskRelation()(taskId, relationId) => Promise<void>Detach a related resource from a task.
getRelationsForChat()(chatId, params?) => Promise<PaginatedTaskRelations>List task relations referencing a chat (reverse lookup).
getRelationsForMessage()(messageId, params?) => Promise<PaginatedTaskRelations>List task relations referencing a specific chat message (reverse lookup).
getTaskRelations()(taskId, params?) => Promise<PaginatedTaskRelations>List the relations attached to a task — chat messages, chats, or other resources that reference this task as context.

On this page