Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(ticktick): add AI actions and output schemas (#16049)

Kishan Parmar7ddcdb0b5ab7
diff --git a/packages/pieces/community/ticktick/package.json b/packages/pieces/community/ticktick/package.json
index 4616a336162..f2776d26e8a 100644
--- a/packages/pieces/community/ticktick/package.json
+++ b/packages/pieces/community/ticktick/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-ticktick",
- "version": "0.2.1",
+ "version": "0.3.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
diff --git a/packages/pieces/community/ticktick/src/index.ts b/packages/pieces/community/ticktick/src/index.ts
index e06a29ea0fa..07f73494fea 100644
--- a/packages/pieces/community/ticktick/src/index.ts
+++ b/packages/pieces/community/ticktick/src/index.ts
@@ -7,12 +7,59 @@ import { findTaskAction } from './lib/actions/find-task';
import { getProjectAction } from './lib/actions/get-project-by-id';
import { getTaskAction } from './lib/actions/get-task';
import { updateTaskAction } from './lib/actions/update-task';
+import { listProjectsAction } from './lib/actions/ai/list-projects';
+import { getProjectAiAction } from './lib/actions/ai/get-project';
+import { getProjectDataAction } from './lib/actions/ai/get-project-data';
+import { listProjectMembersAction } from './lib/actions/ai/list-project-members';
+import { createProjectAction } from './lib/actions/ai/create-project';
+import { updateProjectAction } from './lib/actions/ai/update-project';
+import { deleteProjectAction } from './lib/actions/ai/delete-project';
+import { listProjectGroupsAction } from './lib/actions/ai/list-project-groups';
+import { createProjectGroupAction } from './lib/actions/ai/create-project-group';
+import { updateProjectGroupAction } from './lib/actions/ai/update-project-group';
+import { deleteProjectGroupAction } from './lib/actions/ai/delete-project-group';
+import { listColumnsAction } from './lib/actions/ai/list-columns';
+import { createColumnAction } from './lib/actions/ai/create-column';
+import { updateColumnAction } from './lib/actions/ai/update-column';
+import { getTaskAiAction } from './lib/actions/ai/get-task';
+import { createTaskAiAction } from './lib/actions/ai/create-task';
+import { updateTaskAiAction } from './lib/actions/ai/update-task';
+import { completeTaskAiAction } from './lib/actions/ai/complete-task';
+import { deleteTaskAiAction } from './lib/actions/ai/delete-task';
+import { listTasksAction } from './lib/actions/ai/list-tasks';
+import { searchTasksAction } from './lib/actions/ai/search-tasks';
+import { listCompletedTasksAction } from './lib/actions/ai/list-completed-tasks';
+import { listUndoneTasksAction } from './lib/actions/ai/list-undone-tasks';
+import { completeTasksAction } from './lib/actions/ai/complete-tasks';
+import { moveTasksAction } from './lib/actions/ai/move-tasks';
+import { batchSaveTasksAction } from './lib/actions/ai/batch-save-tasks';
+import { assignTaskAction } from './lib/actions/ai/assign-task';
+import { unassignTaskAction } from './lib/actions/ai/unassign-task';
+import { listTaskCommentsAction } from './lib/actions/ai/list-task-comments';
+import { addTaskCommentAction } from './lib/actions/ai/add-task-comment';
+import { deleteTaskCommentAction } from './lib/actions/ai/delete-task-comment';
+import { listTagsAction } from './lib/actions/ai/list-tags';
+import { createTagAction } from './lib/actions/ai/create-tag';
+import { listCountdownsAction } from './lib/actions/ai/list-countdowns';
+import { getUserPreferencesAction } from './lib/actions/ai/get-user-preferences';
+import { listFocusesAction } from './lib/actions/ai/list-focuses';
+import { getFocusAction } from './lib/actions/ai/get-focus';
+import { createFocusAction } from './lib/actions/ai/create-focus';
+import { deleteFocusAction } from './lib/actions/ai/delete-focus';
+import { listHabitsAction } from './lib/actions/ai/list-habits';
+import { listHabitSectionsAction } from './lib/actions/ai/list-habit-sections';
+import { getHabitAction } from './lib/actions/ai/get-habit';
+import { createHabitAction } from './lib/actions/ai/create-habit';
+import { updateHabitAction } from './lib/actions/ai/update-habit';
+import { checkinHabitAction } from './lib/actions/ai/checkin-habit';
+import { listHabitCheckinsAction } from './lib/actions/ai/list-habit-checkins';
import { newTaskCreatedTrigger } from './lib/triggers/new-task-created';
import { ticktickAuth } from './lib/auth';
export const ticktick = createPiece({
displayName: 'TickTick',
logoUrl: 'https://cdn.activepieces.com/pieces/ticktick.png',
+ minimumSupportedRelease: '0.88.2',
auth: ticktickAuth,
authors: ['onyedikachi-david', 'kishanprmr'],
actions: [
@@ -23,6 +70,52 @@ export const ticktick = createPiece({
completeTaskAction,
findTaskAction,
getProjectAction,
+ listProjectsAction,
+ getProjectAiAction,
+ getProjectDataAction,
+ listProjectMembersAction,
+ createProjectAction,
+ updateProjectAction,
+ deleteProjectAction,
+ listProjectGroupsAction,
+ createProjectGroupAction,
+ updateProjectGroupAction,
+ deleteProjectGroupAction,
+ listColumnsAction,
+ createColumnAction,
+ updateColumnAction,
+ getTaskAiAction,
+ createTaskAiAction,
+ updateTaskAiAction,
+ completeTaskAiAction,
+ deleteTaskAiAction,
+ listTasksAction,
+ searchTasksAction,
+ listCompletedTasksAction,
+ listUndoneTasksAction,
+ completeTasksAction,
+ moveTasksAction,
+ batchSaveTasksAction,
+ assignTaskAction,
+ unassignTaskAction,
+ listTaskCommentsAction,
+ addTaskCommentAction,
+ deleteTaskCommentAction,
+ listTagsAction,
+ createTagAction,
+ listCountdownsAction,
+ getUserPreferencesAction,
+ listFocusesAction,
+ getFocusAction,
+ createFocusAction,
+ deleteFocusAction,
+ listHabitsAction,
+ listHabitSectionsAction,
+ getHabitAction,
+ createHabitAction,
+ updateHabitAction,
+ checkinHabitAction,
+ listHabitCheckinsAction,
createCustomApiCallAction({
auth:ticktickAuth,
baseUrl:()=>'https://api.ticktick.com/open/v1',
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/add-task-comment.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/add-task-comment.ts
new file mode 100644
index 00000000000..b852a17d740
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/add-task-comment.ts
@@ -0,0 +1,45 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickAddTaskCommentOutputSchema } from '../../output-schemas';
+
+export const addTaskCommentAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_add_task_comment',
+ outputSchema: ticktickAddTaskCommentOutputSchema,
+ displayName: 'Add Task Comment',
+ description: 'Adds a comment to a task.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Adds a comment to a task by projectId and taskId and returns it with its id. Not idempotent: calling twice adds the comment twice.',
+ idempotent: false,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project containing the task.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ title: Property.LongText({
+ displayName: 'Comment',
+ description: 'The comment text.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, taskId, title } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/project/${projectId}/task/${taskId}/comment`,
+ body: { title },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/assign-task.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/assign-task.ts
new file mode 100644
index 00000000000..8574f455bc0
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/assign-task.ts
@@ -0,0 +1,45 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickAssignTaskOutputSchema } from '../../output-schemas';
+
+export const assignTaskAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_assign_task',
+ outputSchema: ticktickAssignTaskOutputSchema,
+ displayName: 'Assign Task',
+ description: 'Assigns a task to a member of its project.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Assigns a task to a project member by username (from ticktick_list_project_members). The assignee must be a member of the task\'s project. Sets state, so repeating it is safe. Use ticktick_unassign_task to remove the assignee.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project containing the task.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ assigneeUsername: Property.ShortText({
+ displayName: 'Assignee Username',
+ description: 'Username of a project member, from the List Project Members action.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, taskId, assigneeUsername } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/assign',
+ body: { projectId, taskId, assigneeUsername },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/batch-save-tasks.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/batch-save-tasks.ts
new file mode 100644
index 00000000000..5645bde4659
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/batch-save-tasks.ts
@@ -0,0 +1,76 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickBatchSaveTasksOutputSchema } from '../../output-schemas';
+
+export const batchSaveTasksAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_batch_save_tasks',
+ outputSchema: ticktickBatchSaveTasksOutputSchema,
+ displayName: 'Batch Create or Update Tasks',
+ description: 'Creates and updates many tasks in a single request.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates up to 50 tasks (add) and updates up to 50 tasks (update) in one call. Each add item needs title and projectId; each update item needs id and projectId. Returns id2etag for saved tasks and failed (task id to error code) for rejected ones. Not idempotent because add creates new tasks.',
+ idempotent: false,
+ },
+ props: {
+ add: Property.Json({
+ displayName: 'Tasks to Create',
+ description: 'Array of up to 50 tasks, each like {"title": "New task", "projectId": "..."}.',
+ required: false,
+ }),
+ update: Property.Json({
+ displayName: 'Tasks to Update',
+ description: 'Array of up to 50 tasks, each like {"id": "...", "projectId": "...", "title": "..."}.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { add, update } = context.propsValue;
+ const addList = toTaskList({ value: add, label: 'Tasks to Create' });
+ const updateList = toTaskList({ value: update, label: 'Tasks to Update' });
+ if (addList.length === 0 && updateList.length === 0) {
+ throw new Error('Provide at least one task to create or update.');
+ }
+ const response = await tickTickApiCall<{
+ id2etag?: Record<string, string>;
+ id2error?: Record<string, string>;
+ }>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/batch',
+ body: {
+ ...(addList.length > 0 ? { add: addList } : {}),
+ ...(updateList.length > 0 ? { update: updateList } : {}),
+ },
+ });
+ const id2etag = response.id2etag ?? {};
+ const failed = Object.entries(response.id2error ?? {}).map(([taskId, error]) => ({
+ taskId,
+ error,
+ }));
+ return {
+ success: failed.length === 0,
+ savedCount: Object.keys(id2etag).length,
+ id2etag,
+ failed,
+ };
+ },
+});
+
+function toTaskList({ value, label }: { value: unknown; label: string }): unknown[] {
+ if (value === undefined || value === null || value === '') {
+ return [];
+ }
+ if (!Array.isArray(value)) {
+ throw new Error(`${label} must be an array of tasks.`);
+ }
+ if (value.length > 50) {
+ throw new Error(`${label} supports at most 50 tasks.`);
+ }
+ return value;
+}
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/checkin-habit.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/checkin-habit.ts
new file mode 100644
index 00000000000..350861f97ba
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/checkin-habit.ts
@@ -0,0 +1,61 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickCheckinHabitOutputSchema } from '../../output-schemas';
+
+export const checkinHabitAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_checkin_habit',
+ outputSchema: ticktickCheckinHabitOutputSchema,
+ displayName: 'Check In Habit',
+ description: 'Creates or updates the check-in of a habit for one date.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Records a check-in for a habit (habitId from ticktick_list_habits) on one date given as a YYYYMMDD stamp, with an optional value and goal (both default to 1). Creates the check-in or overwrites the one for that date, so repeating it is safe.',
+ idempotent: true,
+ },
+ props: {
+ habitId: Property.ShortText({
+ displayName: 'Habit ID',
+ description: 'The habit ID, from the List Habits action.',
+ required: true,
+ }),
+ stamp: Property.Number({
+ displayName: 'Date',
+ description: 'The check-in date as YYYYMMDD, for example 20260407.',
+ required: true,
+ }),
+ time: Property.DateTime({
+ displayName: 'Check-in Time',
+ required: false,
+ }),
+ value: Property.Number({
+ displayName: 'Value',
+ description: 'Check-in value. Defaults to 1.',
+ required: false,
+ }),
+ goal: Property.Number({
+ displayName: 'Goal',
+ description: 'Check-in goal. Defaults to 1.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { habitId, stamp, time, value, goal } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/habit/${habitId}/checkin`,
+ body: {
+ stamp,
+ ...(time ? { time: taskFields.formatDate({ value: time }) } : {}),
+ ...(value !== undefined ? { value } : {}),
+ ...(goal !== undefined ? { goal } : {}),
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/complete-task.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/complete-task.ts
new file mode 100644
index 00000000000..d9eda76e0b2
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/complete-task.ts
@@ -0,0 +1,40 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCompleteTaskOutputSchema } from '../../output-schemas';
+
+export const completeTaskAiAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_complete_task',
+ outputSchema: ticktickCompleteTaskOutputSchema,
+ displayName: 'Complete Task',
+ description: 'Marks a TickTick task as completed.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Marks one task completed by projectId and taskId. Use ticktick_complete_tasks for several tasks in one project. Setting an already-completed task again is harmless.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project the task belongs to. Use "inbox" for the Inbox.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, taskId } = context.propsValue;
+ await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/project/${projectId}/task/${taskId}/complete`,
+ });
+ return { success: true, projectId, taskId };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/complete-tasks.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/complete-tasks.ts
new file mode 100644
index 00000000000..c0f9e1114e2
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/complete-tasks.ts
@@ -0,0 +1,52 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickCompleteTasksOutputSchema } from '../../output-schemas';
+
+export const completeTasksAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_complete_tasks',
+ outputSchema: ticktickCompleteTasksOutputSchema,
+ displayName: 'Complete Multiple Tasks',
+ description: 'Completes up to 50 tasks in one project.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Completes up to 50 tasks that all belong to one project. projectId defaults to the Inbox when omitted. Returns the ids actually completed; ids missing from that list were not. Re-applying is harmless.',
+ idempotent: true,
+ },
+ props: {
+ taskIds: Property.Array({
+ displayName: 'Task IDs',
+ description: 'Up to 50 task IDs, all in the same project.',
+ required: true,
+ }),
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project the tasks belong to. Defaults to the Inbox.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { taskIds, projectId } = context.propsValue;
+ const taskIdList = taskFields.toStringArray({ value: taskIds }) ?? [];
+ if (taskIdList.length === 0 || taskIdList.length > 50) {
+ throw new Error('Task IDs must contain between 1 and 50 ids.');
+ }
+ const completedTaskIds = await tickTickApiCall<string[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/completeTasks',
+ body: { taskIds: taskIdList, ...(projectId ? { projectId } : {}) },
+ });
+ return {
+ success: completedTaskIds.length === taskIdList.length,
+ completedTaskIds,
+ completedCount: completedTaskIds.length,
+ notCompletedTaskIds: taskIdList.filter((id) => !completedTaskIds.includes(id)),
+ };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/create-column.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/create-column.ts
new file mode 100644
index 00000000000..8f448181010
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/create-column.ts
@@ -0,0 +1,41 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateColumnOutputSchema } from '../../output-schemas';
+
+export const createColumnAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_create_column',
+ outputSchema: ticktickCreateColumnOutputSchema,
+ displayName: 'Create Column',
+ description: 'Creates a kanban column in a TickTick project.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Adds a column to a kanban project and returns it with its id. Kanban projects only. Not idempotent, and the API has no delete-column endpoint, so check ticktick_list_columns first.',
+ idempotent: false,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The kanban project ID, from the List Projects action.',
+ required: true,
+ }),
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The column name (max 1000 characters).',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, name } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/project/${projectId}/column`,
+ body: { name },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/create-focus.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/create-focus.ts
new file mode 100644
index 00000000000..3958c4f5471
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/create-focus.ts
@@ -0,0 +1,77 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickCreateFocusOutputSchema } from '../../output-schemas';
+
+export const createFocusAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_create_focus',
+ outputSchema: ticktickCreateFocusOutputSchema,
+ displayName: 'Create Focus Record',
+ description: 'Logs a focus (pomodoro or timing) record.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Logs a focus session, optionally tied to a task (taskId) with start/end time, duration in seconds and a note. Returns it with its id. Not idempotent: each call logs a new record.',
+ idempotent: false,
+ },
+ props: {
+ type: Property.StaticDropdown({
+ displayName: 'Type',
+ required: true,
+ options: {
+ options: [
+ { label: 'Pomodoro', value: 0 },
+ { label: 'Timing', value: 1 },
+ ],
+ },
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: false,
+ }),
+ note: Property.LongText({
+ displayName: 'Note',
+ description: 'Focus note (max 5000 characters).',
+ required: false,
+ }),
+ startTime: Property.DateTime({
+ displayName: 'Start Time',
+ required: false,
+ }),
+ endTime: Property.DateTime({
+ displayName: 'End Time',
+ required: false,
+ }),
+ pauseDuration: Property.Number({
+ displayName: 'Pause Duration',
+ description: 'Pause duration in seconds.',
+ required: false,
+ }),
+ duration: Property.Number({
+ displayName: 'Duration',
+ description: 'Focus duration in seconds.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { type, taskId, note, startTime, endTime, pauseDuration, duration } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/focus',
+ body: {
+ type,
+ ...(taskId ? { taskId } : {}),
+ ...(note ? { note } : {}),
+ ...(startTime ? { startTime: taskFields.formatDate({ value: startTime }) } : {}),
+ ...(endTime ? { endTime: taskFields.formatDate({ value: endTime }) } : {}),
+ ...(pauseDuration !== undefined ? { pauseDuration } : {}),
+ ...(duration !== undefined ? { duration } : {}),
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/create-habit.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/create-habit.ts
new file mode 100644
index 00000000000..60eccaecf20
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/create-habit.ts
@@ -0,0 +1,37 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { habitFields } from '../../common/habit-fields';
+import { ticktickCreateHabitOutputSchema } from '../../output-schemas';
+
+export const createHabitAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_create_habit',
+ outputSchema: ticktickCreateHabitOutputSchema,
+ displayName: 'Create Habit',
+ description: 'Creates a new habit.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a habit and returns it with its id. Check ticktick_list_habits first to avoid duplicates. Not idempotent, and the API has no delete-habit endpoint.',
+ idempotent: false,
+ },
+ props: {
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The habit name (max 1000 characters).',
+ required: true,
+ }),
+ ...habitFields.habitFieldProps(),
+ },
+ async run(context) {
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/habit',
+ body: habitFields.buildHabitFields({ values: context.propsValue }),
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/create-project-group.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/create-project-group.ts
new file mode 100644
index 00000000000..06af3a2e7a8
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/create-project-group.ts
@@ -0,0 +1,35 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateProjectGroupOutputSchema } from '../../output-schemas';
+
+export const createProjectGroupAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_create_project_group',
+ outputSchema: ticktickCreateProjectGroupOutputSchema,
+ displayName: 'Create Project Group',
+ description: 'Creates a new project group (folder).',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a project group and returns it with its id. Not idempotent: check ticktick_list_project_groups first to avoid duplicates.',
+ idempotent: false,
+ },
+ props: {
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The group name (max 64 characters).',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/project/group',
+ body: { name: context.propsValue.name },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/create-project.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/create-project.ts
new file mode 100644
index 00000000000..df50bde37d6
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/create-project.ts
@@ -0,0 +1,63 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { TICKTICK_PROJECT_KIND_OPTIONS, TICKTICK_VIEW_MODE_OPTIONS } from '../../common/constants';
+import { ticktickCreateProjectOutputSchema } from '../../output-schemas';
+
+export const createProjectAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_create_project',
+ outputSchema: ticktickCreateProjectOutputSchema,
+ displayName: 'Create Project',
+ description: 'Creates a new TickTick project (list).',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a project and returns it with its new id. Not idempotent: calling twice creates two projects, so check ticktick_list_projects first when unsure. Use viewMode "kanban" if you plan to add columns.',
+ idempotent: false,
+ },
+ props: {
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The project name.',
+ required: true,
+ }),
+ color: Property.ShortText({
+ displayName: 'Color',
+ description: 'Hex color, for example "#F18181".',
+ required: false,
+ }),
+ sortOrder: Property.Number({
+ displayName: 'Sort Order',
+ description: 'Sort order value of the project.',
+ required: false,
+ }),
+ viewMode: Property.StaticDropdown({
+ displayName: 'View Mode',
+ required: false,
+ options: TICKTICK_VIEW_MODE_OPTIONS,
+ }),
+ kind: Property.StaticDropdown({
+ displayName: 'Kind',
+ required: false,
+ options: TICKTICK_PROJECT_KIND_OPTIONS,
+ }),
+ },
+ async run(context) {
+ const { name, color, sortOrder, viewMode, kind } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/project',
+ body: {
+ name,
+ ...(color !== undefined ? { color } : {}),
+ ...(sortOrder !== undefined ? { sortOrder } : {}),
+ ...(viewMode !== undefined ? { viewMode } : {}),
+ ...(kind !== undefined ? { kind } : {}),
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/create-tag.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/create-tag.ts
new file mode 100644
index 00000000000..1733dd737dd
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/create-tag.ts
@@ -0,0 +1,39 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateTagOutputSchema } from '../../output-schemas';
+
+export const createTagAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_create_tag',
+ outputSchema: ticktickCreateTagOutputSchema,
+ displayName: 'Create Tag',
+ description: 'Creates a tag.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a tag with the given label; its name is the label lowercased and trimmed. Check ticktick_list_tags first to avoid duplicates. Not idempotent, and the API has no delete-tag endpoint.',
+ idempotent: false,
+ },
+ props: {
+ label: Property.ShortText({
+ displayName: 'Label',
+ description: 'The tag label (max 64 characters).',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const label = context.propsValue.label.trim();
+ if (label.length === 0 || label.length > 64) {
+ throw new Error('Label must be between 1 and 64 characters.');
+ }
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/tag',
+ body: { name: label.toLowerCase(), label },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/create-task.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/create-task.ts
new file mode 100644
index 00000000000..b60ef2288b1
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/create-task.ts
@@ -0,0 +1,42 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickCreateTaskOutputSchema } from '../../output-schemas';
+
+export const createTaskAiAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_create_task',
+ outputSchema: ticktickCreateTaskOutputSchema,
+ displayName: 'Create Task',
+ description: 'Creates a new task in a TickTick project.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a task in a project (projectId from ticktick_list_projects, or "inbox") and returns it with its id. Supports dates, time zone, reminders, tags, repeat rule, priority and subtasks. Not idempotent: each call creates a new task, so search first when unsure. Use ticktick_batch_save_tasks for many tasks.',
+ idempotent: false,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project to create the task in. Use "inbox" for the Inbox.',
+ required: true,
+ }),
+ title: Property.ShortText({
+ displayName: 'Title',
+ required: true,
+ }),
+ ...taskFields.taskFieldProps(),
+ },
+ async run(context) {
+ const { projectId, ...values } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task',
+ body: { projectId, ...taskFields.buildTaskFields({ values }) },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/delete-focus.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-focus.ts
new file mode 100644
index 00000000000..f0c6adf1e17
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-focus.ts
@@ -0,0 +1,46 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateFocusOutputSchema } from '../../output-schemas';
+
+export const deleteFocusAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_delete_focus',
+ outputSchema: ticktickCreateFocusOutputSchema,
+ displayName: 'Delete Focus Record',
+ description: 'Deletes a focus record.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a focus record by focusId from ticktick_list_focuses; the type must match the record. Returns the deleted record. Confirm the target before calling.',
+ idempotent: true,
+ },
+ props: {
+ focusId: Property.ShortText({
+ displayName: 'Focus ID',
+ description: 'The focus record ID, from the List Focus Records action.',
+ required: true,
+ }),
+ type: Property.StaticDropdown({
+ displayName: 'Type',
+ required: true,
+ options: {
+ options: [
+ { label: 'Pomodoro', value: 0 },
+ { label: 'Timing', value: 1 },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { focusId, type } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.DELETE,
+ resourceUri: `/focus/${focusId}`,
+ query: { type },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/delete-project-group.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-project-group.ts
new file mode 100644
index 00000000000..313998c9990
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-project-group.ts
@@ -0,0 +1,36 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickDeleteProjectGroupOutputSchema } from '../../output-schemas';
+
+export const deleteProjectGroupAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_delete_project_group',
+ outputSchema: ticktickDeleteProjectGroupOutputSchema,
+ displayName: 'Delete Project Group',
+ description: 'Deletes a project group.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a project group by projectGroupId from ticktick_list_project_groups. Confirm the target before calling.',
+ idempotent: true,
+ },
+ props: {
+ projectGroupId: Property.ShortText({
+ displayName: 'Project Group ID',
+ description: 'The group ID, from the List Project Groups action.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectGroupId } = context.propsValue;
+ await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.DELETE,
+ resourceUri: `/project/group/${projectGroupId}`,
+ });
+ return { success: true, projectGroupId };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/delete-project.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-project.ts
new file mode 100644
index 00000000000..b9cc5f1a745
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-project.ts
@@ -0,0 +1,36 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickDeleteProjectOutputSchema } from '../../output-schemas';
+
+export const deleteProjectAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_delete_project',
+ outputSchema: ticktickDeleteProjectOutputSchema,
+ displayName: 'Delete Project',
+ description: 'Deletes a TickTick project.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a project by projectId from ticktick_list_projects, including the tasks inside it. Confirm the target before calling.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project ID, from the List Projects action.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId } = context.propsValue;
+ await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.DELETE,
+ resourceUri: `/project/${projectId}`,
+ });
+ return { success: true, projectId };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/delete-task-comment.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-task-comment.ts
new file mode 100644
index 00000000000..51e1dc8ecbc
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-task-comment.ts
@@ -0,0 +1,45 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickDeleteTaskCommentOutputSchema } from '../../output-schemas';
+
+export const deleteTaskCommentAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_delete_task_comment',
+ outputSchema: ticktickDeleteTaskCommentOutputSchema,
+ displayName: 'Delete Task Comment',
+ description: 'Deletes a comment from a task.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Permanently deletes a comment by its id (from ticktick_list_task_comments or ticktick_add_task_comment). Confirm the target before calling.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project containing the task.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ commentId: Property.ShortText({
+ displayName: 'Comment ID',
+ description: 'The comment ID, from the List Task Comments action.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, taskId, commentId } = context.propsValue;
+ await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.DELETE,
+ resourceUri: `/project/${projectId}/task/${taskId}/comment/${commentId}`,
+ });
+ return { success: true, projectId, taskId, commentId };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/delete-task.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-task.ts
new file mode 100644
index 00000000000..cb2a3a64eab
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/delete-task.ts
@@ -0,0 +1,40 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCompleteTaskOutputSchema } from '../../output-schemas';
+
+export const deleteTaskAiAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_delete_task',
+ outputSchema: ticktickCompleteTaskOutputSchema,
+ displayName: 'Delete Task',
+ description: 'Deletes a TickTick task.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a task by projectId and taskId. Use ticktick_complete_task instead when the task is just finished. Confirm the target before calling.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project the task belongs to. Use "inbox" for the Inbox.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, taskId } = context.propsValue;
+ await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.DELETE,
+ resourceUri: `/project/${projectId}/task/${taskId}`,
+ });
+ return { success: true, projectId, taskId };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/get-focus.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/get-focus.ts
new file mode 100644
index 00000000000..157e963cd0e
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/get-focus.ts
@@ -0,0 +1,46 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateFocusOutputSchema } from '../../output-schemas';
+
+export const getFocusAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_get_focus',
+ outputSchema: ticktickCreateFocusOutputSchema,
+ displayName: 'Get Focus Record',
+ description: 'Retrieves a focus record by its ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Fetches one focus record by focusId from ticktick_list_focuses. The type (pomodoro or timing) must match the record. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ focusId: Property.ShortText({
+ displayName: 'Focus ID',
+ description: 'The focus record ID, from the List Focus Records action.',
+ required: true,
+ }),
+ type: Property.StaticDropdown({
+ displayName: 'Type',
+ required: true,
+ options: {
+ options: [
+ { label: 'Pomodoro', value: 0 },
+ { label: 'Timing', value: 1 },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { focusId, type } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: `/focus/${focusId}`,
+ query: { type },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/get-habit.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/get-habit.ts
new file mode 100644
index 00000000000..86c1a8d815f
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/get-habit.ts
@@ -0,0 +1,33 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateHabitOutputSchema } from '../../output-schemas';
+
+export const getHabitAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_get_habit',
+ outputSchema: ticktickCreateHabitOutputSchema,
+ displayName: 'Get Habit',
+ description: 'Retrieves a habit by its ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description: 'Fetches one habit in full by habitId from ticktick_list_habits. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ habitId: Property.ShortText({
+ displayName: 'Habit ID',
+ description: 'The habit ID, from the List Habits action.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: `/habit/${context.propsValue.habitId}`,
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/get-project-data.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/get-project-data.ts
new file mode 100644
index 00000000000..9184e866be7
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/get-project-data.ts
@@ -0,0 +1,34 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickGetProjectDataOutputSchema } from '../../output-schemas';
+
+export const getProjectDataAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_get_project_data',
+ outputSchema: ticktickGetProjectDataOutputSchema,
+ displayName: 'Get Project With Tasks',
+ description: 'Retrieves a TickTick project together with its incomplete tasks and kanban columns.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Returns { project, tasks, columns } for a projectId from ticktick_list_projects. Only incomplete tasks are included; use ticktick_list_completed_tasks for finished ones. Columns are present for kanban projects only. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project ID, from the List Projects action. Use "inbox" for the Inbox.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: `/project/${context.propsValue.projectId}/data`,
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/get-project.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/get-project.ts
new file mode 100644
index 00000000000..39dcd5582af
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/get-project.ts
@@ -0,0 +1,34 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateProjectOutputSchema } from '../../output-schemas';
+
+export const getProjectAiAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_get_project',
+ outputSchema: ticktickCreateProjectOutputSchema,
+ displayName: 'Get Project',
+ description: 'Retrieves the details of a TickTick project by its ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Fetches one project\'s metadata (name, color, view mode, group, permission, kind) by projectId from ticktick_list_projects. Use ticktick_get_project_data instead when you also need its tasks. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project ID, from the List Projects action.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: `/project/${context.propsValue.projectId}`,
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/get-task.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/get-task.ts
new file mode 100644
index 00000000000..aea3c8e3b69
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/get-task.ts
@@ -0,0 +1,39 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateTaskOutputSchema } from '../../output-schemas';
+
+export const getTaskAiAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_get_task',
+ outputSchema: ticktickCreateTaskOutputSchema,
+ displayName: 'Get Task',
+ description: 'Retrieves a TickTick task by its project and task IDs.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Fetches one task in full (dates, tags, reminders, subtasks, assignee) by projectId and taskId. Get the ids from ticktick_list_tasks, ticktick_search_tasks or ticktick_get_project_data. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project the task belongs to. Use "inbox" for the Inbox.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, taskId } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: `/project/${projectId}/task/${taskId}`,
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/get-user-preferences.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/get-user-preferences.ts
new file mode 100644
index 00000000000..80385194165
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/get-user-preferences.ts
@@ -0,0 +1,28 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickGetUserPreferencesOutputSchema } from '../../output-schemas';
+
+export const getUserPreferencesAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_get_user_preferences',
+ outputSchema: ticktickGetUserPreferencesOutputSchema,
+ displayName: 'Get User Preferences',
+ description: 'Retrieves the preferences of the connected account.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Returns the current user\'s preferences, including their IANA time zone. Use it to interpret or set task dates in the user\'s time zone. Read-only, despite using POST.',
+ idempotent: true,
+ },
+ props: {},
+ async run(context) {
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/preference',
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-columns.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-columns.ts
new file mode 100644
index 00000000000..c1e5bf96cd7
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-columns.ts
@@ -0,0 +1,35 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListColumnsOutputSchema } from '../../output-schemas';
+
+export const listColumnsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_columns',
+ outputSchema: ticktickListColumnsOutputSchema,
+ displayName: 'List Columns',
+ description: 'Lists the kanban columns of a TickTick project.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists a kanban project\'s columns with their ids and names. Only meaningful for projects with viewMode "kanban". Use to get the columnId for ticktick_update_column. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The kanban project ID, from the List Projects action.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const columns = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: `/project/${context.propsValue.projectId}/column`,
+ });
+ return { columns, count: columns.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-completed-tasks.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-completed-tasks.ts
new file mode 100644
index 00000000000..414985d0f8f
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-completed-tasks.ts
@@ -0,0 +1,53 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickListCompletedTasksOutputSchema } from '../../output-schemas';
+
+export const listCompletedTasksAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_completed_tasks',
+ outputSchema: ticktickListCompletedTasksOutputSchema,
+ displayName: 'List Completed Tasks',
+ description: 'Lists completed TickTick tasks within a completion time range.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Returns at most 200 completed tasks, filtered by projectIds and by completion time (startDate/endDate). Use to review what was finished; use ticktick_list_tasks for open tasks. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ projectIds: Property.Array({
+ displayName: 'Project IDs',
+ description: 'Only tasks in these projects, from the List Projects action.',
+ required: false,
+ }),
+ startDate: Property.DateTime({
+ displayName: 'Completed From',
+ description: 'Only tasks completed on or after this time.',
+ required: false,
+ }),
+ endDate: Property.DateTime({
+ displayName: 'Completed To',
+ description: 'Only tasks completed on or before this time.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { projectIds, startDate, endDate } = context.propsValue;
+ const projectIdList = taskFields.toStringArray({ value: projectIds });
+ const tasks = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/completed',
+ body: {
+ ...(projectIdList && projectIdList.length > 0 ? { projectIds: projectIdList } : {}),
+ ...(startDate ? { startDate: taskFields.formatDate({ value: startDate }) } : {}),
+ ...(endDate ? { endDate: taskFields.formatDate({ value: endDate }) } : {}),
+ },
+ });
+ return { tasks, count: tasks.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-countdowns.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-countdowns.ts
new file mode 100644
index 00000000000..e9a30fd2d2e
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-countdowns.ts
@@ -0,0 +1,29 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListCountdownsOutputSchema } from '../../output-schemas';
+
+export const listCountdownsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_countdowns',
+ outputSchema: ticktickListCountdownsOutputSchema,
+ displayName: 'List Countdowns',
+ description: 'Lists the countdowns of the connected account.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the account\'s countdowns (named dates counting down to or up from an event). Read-only.',
+ idempotent: true,
+ },
+ props: {},
+ async run(context) {
+ const countdowns = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: '/countdown',
+ });
+ return { countdowns, count: countdowns.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-focuses.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-focuses.ts
new file mode 100644
index 00000000000..1ae438671c1
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-focuses.ts
@@ -0,0 +1,55 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickListFocusesOutputSchema } from '../../output-schemas';
+
+export const listFocusesAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_focuses',
+ outputSchema: ticktickListFocusesOutputSchema,
+ displayName: 'List Focus Records',
+ description: 'Lists focus (pomodoro or timing) records within a time range.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists focus records of one type (pomodoro or timing) between from and to. Ranges longer than 30 days are clamped to the 30 days before "to". Use to get the focusId for ticktick_get_focus or ticktick_delete_focus. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ from: Property.DateTime({
+ displayName: 'From',
+ required: true,
+ }),
+ to: Property.DateTime({
+ displayName: 'To',
+ required: true,
+ }),
+ type: Property.StaticDropdown({
+ displayName: 'Type',
+ required: true,
+ options: {
+ options: [
+ { label: 'Pomodoro', value: 0 },
+ { label: 'Timing', value: 1 },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { from, to, type } = context.propsValue;
+ const focuses = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: '/focus',
+ query: {
+ from: taskFields.formatDate({ value: from }),
+ to: taskFields.formatDate({ value: to }),
+ type,
+ },
+ });
+ return { focuses, count: focuses.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-habit-checkins.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-habit-checkins.ts
new file mode 100644
index 00000000000..8b93c1edaf9
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-habit-checkins.ts
@@ -0,0 +1,52 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickListHabitCheckinsOutputSchema } from '../../output-schemas';
+
+export const listHabitCheckinsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_habit_checkins',
+ outputSchema: ticktickListHabitCheckinsOutputSchema,
+ displayName: 'List Habit Check-Ins',
+ description: 'Lists the check-ins of one or more habits within a date range.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists check-ins for the given habitIds (from ticktick_list_habits) between two YYYYMMDD stamps. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ habitIds: Property.Array({
+ displayName: 'Habit IDs',
+ description: 'The habit IDs, from the List Habits action.',
+ required: true,
+ }),
+ from: Property.Number({
+ displayName: 'From',
+ description: 'Start date as YYYYMMDD, for example 20260401.',
+ required: true,
+ }),
+ to: Property.Number({
+ displayName: 'To',
+ description: 'End date as YYYYMMDD, for example 20260407.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { habitIds, from, to } = context.propsValue;
+ const habitIdList = taskFields.toStringArray({ value: habitIds }) ?? [];
+ if (habitIdList.length === 0) {
+ throw new Error('Habit IDs must contain at least one id.');
+ }
+ const checkins = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: '/habit/checkins',
+ query: { habitIds: habitIdList.join(','), from, to },
+ });
+ return { checkins, count: checkins.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-habit-sections.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-habit-sections.ts
new file mode 100644
index 00000000000..e95b23ddde1
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-habit-sections.ts
@@ -0,0 +1,29 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListHabitSectionsOutputSchema } from '../../output-schemas';
+
+export const listHabitSectionsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_habit_sections',
+ outputSchema: ticktickListHabitSectionsOutputSchema,
+ displayName: 'List Habit Sections',
+ description: 'Lists the habit sections (such as morning, afternoon, night) of the connected account.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists habit sections with their ids. Use to get the sectionId for ticktick_create_habit or ticktick_update_habit. Read-only.',
+ idempotent: true,
+ },
+ props: {},
+ async run(context) {
+ const sections = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: '/habit/sections',
+ });
+ return { sections, count: sections.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-habits.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-habits.ts
new file mode 100644
index 00000000000..eb6bd80ad67
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-habits.ts
@@ -0,0 +1,29 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListHabitsOutputSchema } from '../../output-schemas';
+
+export const listHabitsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_habits',
+ outputSchema: ticktickListHabitsOutputSchema,
+ displayName: 'List Habits',
+ description: 'Lists the habits of the connected account.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists all habits with their ids, names, goals and repeat rules. Use to get the habitId for other habit actions. Read-only.',
+ idempotent: true,
+ },
+ props: {},
+ async run(context) {
+ const habits = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: '/habit',
+ });
+ return { habits, count: habits.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-project-groups.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-project-groups.ts
new file mode 100644
index 00000000000..ae5ab7c343c
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-project-groups.ts
@@ -0,0 +1,29 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListProjectGroupsOutputSchema } from '../../output-schemas';
+
+export const listProjectGroupsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_project_groups',
+ outputSchema: ticktickListProjectGroupsOutputSchema,
+ displayName: 'List Project Groups',
+ description: 'Lists the project groups (folders) of the connected account.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists project groups with their ids and names. Use to get the projectGroupId for ticktick_update_project_group or ticktick_delete_project_group. Read-only.',
+ idempotent: true,
+ },
+ props: {},
+ async run(context) {
+ const groups = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: '/project/group',
+ });
+ return { groups, count: groups.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-project-members.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-project-members.ts
new file mode 100644
index 00000000000..1bf9a925b40
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-project-members.ts
@@ -0,0 +1,35 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListProjectMembersOutputSchema } from '../../output-schemas';
+
+export const listProjectMembersAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_project_members',
+ outputSchema: ticktickListProjectMembersOutputSchema,
+ displayName: 'List Project Members',
+ description: 'Lists the members of a TickTick project.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists a shared project\'s members (username, displayName, self). Use to get the username that ticktick_assign_task needs. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project ID, from the List Projects action.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const members = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: `/project/${context.propsValue.projectId}/members`,
+ });
+ return { members, count: members.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-projects.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-projects.ts
new file mode 100644
index 00000000000..1c63555d8d7
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-projects.ts
@@ -0,0 +1,42 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListProjectsOutputSchema } from '../../output-schemas';
+
+export const listProjectsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_projects',
+ outputSchema: ticktickListProjectsOutputSchema,
+ displayName: 'List Projects',
+ description: 'Lists the TickTick projects (lists) of the connected account.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the account\'s projects with their ids, names, view modes and group ids. Use first to resolve a project name to the projectId other actions need. The Inbox is not returned; task actions accept "inbox" as a projectId. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ offset: Property.Number({
+ displayName: 'Offset',
+ description: 'Zero-based result offset. Omit to use the vendor default.',
+ required: false,
+ }),
+ limit: Property.Number({
+ displayName: 'Limit',
+ description: 'Maximum number of projects to return. The vendor default is 200.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { offset, limit } = context.propsValue;
+ const projects = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: '/project',
+ query: { offset, limit },
+ });
+ return { projects, count: projects.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-tags.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-tags.ts
new file mode 100644
index 00000000000..ee5b183ca57
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-tags.ts
@@ -0,0 +1,29 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListTagsOutputSchema } from '../../output-schemas';
+
+export const listTagsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_tags',
+ outputSchema: ticktickListTagsOutputSchema,
+ displayName: 'List Tags',
+ description: 'Lists the tags of the connected account.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists all tags with their names and labels. Use to check whether a tag exists before ticktick_create_tag, or to find tag names for task filters. Read-only.',
+ idempotent: true,
+ },
+ props: {},
+ async run(context) {
+ const tags = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: '/tag',
+ });
+ return { tags, count: tags.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-task-comments.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-task-comments.ts
new file mode 100644
index 00000000000..4e480524e63
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-task-comments.ts
@@ -0,0 +1,40 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickListTaskCommentsOutputSchema } from '../../output-schemas';
+
+export const listTaskCommentsAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_task_comments',
+ outputSchema: ticktickListTaskCommentsOutputSchema,
+ displayName: 'List Task Comments',
+ description: 'Lists the comments on a task.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists a task\'s comments with their ids and text. Use to get the comment id for ticktick_delete_task_comment. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project containing the task.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, taskId } = context.propsValue;
+ const comments = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ resourceUri: `/project/${projectId}/task/${taskId}/comments`,
+ });
+ return { comments, count: comments.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-tasks.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-tasks.ts
new file mode 100644
index 00000000000..9a1747332a2
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-tasks.ts
@@ -0,0 +1,103 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import {
+ TICKTICK_PRIORITY_HIGH,
+ TICKTICK_PRIORITY_LOW,
+ TICKTICK_PRIORITY_MEDIUM,
+ TICKTICK_PRIORITY_NONE,
+} from '../../common/constants';
+import { taskFields } from '../../common/task-fields';
+import { ticktickListTasksOutputSchema } from '../../output-schemas';
+
+export const listTasksAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_tasks',
+ outputSchema: ticktickListTasksOutputSchema,
+ displayName: 'List Tasks',
+ description: 'Lists TickTick tasks matching project, date, priority, tag, kind and status filters.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Single-call task filter returning at most 200 tasks. Filters: projectIds, startDate/endDate (on the task start date), priority, tag (tasks must have all given tags), kind, status. Use ticktick_search_tasks for keyword search and ticktick_list_completed_tasks to filter on completion time. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ projectIds: Property.Array({
+ displayName: 'Project IDs',
+ description: 'Only tasks in these projects, from the List Projects action.',
+ required: false,
+ }),
+ startDate: Property.DateTime({
+ displayName: 'Start Date From',
+ description: 'Only tasks whose start date is on or after this time.',
+ required: false,
+ }),
+ endDate: Property.DateTime({
+ displayName: 'Start Date To',
+ description: 'Only tasks whose start date is on or before this time.',
+ required: false,
+ }),
+ priority: Property.StaticMultiSelectDropdown({
+ displayName: 'Priority',
+ required: false,
+ options: {
+ options: [
+ { label: 'None', value: TICKTICK_PRIORITY_NONE },
+ { label: 'Low', value: TICKTICK_PRIORITY_LOW },
+ { label: 'Medium', value: TICKTICK_PRIORITY_MEDIUM },
+ { label: 'High', value: TICKTICK_PRIORITY_HIGH },
+ ],
+ },
+ }),
+ tag: Property.Array({
+ displayName: 'Tags',
+ description: 'Only tasks that have all of these tags.',
+ required: false,
+ }),
+ kind: Property.StaticMultiSelectDropdown({
+ displayName: 'Kind',
+ required: false,
+ options: {
+ options: [
+ { label: 'Text', value: 'TEXT' },
+ { label: 'Note', value: 'NOTE' },
+ { label: 'Checklist', value: 'CHECKLIST' },
+ ],
+ },
+ }),
+ status: Property.StaticMultiSelectDropdown({
+ displayName: 'Status',
+ required: false,
+ options: {
+ options: [
+ { label: 'Open', value: 0 },
+ { label: 'Completed', value: 2 },
+ { label: 'Abandoned', value: -1 },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { projectIds, startDate, endDate, priority, tag, kind, status } = context.propsValue;
+ const projectIdList = taskFields.toStringArray({ value: projectIds });
+ const tagList = taskFields.toStringArray({ value: tag });
+ const tasks = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/filter',
+ body: {
+ ...(projectIdList && projectIdList.length > 0 ? { projectIds: projectIdList } : {}),
+ ...(startDate ? { startDate: taskFields.formatDate({ value: startDate }) } : {}),
+ ...(endDate ? { endDate: taskFields.formatDate({ value: endDate }) } : {}),
+ ...(priority && priority.length > 0 ? { priority } : {}),
+ ...(tagList && tagList.length > 0 ? { tag: tagList } : {}),
+ ...(kind && kind.length > 0 ? { kind } : {}),
+ ...(status && status.length > 0 ? { status } : {}),
+ },
+ });
+ return { tasks, count: tasks.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/list-undone-tasks.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/list-undone-tasks.ts
new file mode 100644
index 00000000000..0ea6143aff5
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/list-undone-tasks.ts
@@ -0,0 +1,62 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickSearchTasksOutputSchema } from '../../output-schemas';
+
+export const listUndoneTasksAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_list_undone_tasks',
+ outputSchema: ticktickSearchTasksOutputSchema,
+ displayName: 'List Undone Tasks',
+ description: 'Lists open TickTick tasks within a date range of up to 14 days.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Returns open tasks within a start/end window of at most 14 days (both required; an invalid range returns nothing). Optionally restrict to projectIds ("inbox" for the Inbox) or taskIds. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ startDate: Property.DateTime({
+ displayName: 'Start Date',
+ required: true,
+ }),
+ endDate: Property.DateTime({
+ displayName: 'End Date',
+ description: 'Must not be before the start date, and at most 14 days after it.',
+ required: true,
+ }),
+ projectIds: Property.Array({
+ displayName: 'Project IDs',
+ description: 'Only search these projects. Omit to search all, use "inbox" for the Inbox.',
+ required: false,
+ }),
+ taskIds: Property.Array({
+ displayName: 'Task IDs',
+ description: 'Restrict results to these tasks.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { startDate, endDate, projectIds, taskIds } = context.propsValue;
+ if (new Date(endDate).getTime() < new Date(startDate).getTime()) {
+ throw new Error('End Date must not be before Start Date.');
+ }
+ const projectIdList = taskFields.toStringArray({ value: projectIds });
+ const taskIdList = taskFields.toStringArray({ value: taskIds });
+ const tasks = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/undone',
+ body: {
+ startDate: taskFields.formatDate({ value: startDate }),
+ endDate: taskFields.formatDate({ value: endDate }),
+ ...(projectIdList && projectIdList.length > 0 ? { projectIds: projectIdList } : {}),
+ ...(taskIdList && taskIdList.length > 0 ? { taskIds: taskIdList } : {}),
+ },
+ });
+ return { tasks, count: tasks.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/move-tasks.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/move-tasks.ts
new file mode 100644
index 00000000000..ea2cc44752b
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/move-tasks.ts
@@ -0,0 +1,50 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickMoveTasksOutputSchema } from '../../output-schemas';
+
+export const moveTasksAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_move_tasks',
+ outputSchema: ticktickMoveTasksOutputSchema,
+ displayName: 'Move Tasks',
+ description: 'Moves tasks from one project to another.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Moves one or more tasks from a source project to a destination project (ids from ticktick_list_projects, "inbox" for the Inbox). Returns each moved task id with its new etag. Moving to the project a task is already in is harmless.',
+ idempotent: true,
+ },
+ props: {
+ fromProjectId: Property.ShortText({
+ displayName: 'From Project ID',
+ required: true,
+ }),
+ toProjectId: Property.ShortText({
+ displayName: 'To Project ID',
+ required: true,
+ }),
+ taskIds: Property.Array({
+ displayName: 'Task IDs',
+ description: 'The tasks to move, all currently in the source project.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { fromProjectId, toProjectId, taskIds } = context.propsValue;
+ const taskIdList = taskFields.toStringArray({ value: taskIds }) ?? [];
+ if (taskIdList.length === 0) {
+ throw new Error('Task IDs must contain at least one id.');
+ }
+ const moved = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/move',
+ body: taskIdList.map((taskId) => ({ fromProjectId, toProjectId, taskId })),
+ });
+ return { moved, count: moved.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/search-tasks.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/search-tasks.ts
new file mode 100644
index 00000000000..04f21056814
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/search-tasks.ts
@@ -0,0 +1,77 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickSearchTasksOutputSchema } from '../../output-schemas';
+
+export const searchTasksAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_search_tasks',
+ outputSchema: ticktickSearchTasksOutputSchema,
+ displayName: 'Search Tasks',
+ description: 'Searches TickTick tasks by keyword with optional project, tag, status and due-date filters.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Keyword search across tasks, optionally narrowed by projectIds, tags, status and a due-date window. Use to resolve a task name into its id and projectId. A blank keyword returns nothing, so omit it to search by filters only. Read-only.',
+ idempotent: true,
+ },
+ props: {
+ keywords: Property.ShortText({
+ displayName: 'Keywords',
+ description: 'Text to search for.',
+ required: false,
+ }),
+ projectIds: Property.Array({
+ displayName: 'Project IDs',
+ description: 'Only search in these projects, from the List Projects action.',
+ required: false,
+ }),
+ tags: Property.Array({
+ displayName: 'Tags',
+ required: false,
+ }),
+ status: Property.StaticMultiSelectDropdown({
+ displayName: 'Status',
+ required: false,
+ options: {
+ options: [
+ { label: 'Open', value: 0 },
+ { label: 'Completed', value: 2 },
+ { label: 'Abandoned', value: -1 },
+ ],
+ },
+ }),
+ dueFrom: Property.DateTime({
+ displayName: 'Due From',
+ description: 'Only tasks due on or after this time.',
+ required: false,
+ }),
+ dueTo: Property.DateTime({
+ displayName: 'Due To',
+ description: 'Only tasks due on or before this time.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { keywords, projectIds, tags, status, dueFrom, dueTo } = context.propsValue;
+ const projectIdList = taskFields.toStringArray({ value: projectIds });
+ const tagList = taskFields.toStringArray({ value: tags });
+ const tasks = await tickTickApiCall<Record<string, unknown>[]>({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/search',
+ body: {
+ ...(keywords ? { keywords } : {}),
+ ...(projectIdList && projectIdList.length > 0 ? { projectIds: projectIdList } : {}),
+ ...(tagList && tagList.length > 0 ? { tags: tagList } : {}),
+ ...(status && status.length > 0 ? { status } : {}),
+ ...(dueFrom ? { dueFrom: taskFields.formatDate({ value: dueFrom }) } : {}),
+ ...(dueTo ? { dueTo: taskFields.formatDate({ value: dueTo }) } : {}),
+ },
+ });
+ return { tasks, count: tasks.length };
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/unassign-task.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/unassign-task.ts
new file mode 100644
index 00000000000..d13334a8310
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/unassign-task.ts
@@ -0,0 +1,40 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateTaskOutputSchema } from '../../output-schemas';
+
+export const unassignTaskAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_unassign_task',
+ outputSchema: ticktickCreateTaskOutputSchema,
+ displayName: 'Unassign Task',
+ description: 'Removes the assignee from a task.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Removes the assignee from a task identified by projectId and taskId. Returns the updated task. Repeating it on an unassigned task is harmless.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project containing the task.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, taskId } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: '/task/unassign',
+ body: { projectId, taskId },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/update-column.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/update-column.ts
new file mode 100644
index 00000000000..43f2273e3fc
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/update-column.ts
@@ -0,0 +1,46 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickCreateColumnOutputSchema } from '../../output-schemas';
+
+export const updateColumnAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_update_column',
+ outputSchema: ticktickCreateColumnOutputSchema,
+ displayName: 'Update Column',
+ description: 'Renames a kanban column.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Renames a kanban column by columnId from ticktick_list_columns. Sets state, so repeating it is safe.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The kanban project ID, from the List Projects action.',
+ required: true,
+ }),
+ columnId: Property.ShortText({
+ displayName: 'Column ID',
+ description: 'The column ID, from the List Columns action.',
+ required: true,
+ }),
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The new column name (max 1000 characters).',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectId, columnId, name } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/project/${projectId}/column/${columnId}`,
+ body: { name },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/update-habit.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/update-habit.ts
new file mode 100644
index 00000000000..5e4e9023a2a
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/update-habit.ts
@@ -0,0 +1,43 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { habitFields } from '../../common/habit-fields';
+import { ticktickCreateHabitOutputSchema } from '../../output-schemas';
+
+export const updateHabitAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_update_habit',
+ outputSchema: ticktickCreateHabitOutputSchema,
+ displayName: 'Update Habit',
+ description: 'Updates fields of an existing habit.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Changes only the fields you supply on a habit identified by habitId from ticktick_list_habits; omitted fields are not sent. Empty values cannot clear a field. Sets state, so repeating it is safe.',
+ idempotent: true,
+ },
+ props: {
+ habitId: Property.ShortText({
+ displayName: 'Habit ID',
+ description: 'The habit ID, from the List Habits action.',
+ required: true,
+ }),
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The new habit name (max 1000 characters).',
+ required: false,
+ }),
+ ...habitFields.habitFieldProps(),
+ },
+ async run(context) {
+ const { habitId, ...values } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/habit/${habitId}`,
+ body: habitFields.buildHabitFields({ values }),
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/update-project-group.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/update-project-group.ts
new file mode 100644
index 00000000000..3dbde0535c1
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/update-project-group.ts
@@ -0,0 +1,41 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { ticktickUpdateProjectGroupOutputSchema } from '../../output-schemas';
+
+export const updateProjectGroupAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_update_project_group',
+ outputSchema: ticktickUpdateProjectGroupOutputSchema,
+ displayName: 'Update Project Group',
+ description: 'Renames a project group.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Renames a project group by projectGroupId from ticktick_list_project_groups. Sets state, so repeating it is safe.',
+ idempotent: true,
+ },
+ props: {
+ projectGroupId: Property.ShortText({
+ displayName: 'Project Group ID',
+ description: 'The group ID, from the List Project Groups action.',
+ required: true,
+ }),
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The new group name (max 64 characters).',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { projectGroupId, name } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/project/group/${projectGroupId}`,
+ body: { name },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/update-project.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/update-project.ts
new file mode 100644
index 00000000000..b40f807b1d2
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/update-project.ts
@@ -0,0 +1,66 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { TICKTICK_PROJECT_KIND_OPTIONS, TICKTICK_VIEW_MODE_OPTIONS } from '../../common/constants';
+import { ticktickCreateProjectOutputSchema } from '../../output-schemas';
+
+export const updateProjectAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_update_project',
+ outputSchema: ticktickCreateProjectOutputSchema,
+ displayName: 'Update Project',
+ description: 'Updates the name, color, order, view mode or kind of a TickTick project.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Changes only the fields you supply on a project by projectId from ticktick_list_projects; omitted fields keep their value. Sets state, so repeating it is safe.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project ID, from the List Projects action.',
+ required: true,
+ }),
+ name: Property.ShortText({
+ displayName: 'Name',
+ required: false,
+ }),
+ color: Property.ShortText({
+ displayName: 'Color',
+ description: 'Hex color, for example "#F18181".',
+ required: false,
+ }),
+ sortOrder: Property.Number({
+ displayName: 'Sort Order',
+ required: false,
+ }),
+ viewMode: Property.StaticDropdown({
+ displayName: 'View Mode',
+ required: false,
+ options: TICKTICK_VIEW_MODE_OPTIONS,
+ }),
+ kind: Property.StaticDropdown({
+ displayName: 'Kind',
+ required: false,
+ options: TICKTICK_PROJECT_KIND_OPTIONS,
+ }),
+ },
+ async run(context) {
+ const { projectId, name, color, sortOrder, viewMode, kind } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/project/${projectId}`,
+ body: {
+ ...(name !== undefined ? { name } : {}),
+ ...(color !== undefined ? { color } : {}),
+ ...(sortOrder !== undefined ? { sortOrder } : {}),
+ ...(viewMode !== undefined ? { viewMode } : {}),
+ ...(kind !== undefined ? { kind } : {}),
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/ai/update-task.ts b/packages/pieces/community/ticktick/src/lib/actions/ai/update-task.ts
new file mode 100644
index 00000000000..7493c921ea0
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/actions/ai/update-task.ts
@@ -0,0 +1,46 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { ticktickAuth } from '../../auth';
+import { tickTickApiCall } from '../../common/client';
+import { taskFields } from '../../common/task-fields';
+import { ticktickCreateTaskOutputSchema } from '../../output-schemas';
+
+export const updateTaskAiAction = createAction({
+ auth: ticktickAuth,
+ name: 'ticktick_update_task',
+ outputSchema: ticktickCreateTaskOutputSchema,
+ displayName: 'Update Task',
+ description: 'Updates fields of an existing TickTick task.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Changes only the fields you supply on a task, identified by projectId and taskId (from ticktick_list_tasks or ticktick_search_tasks). Omitted fields are not sent. Empty values cannot clear a field. Use ticktick_complete_task to finish a task and ticktick_move_tasks to change its project. Sets state, so repeating it is safe.',
+ idempotent: true,
+ },
+ props: {
+ projectId: Property.ShortText({
+ displayName: 'Project ID',
+ description: 'The project the task belongs to. Use "inbox" for the Inbox.',
+ required: true,
+ }),
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ required: true,
+ }),
+ title: Property.ShortText({
+ displayName: 'Title',
+ required: false,
+ }),
+ ...taskFields.taskFieldProps(),
+ },
+ async run(context) {
+ const { projectId, taskId, ...values } = context.propsValue;
+ return await tickTickApiCall({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.POST,
+ resourceUri: `/task/${taskId}`,
+ body: { id: taskId, projectId, ...taskFields.buildTaskFields({ values }) },
+ });
+ },
+});
diff --git a/packages/pieces/community/ticktick/src/lib/actions/complete-task.ts b/packages/pieces/community/ticktick/src/lib/actions/complete-task.ts
index c88e09302e3..40325936d4e 100644
--- a/packages/pieces/community/ticktick/src/lib/actions/complete-task.ts
+++ b/packages/pieces/community/ticktick/src/lib/actions/complete-task.ts
@@ -10,7 +10,7 @@ export const completeTaskAction = createAction({
classification: 'WRITE',
displayName: 'Complete Task',
description: 'Marks an existing task as completed.',
- audience: 'both',
+ audience: 'human',
aiMetadata: {
description:
'Marks a TickTick task as completed, identified by its list (project) ID and task ID. Use to close out a task. Idempotent: completing an already-completed task leaves it completed with no further effect.',
diff --git a/packages/pieces/community/ticktick/src/lib/actions/create-task.ts b/packages/pieces/community/ticktick/src/lib/actions/create-task.ts
index 68aceee5d38..45f5519d385 100644
--- a/packages/pieces/community/ticktick/src/lib/actions/create-task.ts
+++ b/packages/pieces/community/ticktick/src/lib/actions/create-task.ts
@@ -10,14 +10,16 @@ import {
TICKTICK_PRIORITY_NONE,
} from '../common/constants';
import { projectId } from '../common/props';
+import { createTaskOutputSchema } from '../output-schemas';
export const createTaskAction = createAction({
auth: ticktickAuth,
name: 'create_task',
+ outputSchema: createTaskOutputSchema,
classification: 'WRITE',
displayName: 'Create Task',
description: 'Creates a new in a specific list.',
- audience: 'both',
+ audience: 'human',
aiMetadata: {
description:
'Creates a new task in a TickTick list, with optional content, checklist description, start/due dates, and priority. Use to add a to-do item. Requires the target list (project) ID and a task title. Not idempotent: each call creates a separate task even with identical input.',
diff --git a/packages/pieces/community/ticktick/src/lib/actions/delete-task.ts b/packages/pieces/community/ticktick/src/lib/actions/delete-task.ts
index 7ff4ef4b6dc..60b30486b4c 100644
--- a/packages/pieces/community/ticktick/src/lib/actions/delete-task.ts
+++ b/packages/pieces/community/ticktick/src/lib/actions/delete-task.ts
@@ -10,7 +10,7 @@ export const deleteTaskAction = createAction({
classification: 'DESTRUCTIVE',
displayName: 'Delete Task',
description: 'Deletes an existing task.',
- audience: 'both',
+ audience: 'human',
aiMetadata: {
description:
'Permanently deletes a TickTick task identified by its list (project) ID and task ID. Use to remove a task you no longer need; this is destructive and cannot be undone. Idempotent on the end state: re-deleting the same task leaves it gone.',
diff --git a/packages/pieces/community/ticktick/src/lib/actions/find-task.ts b/packages/pieces/community/ticktick/src/lib/actions/find-task.ts
index 4525d4b698c..45afd58d4e9 100644
--- a/packages/pieces/community/ticktick/src/lib/actions/find-task.ts
+++ b/packages/pieces/community/ticktick/src/lib/actions/find-task.ts
@@ -3,14 +3,16 @@ import { createAction, Property } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../auth';
import { tickTickApiCall } from '../common/client';
import { projectId } from '../common/props';
+import { findTaskOutputSchema } from '../output-schemas';
export const findTaskAction = createAction({
auth: ticktickAuth,
name: 'find_task',
+ outputSchema: findTaskOutputSchema,
classification: 'SEARCH',
displayName: 'Find Task',
description: 'Finds tasks in a specific project by their title.',
- audience: 'both',
+ audience: 'human',
aiMetadata: {
description:
"Searches the tasks in a TickTick list (project) for ones whose title matches a given string, with a match-type option for case-insensitive 'contains' (substring) or 'exact' matching. Use to resolve a task by name into its ID before getting, updating, completing, or deleting it. Requires the list ID and a title. Read-only and idempotent.",
@@ -43,7 +45,7 @@ export const findTaskAction = createAction({
const { projectId, title, matchType } = context.propsValue;
if (!projectId || !title) {
- return [];
+ return { found: false, result: [] };
}
const response = await tickTickApiCall<{
diff --git a/packages/pieces/community/ticktick/src/lib/actions/get-project-by-id.ts b/packages/pieces/community/ticktick/src/lib/actions/get-project-by-id.ts
index 046a117a9db..ead63a490e2 100644
--- a/packages/pieces/community/ticktick/src/lib/actions/get-project-by-id.ts
+++ b/packages/pieces/community/ticktick/src/lib/actions/get-project-by-id.ts
@@ -2,14 +2,16 @@ import { HttpMethod } from '@activepieces/pieces-common';
import { createAction, Property } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../auth';
import { tickTickApiCall } from '../common/client';
+import { getProjectOutputSchema } from '../output-schemas';
export const getProjectAction = createAction({
auth: ticktickAuth,
name: 'get_project',
+ outputSchema: getProjectOutputSchema,
classification: 'READ',
displayName: 'Get Task List',
description: 'Retrieves the details of a specific task list by ID.',
- audience: 'both',
+ audience: 'human',
aiMetadata: {
description:
'Fetches the details of a single TickTick task list (project) by its list ID. Use when you have a list ID and need its metadata. Read-only and idempotent.',
diff --git a/packages/pieces/community/ticktick/src/lib/actions/get-task.ts b/packages/pieces/community/ticktick/src/lib/actions/get-task.ts
index a8e0f8c4f20..c497d0a3398 100644
--- a/packages/pieces/community/ticktick/src/lib/actions/get-task.ts
+++ b/packages/pieces/community/ticktick/src/lib/actions/get-task.ts
@@ -3,14 +3,16 @@ import { createAction } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../auth';
import { tickTickApiCall } from '../common/client';
import { projectId, taskId } from '../common/props';
+import { createTaskOutputSchema } from '../output-schemas';
export const getTaskAction = createAction({
auth: ticktickAuth,
name: 'get_task',
+ outputSchema: createTaskOutputSchema,
classification: 'READ',
displayName: 'Get Task',
description: 'Retrieves the details of a specific task.',
- audience: 'both',
+ audience: 'human',
aiMetadata: {
description:
'Fetches the full details of a single TickTick task by its list (project) ID and task ID. Use when you already know both IDs and need the task data; to discover a task ID by title, use Find Task first. Read-only and idempotent.',
diff --git a/packages/pieces/community/ticktick/src/lib/actions/update-task.ts b/packages/pieces/community/ticktick/src/lib/actions/update-task.ts
index bbcdf4b2de6..1153f38bf97 100644
--- a/packages/pieces/community/ticktick/src/lib/actions/update-task.ts
+++ b/packages/pieces/community/ticktick/src/lib/actions/update-task.ts
@@ -10,15 +10,17 @@ import {
TICKTICK_PRIORITY_NONE,
} from '../common/constants';
import { projectId, taskId } from '../common/props';
+import { updateTaskOutputSchema } from '../output-schemas';
export const updateTaskAction = createAction({
auth: ticktickAuth,
name: 'update_task',
+ outputSchema: updateTaskOutputSchema,
classification: 'WRITE',
displayName: 'Update Task',
description: 'Update an existing task.',
- audience: 'both',
+ audience: 'human',
aiMetadata: {
description:
'Updates fields (title, content, checklist description, start/due dates, priority) on an existing TickTick task identified by its list and task ID. Only the fields you supply are changed. Use to edit a known task. Idempotent: repeating with the same values leaves the task in the same state.',
diff --git a/packages/pieces/community/ticktick/src/lib/common/constants.ts b/packages/pieces/community/ticktick/src/lib/common/constants.ts
index cc320d68bbe..553b75b8870 100644
--- a/packages/pieces/community/ticktick/src/lib/common/constants.ts
+++ b/packages/pieces/community/ticktick/src/lib/common/constants.ts
@@ -12,3 +12,18 @@ export const TICKTICK_PRIORITY_NONE = 0;
export const TICKTICK_PRIORITY_LOW = 1;
export const TICKTICK_PRIORITY_MEDIUM = 3;
export const TICKTICK_PRIORITY_HIGH = 5;
+
+export const TICKTICK_VIEW_MODE_OPTIONS = {
+ options: [
+ { label: 'List', value: 'list' },
+ { label: 'Kanban', value: 'kanban' },
+ { label: 'Timeline', value: 'timeline' },
+ ],
+};
+
+export const TICKTICK_PROJECT_KIND_OPTIONS = {
+ options: [
+ { label: 'Task', value: 'TASK' },
+ { label: 'Note', value: 'NOTE' },
+ ],
+};
diff --git a/packages/pieces/community/ticktick/src/lib/common/habit-fields.ts b/packages/pieces/community/ticktick/src/lib/common/habit-fields.ts
new file mode 100644
index 00000000000..4fa14d55db8
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/common/habit-fields.ts
@@ -0,0 +1,115 @@
+import { Property } from '@activepieces/pieces-framework';
+import { taskFields } from './task-fields';
+
+function habitFieldProps() {
+ return {
+ iconRes: Property.ShortText({
+ displayName: 'Icon',
+ description: 'Habit icon resource, for example "habit_reading".',
+ required: false,
+ }),
+ color: Property.ShortText({
+ displayName: 'Color',
+ description: 'Hex color, for example "#4D8CF5".',
+ required: false,
+ }),
+ sortOrder: Property.Number({
+ displayName: 'Sort Order',
+ required: false,
+ }),
+ encouragement: Property.ShortText({
+ displayName: 'Encouragement',
+ description: 'Encouragement message shown for the habit.',
+ required: false,
+ }),
+ type: Property.ShortText({
+ displayName: 'Type',
+ description: '"Boolean" for done or not done, "Real" for a numeric goal.',
+ required: false,
+ }),
+ goal: Property.Number({
+ displayName: 'Goal',
+ description: 'Daily goal, for example 1 for a Boolean habit.',
+ required: false,
+ }),
+ step: Property.Number({
+ displayName: 'Step',
+ description: 'Amount added per check-in tap.',
+ required: false,
+ }),
+ unit: Property.ShortText({
+ displayName: 'Unit',
+ description: 'Goal unit, for example "Count".',
+ required: false,
+ }),
+ repeatRule: Property.ShortText({
+ displayName: 'Repeat Rule',
+ description: 'Recurrence rule, for example "RRULE:FREQ=DAILY;INTERVAL=1".',
+ required: false,
+ }),
+ reminders: Property.Array({
+ displayName: 'Reminders',
+ description: 'Reminder times, for example "08:00".',
+ required: false,
+ }),
+ recordEnable: Property.StaticDropdown({
+ displayName: 'Record Enabled',
+ description: 'Whether check-in notes (records) are enabled.',
+ required: false,
+ options: {
+ options: [
+ { label: 'Yes', value: true },
+ { label: 'No', value: false },
+ ],
+ },
+ }),
+ sectionId: Property.ShortText({
+ displayName: 'Section ID',
+ description: 'The habit section ID, from the List Habit Sections action.',
+ required: false,
+ }),
+ targetDays: Property.Number({
+ displayName: 'Target Days',
+ required: false,
+ }),
+ targetStartDate: Property.Number({
+ displayName: 'Target Start Date',
+ description: 'Start date as YYYYMMDD, for example 20240101.',
+ required: false,
+ }),
+ };
+}
+
+function buildHabitFields({
+ values,
+}: {
+ values: {
+ name?: string;
+ iconRes?: string;
+ color?: string;
+ sortOrder?: number;
+ encouragement?: string;
+ type?: string;
+ goal?: number;
+ step?: number;
+ unit?: string;
+ repeatRule?: string;
+ reminders?: unknown;
+ recordEnable?: boolean;
+ sectionId?: string;
+ targetDays?: number;
+ targetStartDate?: number;
+ };
+}): Record<string, unknown> {
+ const { reminders, ...rest } = values;
+ const reminderList = taskFields.toStringArray({ value: reminders });
+ const defined = Object.fromEntries(
+ Object.entries(rest).filter(([, value]) => value !== undefined && value !== ''),
+ );
+ return {
+ ...defined,
+ ...(reminderList && reminderList.length > 0 ? { reminders: reminderList } : {}),
+ };
+}
+
+export const habitFields = { habitFieldProps, buildHabitFields };
diff --git a/packages/pieces/community/ticktick/src/lib/common/task-fields.ts b/packages/pieces/community/ticktick/src/lib/common/task-fields.ts
new file mode 100644
index 00000000000..51264d51cf9
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/common/task-fields.ts
@@ -0,0 +1,131 @@
+import { Property } from '@activepieces/pieces-framework';
+import dayjs from 'dayjs';
+import {
+ TICKTICK_PRIORITY_HIGH,
+ TICKTICK_PRIORITY_LOW,
+ TICKTICK_PRIORITY_MEDIUM,
+ TICKTICK_PRIORITY_NONE,
+} from './constants';
+
+function taskFieldProps() {
+ return {
+ content: Property.LongText({
+ displayName: 'Content',
+ description: 'The task content (notes).',
+ required: false,
+ }),
+ desc: Property.LongText({
+ displayName: 'Checklist Description',
+ description: 'Description of the checklist, used together with subtasks.',
+ required: false,
+ }),
+ isAllDay: Property.StaticDropdown({
+ displayName: 'All Day',
+ required: false,
+ options: {
+ options: [
+ { label: 'Yes', value: true },
+ { label: 'No', value: false },
+ ],
+ },
+ }),
+ startDate: Property.DateTime({
+ displayName: 'Start Date',
+ required: false,
+ }),
+ dueDate: Property.DateTime({
+ displayName: 'Due Date',
+ required: false,
+ }),
+ timeZone: Property.ShortText({
+ displayName: 'Time Zone',
+ description: 'IANA time zone the dates are specified in, for example "America/Los_Angeles".',
+ required: false,
+ }),
+ reminders: Property.Array({
+ displayName: 'Reminders',
+ description: 'Reminder triggers, for example "TRIGGER:P0DT9H0M0S" or "TRIGGER:PT0S".',
+ required: false,
+ }),
+ tags: Property.Array({
+ displayName: 'Tags',
+ description: 'Tag names to put on the task.',
+ required: false,
+ }),
+ repeatFlag: Property.ShortText({
+ displayName: 'Repeat Rule',
+ description: 'Recurrence rule, for example "RRULE:FREQ=DAILY;INTERVAL=1".',
+ required: false,
+ }),
+ priority: Property.StaticDropdown({
+ displayName: 'Priority',
+ required: false,
+ options: {
+ options: [
+ { label: 'None', value: TICKTICK_PRIORITY_NONE },
+ { label: 'Low', value: TICKTICK_PRIORITY_LOW },
+ { label: 'Medium', value: TICKTICK_PRIORITY_MEDIUM },
+ { label: 'High', value: TICKTICK_PRIORITY_HIGH },
+ ],
+ },
+ }),
+ sortOrder: Property.Number({
+ displayName: 'Sort Order',
+ required: false,
+ }),
+ items: Property.Json({
+ displayName: 'Subtasks',
+ description:
+ 'Array of subtasks, each like {"title": "Step", "status": 0}. Status 0 is open, 1 is completed.',
+ required: false,
+ }),
+ };
+}
+
+function formatDate({ value }: { value: string }): string {
+ return dayjs(value).format('YYYY-MM-DDTHH:mm:ssZZ');
+}
+
+function toStringArray({ value }: { value: unknown }): string[] | undefined {
+ if (!Array.isArray(value)) {
+ return undefined;
+ }
+ return value.filter((item): item is string => typeof item === 'string' && item.length > 0);
+}
+
+function buildTaskFields({
+ values,
+}: {
+ values: {
+ title?: string;
+ content?: string;
+ desc?: string;
+ isAllDay?: boolean;
+ startDate?: string;
+ dueDate?: string;
+ timeZone?: string;
+ reminders?: unknown;
+ tags?: unknown;
+ repeatFlag?: string;
+ priority?: number;
+ sortOrder?: number;
+ items?: unknown;
+ };
+}): Record<string, unknown> {
+ const { startDate, dueDate, reminders, tags, items, ...rest } = values;
+ const reminderList = toStringArray({ value: reminders });
+ const tagList = toStringArray({ value: tags });
+ const defined = Object.fromEntries(
+ Object.entries(rest).filter(([, value]) => value !== undefined && value !== ''),
+ );
+ return {
+ ...defined,
+ ...(startDate ? { startDate: formatDate({ value: startDate }) } : {}),
+ ...(dueDate ? { dueDate: formatDate({ value: dueDate }) } : {}),
+ ...(reminderList && reminderList.length > 0 ? { reminders: reminderList } : {}),
+ ...(tagList && tagList.length > 0 ? { tags: tagList } : {}),
+ ...(Array.isArray(items) ? { items } : {}),
+ };
+}
+
+export const taskFields = { taskFieldProps, formatDate, toStringArray, buildTaskFields };
diff --git a/packages/pieces/community/ticktick/src/lib/output-schemas.ts b/packages/pieces/community/ticktick/src/lib/output-schemas.ts
new file mode 100644
index 00000000000..2d434038f35
--- /dev/null
+++ b/packages/pieces/community/ticktick/src/lib/output-schemas.ts
@@ -0,0 +1,677 @@
+import { OutputSchema } from '@activepieces/pieces-framework';
+
+export const ticktickAddTaskCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'userId', label: 'User ID', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'number' },
+ { key: 'createdTime', label: 'Created Time', format: 'number' },
+ ],
+};
+
+export const ticktickAssignTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'tags', label: 'Tags' },
+ { key: 'assigneeUsername', label: 'Assignee Username', format: 'email' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ ],
+};
+
+export const ticktickBatchSaveTasksOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'savedCount', label: 'Saved Count', format: 'number' },
+ {
+ key: 'id2etag',
+ label: 'Task ID to Etag',
+ dynamicKey: true,
+ },
+ { key: 'failed', label: 'Failed' },
+ ],
+};
+
+export const ticktickCheckinHabitOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'habitId', label: 'Habit ID' },
+ {
+ key: 'checkins',
+ label: 'Checkins',
+ labelKey: 'id',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'stamp', label: 'Stamp', format: 'number' },
+ { key: 'time', label: 'Time' },
+ { key: 'opTime', label: 'Op Time' },
+ { key: 'value', label: 'Value', format: 'number' },
+ { key: 'goal', label: 'Goal', format: 'number' },
+ { key: 'status', label: 'Status' },
+ ],
+ },
+ ],
+};
+
+export const ticktickCompleteTasksOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'completedTaskIds', label: 'Completed Task IDs' },
+ { key: 'completedCount', label: 'Completed Count', format: 'number' },
+ { key: 'notCompletedTaskIds', label: 'Not Completed Task IDs' },
+ ],
+};
+
+export const ticktickCompleteTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'taskId', label: 'Task ID' },
+ ],
+};
+
+export const ticktickListCountdownsOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'countdowns', label: 'Countdowns' },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickCreateColumnOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ ],
+};
+
+export const ticktickCreateFocusOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'userId', label: 'User ID', format: 'number' },
+ { key: 'type', label: 'Type', format: 'number' },
+ { key: 'note', label: 'Note' },
+ {
+ key: 'tasks',
+ label: 'Tasks',
+ listItems: [
+ { key: 'startTime', label: 'Start Time', format: 'datetime' },
+ { key: 'endTime', label: 'End Time', format: 'datetime' },
+ ],
+ },
+ { key: 'startTime', label: 'Start Time', format: 'datetime' },
+ { key: 'endTime', label: 'End Time', format: 'datetime' },
+ { key: 'pauseDuration', label: 'Pause Duration', format: 'number' },
+ { key: 'added', label: 'Added', format: 'boolean' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'duration', label: 'Duration', format: 'number' },
+ { key: 'relationType', label: 'Relation Type' },
+ ],
+};
+
+export const ticktickCreateProjectGroupOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'showAll', label: 'Show All', format: 'boolean' },
+ ],
+};
+
+export const ticktickCreateHabitOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'totalCheckIns', label: 'Total Check Ins', format: 'number' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'type', label: 'Type' },
+ { key: 'goal', label: 'Goal', format: 'number' },
+ { key: 'step', label: 'Step', format: 'number' },
+ { key: 'unit', label: 'Unit' },
+ { key: 'repeatRule', label: 'Repeat Rule' },
+ { key: 'completedCycles', label: 'Completed Cycles', format: 'number' },
+ ],
+};
+
+export const ticktickCreateProjectOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'color', label: 'Color' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'viewMode', label: 'View Mode' },
+ { key: 'kind', label: 'Kind' },
+ ],
+};
+
+export const ticktickCreateTagOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'name', label: 'Name' },
+ { key: 'label', label: 'Label' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'type', label: 'Type', format: 'number' },
+ ],
+};
+
+export const ticktickCreateTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'tags', label: 'Tags' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ ],
+};
+
+export const ticktickDeleteTaskCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'taskId', label: 'Task ID' },
+ { key: 'commentId', label: 'Comment ID' },
+ ],
+};
+
+export const ticktickDeleteProjectGroupOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'projectGroupId', label: 'Project Group ID' },
+ ],
+};
+
+export const ticktickDeleteProjectOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'projectId', label: 'Project ID' },
+ ],
+};
+
+export const ticktickListHabitSectionsOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'sections', label: 'Sections' },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListHabitCheckinsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'checkins',
+ label: 'Checkins',
+ labelKey: 'id',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'habitId', label: 'Habit ID' },
+ { key: 'year', label: 'Year', format: 'number' },
+ {
+ key: 'checkins',
+ label: 'Checkins',
+ labelKey: 'id',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'stamp', label: 'Stamp', format: 'number' },
+ { key: 'time', label: 'Time' },
+ { key: 'opTime', label: 'Op Time', format: 'datetime' },
+ { key: 'value', label: 'Value', format: 'number' },
+ { key: 'goal', label: 'Goal', format: 'number' },
+ { key: 'status', label: 'Status' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListColumnsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'columns',
+ label: 'Columns',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListTaskCommentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'comments',
+ label: 'Comments',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'userId', label: 'User ID', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'number' },
+ { key: 'createdTime', label: 'Created Time', format: 'number' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListCompletedTasksOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'tasks',
+ label: 'Tasks',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'completedTime', label: 'Completed Time', format: 'datetime' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'tags', label: 'Tags' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListFocusesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'focuses',
+ label: 'Focuses',
+ labelKey: 'id',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'userId', label: 'User ID', format: 'number' },
+ { key: 'type', label: 'Type', format: 'number' },
+ { key: 'note', label: 'Note' },
+ {
+ key: 'tasks',
+ label: 'Tasks',
+ listItems: [
+ { key: 'startTime', label: 'Start Time', format: 'datetime' },
+ { key: 'endTime', label: 'End Time', format: 'datetime' },
+ ],
+ },
+ { key: 'startTime', label: 'Start Time', format: 'datetime' },
+ { key: 'endTime', label: 'End Time', format: 'datetime' },
+ { key: 'pauseDuration', label: 'Pause Duration', format: 'number' },
+ { key: 'added', label: 'Added', format: 'boolean' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'duration', label: 'Duration', format: 'number' },
+ { key: 'relationType', label: 'Relation Type' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListProjectGroupsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'groups',
+ label: 'Groups',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'showAll', label: 'Show All', format: 'boolean' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListHabitsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'habits',
+ label: 'Habits',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'totalCheckIns', label: 'Total Check Ins', format: 'number' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'type', label: 'Type' },
+ { key: 'goal', label: 'Goal', format: 'number' },
+ { key: 'step', label: 'Step', format: 'number' },
+ { key: 'unit', label: 'Unit' },
+ { key: 'repeatRule', label: 'Repeat Rule' },
+ { key: 'recordEnable', label: 'Record Enable', format: 'boolean' },
+ { key: 'completedCycles', label: 'Completed Cycles', format: 'number' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListTasksOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'tasks',
+ label: 'Tasks',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'tags', label: 'Tags' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickListProjectMembersOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'members',
+ label: 'Members',
+ labelKey: 'displayName',
+ listItems: [
+ { key: 'username', label: 'Username', format: 'email' },
+ { key: 'displayName', label: 'Display Name' },
+ { key: 'self', label: 'Self', format: 'boolean' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickMoveTasksOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'moved',
+ label: 'Moved',
+ labelKey: 'id',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'etag', label: 'Etag' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickGetUserPreferencesOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'timeZone', label: 'Time Zone' },
+ ],
+};
+
+export const ticktickGetProjectDataOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'project',
+ label: 'Project',
+ children: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'color', label: 'Color' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'viewMode', label: 'View Mode' },
+ { key: 'kind', label: 'Kind' },
+ ],
+ },
+ {
+ key: 'tasks',
+ label: 'Tasks',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'tags', label: 'Tags' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ ],
+ },
+ {
+ key: 'columns',
+ label: 'Columns',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ ],
+ },
+ ],
+};
+
+export const ticktickSearchTasksOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'tasks',
+ label: 'Tasks',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'tags', label: 'Tags' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const newTaskCreatedOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'tags', label: 'Tags' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ ],
+};
+
+export const ticktickListTagsOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'tags', label: 'Tags' },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const ticktickUpdateProjectGroupOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'showAll', label: 'Show All', format: 'boolean' },
+ ],
+};
+
+export const ticktickListProjectsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'projects',
+ label: 'Projects',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'color', label: 'Color' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'viewMode', label: 'View Mode' },
+ { key: 'kind', label: 'Kind' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const createTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'tags', label: 'Tags' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ ],
+};
+
+export const findTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'found', label: 'Found', format: 'boolean' },
+ {
+ key: 'result',
+ label: 'Result',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ ],
+ },
+ ],
+};
+
+export const getProjectOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'color', label: 'Color' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'viewMode', label: 'View Mode' },
+ { key: 'kind', label: 'Kind' },
+ ],
+};
+
+export const updateTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'projectId', label: 'Project ID' },
+ { key: 'sortOrder', label: 'Sort Order', format: 'number' },
+ { key: 'title', label: 'Title' },
+ { key: 'content', label: 'Content' },
+ { key: 'startDate', label: 'Start Date', format: 'datetime' },
+ { key: 'dueDate', label: 'Due Date', format: 'datetime' },
+ { key: 'timeZone', label: 'Time Zone' },
+ { key: 'isAllDay', label: 'Is All Day', format: 'boolean' },
+ { key: 'priority', label: 'Priority', format: 'number' },
+ { key: 'isFloating', label: 'Is Floating', format: 'boolean' },
+ { key: 'status', label: 'Status', format: 'number' },
+ { key: 'kind', label: 'Kind' },
+ { key: 'modifiedTime', label: 'Modified Time', format: 'datetime' },
+ { key: 'createdTime', label: 'Created Time', format: 'datetime' },
+ ],
+};
diff --git a/packages/pieces/community/ticktick/src/lib/triggers/new-task-created.ts b/packages/pieces/community/ticktick/src/lib/triggers/new-task-created.ts
index 3dfa4bb7bae..124c97bc9d9 100644
--- a/packages/pieces/community/ticktick/src/lib/triggers/new-task-created.ts
+++ b/packages/pieces/community/ticktick/src/lib/triggers/new-task-created.ts
@@ -4,12 +4,14 @@ import { ticktickAuth } from '../auth';
import { tickTickApiCall } from '../common/client';
import { TICKTICK_TASK_STATUS_INCOMPLETE } from '../common/constants';
import { projectId } from '../common/props';
+import { newTaskCreatedOutputSchema } from '../output-schemas';
const TRIGGER_KEY = 'ticktick_new_task_trigger';
export const newTaskCreatedTrigger = createTrigger({
auth: ticktickAuth,
name: 'new_task_created',
+ outputSchema: newTaskCreatedOutputSchema,
classification: 'READ',
displayName: 'New Task Created',
description: 'Triggers when a new task is created in a selected project.',