Namespaces
taskRelation
Methods and types of the `taskRelation` namespace (`client.taskRelation` / `bot.taskRelation`).
Interfaces
PaginatedTaskRelations
Properties
| Property | Type |
|---|---|
hasNextPage? | boolean |
hasPrevPage? | boolean |
limit | number |
page | number |
results | TaskRelation[] |
totalPages | number |
totalResults | number |
TaskRelation
Properties
| Property | Type |
|---|---|
asset? | any |
chat? | | { chatType: string; id: string; publicId?: string | null; subject?: string | null; topicId: string; topicType: string; visibility: string; } | null |
createdAt | string |
creatorId | string |
id | string |
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 |
resourceId | string |
resourceType | RelationResourceType |
submission? | | { id: string; name: string; } | null |
taskId | string |
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
| Parameter | Type |
|---|---|
client | default |
Returns
| Name | Type | Description |
|---|---|---|
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. |