Unique identifier for the activity, generated by Uuid.Generate(). Specifying an ID allows tools to track and upsert activities.
Canonical URL for the item in an external system. For example, https://acme.atlassian.net/browse/PROJ-42 could represent a Jira issue. When set, it uniquely identifies the activity within a priority tree. This performs an upsert.
Explicit priority (required when specified) - disables automatic priority matching
OptionalpickPriority?: PickPriorityConfigConfiguration for automatic priority selection based on similarity
Optionalauthor?: NewActorThe person that created the item. By default, it will be the twist itself.
Optionalassignee?: NewActor | nullThe person that assigned to the item.
Optionaltags?: NewTagsAll tags to set on the new activity.
Optionalunread?: booleanWhether the activity should be marked as unread for users.
Use false for historical imports to avoid marking old items as unread.
// "Do Now" - Assigned to twist owner, actionable immediately
const urgentTask: NewActivity = {
type: ActivityType.Action,
title: "Review pull request"
// start omitted → defaults to now
// assignee omitted → defaults to twist owner
};
// "Do Someday" - UNASSIGNED backlog item (for synced tasks)
const backlogTask: NewActivity = {
type: ActivityType.Action,
title: "Refactor user service",
start: null, // Must explicitly set to null
assignee: null // Must explicitly set to null
};
// "Do Later" - Scheduled for specific date
const futureTask: NewActivity = {
type: ActivityType.Action,
title: "Prepare Q1 review",
start: new Date("2025-03-15")
};
// Note (typically unscheduled)
const note: NewActivity = {
type: ActivityType.Note,
title: "Meeting notes",
content: "Discussed Q4 roadmap...",
start: null // Notes typically don't have scheduled times
};
// Event (always has explicit start/end times)
const event: NewActivity = {
type: ActivityType.Event,
title: "Team standup",
start: new Date("2025-01-15T10:00:00"),
end: new Date("2025-01-15T10:30:00")
};
Type for creating new activities.
Requires only the activity type, with all other fields optional. The author will be automatically assigned by the Plot system based on the current execution context. The ID can be optionally provided by tools for tracking and update detection purposes.
Important: Defaults for Actions
When creating an Activity of type
Action:startomitted → Defaults to current time (now) → "Do Now"assigneeomitted → Defaults to twist owner → Assigned actionTo create unassigned backlog items (common for synced tasks), you MUST explicitly set BOTH:
start: null→ "Do Someday" (unscheduled)assignee: null→ UnassignedScheduling States:
startor set to current timestartto a future Datestart: nullPriority can be specified in three ways:
priority: { id: "..." }- Use specific priority (disables pickPriority)pickPriority: { ... }- Auto-select based on similaritypickPriority: { content: true }for automatic matching