diff --git a/components/clickup/actions/common/comment-props.mjs b/components/clickup/actions/common/comment-props.mjs index d663d86659bed..59b14f2188bd9 100644 --- a/components/clickup/actions/common/comment-props.mjs +++ b/components/clickup/actions/common/comment-props.mjs @@ -1,6 +1,4 @@ import common from "./workspace-prop.mjs"; -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; export default { props: { @@ -14,12 +12,46 @@ export default { }), ], }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: propsFragments.taskId, - viewId: propsFragments.viewId, - commentId: propsFragments.commentId, + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, }, - }), + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], + }, + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + }, + commentId: { + propDefinition: [ + common.props.clickup, + "commentId", + (c) => ({ + taskId: c.taskId, + listId: c.listId, + }), + ], + }, + }, }; diff --git a/components/clickup/actions/common/thread-comment-props.mjs b/components/clickup/actions/common/thread-comment-props.mjs index 9b21bc41f39eb..bd96c2cec1990 100644 --- a/components/clickup/actions/common/thread-comment-props.mjs +++ b/components/clickup/actions/common/thread-comment-props.mjs @@ -1,5 +1,3 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "./workspace-prop.mjs"; export default { @@ -14,11 +12,45 @@ export default { }), ], }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: propsFragments.taskId, - commentId: propsFragments.commentId, + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, }, - }), + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], + }, + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + }), + ], + }, + commentId: { + propDefinition: [ + common.props.clickup, + "commentId", + (c) => ({ + taskId: c.taskId, + listId: c.listId, + }), + ], + }, + }, }; diff --git a/components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs b/components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs index 2eb5598e2cc7f..babeeb48f682b 100644 --- a/components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs +++ b/components/clickup/actions/create-chat-view-comment/create-chat-view-comment.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-create-chat-view-comment", name: "Create Chat View Comment", - description: "Creates a chat view comment. See the docs [here](https://clickup.com/api) in **Comments / Create Chat View Comment** section.", - version: "0.0.9", + description: "Creates a chat view comment. [See the documentation](https://clickup.com/api) in **Comments / Create Chat View Comment** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -33,20 +31,40 @@ export default { ], optional: true, }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], optional: true, + }, + listId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - viewId: propsFragments.viewId, + viewId: { + propDefinition: [ + common.props.clickup, + "viewId", + (c) => ({ + workspaceId: c.workspaceId, + spaceId: c.spaceId, + folderId: c.folderId, + listId: c.listId, + }), + ], }, - }), + }, async run({ $ }) { const { viewId, diff --git a/components/clickup/actions/create-checklist-item/create-checklist-item.mjs b/components/clickup/actions/create-checklist-item/create-checklist-item.mjs index e774804b22de7..e23a6b7108568 100644 --- a/components/clickup/actions/create-checklist-item/create-checklist-item.mjs +++ b/components/clickup/actions/create-checklist-item/create-checklist-item.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-create-checklist-item", name: "Create Checklist Item", - description: "Creates a new item in a checklist. See the docs [here](https://clickup.com/api) in **Checklists / Create Checklist Item** section.", - version: "0.0.9", + description: "Creates a new item in a checklist. [See the documentation](https://clickup.com/api) in **Checklists / Create Checklist Item** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -28,19 +26,49 @@ export default { ], optional: true, }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: propsFragments.taskId, - checklistId: propsFragments.checklistId, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], + }, + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], }, - }), + checklistId: { + propDefinition: [ + common.props.clickup, + "checklistId", + (c) => ({ + taskId: c.taskId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + }, + }, async run({ $ }) { const { taskId, diff --git a/components/clickup/actions/create-checklist/create-checklist.mjs b/components/clickup/actions/create-checklist/create-checklist.mjs index 84063ce76edc4..bf690e678f5cb 100644 --- a/components/clickup/actions/create-checklist/create-checklist.mjs +++ b/components/clickup/actions/create-checklist/create-checklist.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-create-checklist", name: "Create Checklist", - description: "Creates a new checklist in a task. See the docs [here](https://clickup.com/api) in **Checklists / Create Checklist** section.", - version: "0.0.9", + description: "Creates a new checklist in a task. [See the documentation](https://clickup.com/api) in **Checklists / Create Checklist** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -16,18 +14,38 @@ export default { type: "string", description: "The name of checklist", }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: propsFragments.taskId, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], }, - }), + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + }, + }, async run({ $ }) { const { taskId, diff --git a/components/clickup/actions/create-folder/create-folder.mjs b/components/clickup/actions/create-folder/create-folder.mjs index 1f43c2a08f0ca..abbad2bc62a8f 100644 --- a/components/clickup/actions/create-folder/create-folder.mjs +++ b/components/clickup/actions/create-folder/create-folder.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-create-folder", name: "Create Folder", - description: "Creates a new folder. See the docs [here](https://clickup.com/api) in **Folders / Create Folder** section.", - version: "0.0.9", + description: "Creates a new folder. [See the documentation](https://clickup.com/api) in **Folders / Create Folder** section.", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-list-comment/create-list-comment.mjs b/components/clickup/actions/create-list-comment/create-list-comment.mjs index 67d24a89acd9e..d55cefa8d426d 100644 --- a/components/clickup/actions/create-list-comment/create-list-comment.mjs +++ b/components/clickup/actions/create-list-comment/create-list-comment.mjs @@ -1,13 +1,12 @@ import clickup from "../../clickup.app.mjs"; -import builder from "../../common/builder.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-create-list-comment", name: "Create List Comment", - description: "Creates a list comment. See the docs [here](https://clickup.com/api) in **Comments / Create List Comment** section.", - version: "0.0.9", + description: "Creates a list comment. [See the documentation](https://clickup.com/api) in **Comments / Create List Comment** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -33,14 +32,27 @@ export default { ], optional: true, }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId, diff --git a/components/clickup/actions/create-list/create-list.mjs b/components/clickup/actions/create-list/create-list.mjs index fd17698fa1c09..b5dd6b8b81caf 100644 --- a/components/clickup/actions/create-list/create-list.mjs +++ b/components/clickup/actions/create-list/create-list.mjs @@ -4,8 +4,8 @@ import constants from "../common/constants.mjs"; export default { key: "clickup-create-list", name: "Create List", - description: "Creates a new list. See the docs [here](https://clickup.com/api) in **Lists / Create List** section.", - version: "0.0.14", + description: "Creates a new list. [See the documentation](https://clickup.com/api) in **Lists / Create List** section.", + version: "0.0.15", type: "action", props: { clickup, diff --git a/components/clickup/actions/create-space/create-space.mjs b/components/clickup/actions/create-space/create-space.mjs index d26eed5f2445c..9e14536d62e5a 100644 --- a/components/clickup/actions/create-space/create-space.mjs +++ b/components/clickup/actions/create-space/create-space.mjs @@ -3,8 +3,8 @@ import common from "../common/workspace-prop.mjs"; export default { key: "clickup-create-space", name: "Create Space", - description: "Creates a new space. See the docs [here](https://clickup.com/api) in **Spaces / Create Space** section.", - version: "0.0.9", + description: "Creates a new space. [See the documentation](https://clickup.com/api) in **Spaces / Create Space** section.", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/create-task-comment/create-task-comment.mjs b/components/clickup/actions/create-task-comment/create-task-comment.mjs index dd01f6bcd1be3..021f67e107c5c 100644 --- a/components/clickup/actions/create-task-comment/create-task-comment.mjs +++ b/components/clickup/actions/create-task-comment/create-task-comment.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-create-task-comment", name: "Create Task Comment", - description: "Creates a task comment. See the docs [here](https://clickup.com/api) in **Comments / Create Task Comment** section.", - version: "0.0.9", + description: "Creates a task comment. [See the documentation](https://clickup.com/api) in **Comments / Create Task Comment** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -33,18 +31,37 @@ export default { ], optional: true, }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: propsFragments.taskId, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], + }, + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + }), + ], }, - }), + }, async run({ $ }) { const { taskId, diff --git a/components/clickup/actions/create-task-from-template/create-task-from-template.mjs b/components/clickup/actions/create-task-from-template/create-task-from-template.mjs index 7a3607c0923d9..e7b82708cfa99 100644 --- a/components/clickup/actions/create-task-from-template/create-task-from-template.mjs +++ b/components/clickup/actions/create-task-from-template/create-task-from-template.mjs @@ -1,13 +1,12 @@ import clickup from "../../clickup.app.mjs"; -import builder from "../../common/builder.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-create-task-from-template", name: "Create Task From Template", - description: "Creates a new task from a template. See the docs [here](https://clickup.com/api) in **Task Templates / Create Task From Template** section.", - version: "0.0.9", + description: "Creates a new task from a template. [See the documentation](https://clickup.com/api) in **Task Templates / Create Task From Template** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -25,14 +24,27 @@ export default { type: "string", description: "The name of task", }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId, diff --git a/components/clickup/actions/create-task/create-task.mjs b/components/clickup/actions/create-task/create-task.mjs index f313682aa392d..147c5c65f31c0 100644 --- a/components/clickup/actions/create-task/create-task.mjs +++ b/components/clickup/actions/create-task/create-task.mjs @@ -1,6 +1,4 @@ import clickup from "../../clickup.app.mjs"; -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import constants from "../common/constants.mjs"; import common from "../common/list-props.mjs"; @@ -8,8 +6,8 @@ export default { ...common, key: "clickup-create-task", name: "Create Task", - description: "Creates a new task. See the docs [here](https://clickup.com/api) in **Tasks / Create Task** section.", - version: "0.0.14", + description: "Creates a new task. [See the documentation](https://clickup.com/api) in **Tasks / Create Task** section.", + version: "0.0.15", type: "action", props: { ...common.props, @@ -69,23 +67,50 @@ export default { description: "If set `true`, due date will be given with time. If not it will only be the closest date", optional: true, }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - status: propsFragments.status, - parent: { - ...propsFragments.taskId, - label: "Parent Task", - optional: true, - }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], + optional: false, + }, + status: { + propDefinition: [ + common.props.clickup, + "status", + (c) => ({ + listId: c.listId, + }), + ], }, - }), + parent: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + label: "Parent Task ID", + optional: true, + }, + }, async run({ $ }) { const { listId, diff --git a/components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs b/components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs index 2915b5a4a3cb4..05bdb3c012fa9 100644 --- a/components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs +++ b/components/clickup/actions/create-threaded-comment/create-threaded-comment.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-create-threaded-comment", name: "Create Threaded Comment", - description: "Creates a threaded comment. See the docs [here](https://clickup.com/api) in **Comments / Create Threaded Comment** section.", - version: "0.0.1", + description: "Creates a threaded comment. [See the documentation](https://clickup.com/api) in **Comments / Create Threaded Comment** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -30,12 +30,6 @@ export default { ], optional: true, }, - listWithFolder: { - propDefinition: [ - common.props.clickup, - "listWithFolder", - ], - }, }, async run({ $ }) { const { diff --git a/components/clickup/actions/create-view-comment/create-view-comment.mjs b/components/clickup/actions/create-view-comment/create-view-comment.mjs index 6a23f057ac6c9..5d6da3311c73c 100644 --- a/components/clickup/actions/create-view-comment/create-view-comment.mjs +++ b/components/clickup/actions/create-view-comment/create-view-comment.mjs @@ -1,12 +1,10 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/list-props.mjs"; export default { key: "clickup-create-view-comment", name: "Create View Comment", - description: "Creates a view comment. See the docs [here](https://clickup.com/api) in **Comments / Create Chat View Comment** section.", - version: "0.0.9", + description: "Creates a view comment. [See the documentation](https://clickup.com/api) in **Comments / Create Chat View Comment** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -32,20 +30,40 @@ export default { ], optional: true, }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], optional: true, + }, + listId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - viewId: propsFragments.viewId, + viewId: { + propDefinition: [ + common.props.clickup, + "viewId", + (c) => ({ + workspaceId: c.workspaceId, + spaceId: c.spaceId, + folderId: c.folderId, + listId: c.listId, + }), + ], }, - }), + }, async run({ $ }) { const { viewId, diff --git a/components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs b/components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs index c5ba739388b39..001a2fef5cca8 100644 --- a/components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs +++ b/components/clickup/actions/delete-checklist-item/delete-checklist-item.mjs @@ -1,33 +1,70 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-delete-checklist-item", name: "Delete Checklist Item", - description: "Deletes item in a checklist. See the docs [here](https://clickup.com/api) in **Checklists / Delete Checklist Item** section.", - version: "0.0.9", + description: "Deletes item in a checklist. [See the documentation](https://clickup.com/api) in **Checklists / Delete Checklist Item** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, - checklistId: propsFragments.checklistId, - checklistItemId: propsFragments.checklistItemId, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], }, - }), + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", + }, + checklistId: { + propDefinition: [ + common.props.clickup, + "checklistId", + (c) => ({ + taskId: c.taskId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + }, + checklistItemId: { + propDefinition: [ + common.props.clickup, + "checklistItemId", + (c) => ({ + taskId: c.taskId, + checklistId: c.checklistId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + }, + }, async run({ $ }) { const { checklistId, diff --git a/components/clickup/actions/delete-checklist/delete-checklist.mjs b/components/clickup/actions/delete-checklist/delete-checklist.mjs index d3db6c1568340..c869707936464 100644 --- a/components/clickup/actions/delete-checklist/delete-checklist.mjs +++ b/components/clickup/actions/delete-checklist/delete-checklist.mjs @@ -1,29 +1,55 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-delete-checklist", name: "Delete Checklist", - description: "Deletes a checklist in a task. See the docs [here](https://clickup.com/api) in **Checklists / Delete Checklist** section.", - version: "0.0.9", + description: "Deletes a checklist in a task. [See the documentation](https://clickup.com/api) in **Checklists / Delete Checklist** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: propsFragments.taskId, - checklistId: propsFragments.checklistId, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], }, - }), + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + }), + ], + }, + checklistId: { + propDefinition: [ + common.props.clickup, + "checklistId", + (c) => ({ + taskId: c.taskId, + useCustomTaskIds: c.useCustomTaskIds, + }), + ], + }, + }, async run({ $ }) { const { checklistId } = this; diff --git a/components/clickup/actions/delete-comment/delete-comment.mjs b/components/clickup/actions/delete-comment/delete-comment.mjs index d44f0d1afd210..81fbb43092d6d 100644 --- a/components/clickup/actions/delete-comment/delete-comment.mjs +++ b/components/clickup/actions/delete-comment/delete-comment.mjs @@ -4,18 +4,9 @@ export default { ...common, key: "clickup-delete-comment", name: "Delete Comment", - description: "Deletes a comment. See the docs [here](https://clickup.com/api) in **Comments / Deleet Comment** section.", - version: "0.0.9", + description: "Deletes a comment. [See the documentation](https://clickup.com/api) in **Comments / Deleet Comment** section.", + version: "0.0.10", type: "action", - props: { - ...common.props, - listWithFolder: { - propDefinition: [ - common.props.clickup, - "listWithFolder", - ], - }, - }, async run({ $ }) { const { commentId } = this; diff --git a/components/clickup/actions/delete-folder/delete-folder.mjs b/components/clickup/actions/delete-folder/delete-folder.mjs index 7d1f2858f1ade..ba2292385ea4c 100644 --- a/components/clickup/actions/delete-folder/delete-folder.mjs +++ b/components/clickup/actions/delete-folder/delete-folder.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-delete-folder", name: "Delete Folder", - description: "Delete a folder. See the docs [here](https://clickup.com/api) in **Folders / Delete Folder** section.", - version: "0.0.9", + description: "Delete a folder. [See the documentation](https://clickup.com/api) in **Folders / Delete Folder** section.", + version: "0.0.10", type: "action", async run({ $ }) { const { folderId } = this; diff --git a/components/clickup/actions/delete-list/delete-list.mjs b/components/clickup/actions/delete-list/delete-list.mjs index a22bc6b82a459..c54583b0d4bb0 100644 --- a/components/clickup/actions/delete-list/delete-list.mjs +++ b/components/clickup/actions/delete-list/delete-list.mjs @@ -1,23 +1,35 @@ -import builder from "../../common/builder.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-delete-list", name: "Delete List", - description: "Delete a list. See the docs [here](https://clickup.com/api) in **Lists / Delete List** section.", - version: "0.0.9", + description: "Delete a list. [See the documentation](https://clickup.com/api) in **Lists / Delete List** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId } = this; diff --git a/components/clickup/actions/delete-space/delete-space.mjs b/components/clickup/actions/delete-space/delete-space.mjs index 6d74890b9cfcf..30e3d4aa3413e 100644 --- a/components/clickup/actions/delete-space/delete-space.mjs +++ b/components/clickup/actions/delete-space/delete-space.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-delete-space", name: "Delete Space", - description: "Delete a space. See the docs [here](https://clickup.com/api) in **Spaces / Delete Space** section.", - version: "0.0.9", + description: "Delete a space. [See the documentation](https://clickup.com/api) in **Spaces / Delete Space** section.", + version: "0.0.10", type: "action", async run({ $ }) { const { spaceId } = this; diff --git a/components/clickup/actions/delete-task/delete-task.mjs b/components/clickup/actions/delete-task/delete-task.mjs index 53cdf7872cc2d..b425ded01f966 100644 --- a/components/clickup/actions/delete-task/delete-task.mjs +++ b/components/clickup/actions/delete-task/delete-task.mjs @@ -1,31 +1,47 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-delete-task", name: "Delete Task", - description: "Delete a task. See the docs [here](https://clickup.com/api) in **Tasks / Delete Task** section.", - version: "0.0.9", + description: "Delete a task. [See the documentation](https://clickup.com/api) in **Tasks / Delete Task** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], }, - }), + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", + }, + }, async run({ $ }) { const { taskId } = this; diff --git a/components/clickup/actions/get-custom-fields/get-custom-fields.mjs b/components/clickup/actions/get-custom-fields/get-custom-fields.mjs index 963f1c764b65f..113476ac271e1 100644 --- a/components/clickup/actions/get-custom-fields/get-custom-fields.mjs +++ b/components/clickup/actions/get-custom-fields/get-custom-fields.mjs @@ -1,23 +1,35 @@ -import builder from "../../common/builder.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-get-custom-fields", name: "Get Custom Fields", - description: "Get a list of custom fields. See the docs [here](https://clickup.com/api) in **Custom Fields / Get Accessible Custom Fields** section.", - version: "0.0.9", + description: "Get a list of custom fields. [See the documentation](https://clickup.com/api) in **Custom Fields / Get Accessible Custom Fields** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId } = this; diff --git a/components/clickup/actions/get-folder-views/get-folder-views.mjs b/components/clickup/actions/get-folder-views/get-folder-views.mjs index e6d0ffcc14cd3..9e4485127d62e 100644 --- a/components/clickup/actions/get-folder-views/get-folder-views.mjs +++ b/components/clickup/actions/get-folder-views/get-folder-views.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-get-folder-views", name: "Get Folder Views", - description: "Get all views of a folder. See the docs [here](https://clickup.com/api) in **Views / Get Folder Views** section.", - version: "0.0.9", + description: "Get all views of a folder. [See the documentation](https://clickup.com/api) in **Views / Get Folder Views** section.", + version: "0.0.10", type: "action", async run({ $ }) { const { folderId } = this; diff --git a/components/clickup/actions/get-folder/get-folder.mjs b/components/clickup/actions/get-folder/get-folder.mjs index 11d34ed766681..242f9a06b16e5 100644 --- a/components/clickup/actions/get-folder/get-folder.mjs +++ b/components/clickup/actions/get-folder/get-folder.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-get-folder", name: "Get Folder", - description: "Get a folder in a workplace. See the docs [here](https://clickup.com/api) in **Folders / Get Folder** section.", - version: "0.0.9", + description: "Get a folder in a workplace. [See the documentation](https://clickup.com/api) in **Folders / Get Folder** section.", + version: "0.0.10", type: "action", async run({ $ }) { const { folderId } = this; diff --git a/components/clickup/actions/get-folders/get-folders.mjs b/components/clickup/actions/get-folders/get-folders.mjs index f131ecb39374a..20f87ea35c8ca 100644 --- a/components/clickup/actions/get-folders/get-folders.mjs +++ b/components/clickup/actions/get-folders/get-folders.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-get-folders", name: "Get Folders", - description: "Get a list of folders in a workplace. See the docs [here](https://clickup.com/api) in **Folders / Get Folders** section.", - version: "0.0.9", + description: "Get a list of folders in a workplace. [See the documentation](https://clickup.com/api) in **Folders / Get Folders** section.", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-list-comments/get-list-comments.mjs b/components/clickup/actions/get-list-comments/get-list-comments.mjs index b43efa0a27268..b8a8df580a2a4 100644 --- a/components/clickup/actions/get-list-comments/get-list-comments.mjs +++ b/components/clickup/actions/get-list-comments/get-list-comments.mjs @@ -1,23 +1,35 @@ -import builder from "../../common/builder.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-get-list-comments", name: "Get List Comments", - description: "Get a list comments. See the docs [here](https://clickup.com/api) in **Comments / Get List Comments** section.", - version: "0.0.9", + description: "Get a list comments. [See the documentation](https://clickup.com/api) in **Comments / Get List Comments** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId } = this; diff --git a/components/clickup/actions/get-list-views/get-list-views.mjs b/components/clickup/actions/get-list-views/get-list-views.mjs index dde6c264ff90e..918f54e07efd7 100644 --- a/components/clickup/actions/get-list-views/get-list-views.mjs +++ b/components/clickup/actions/get-list-views/get-list-views.mjs @@ -1,23 +1,35 @@ -import builder from "../../common/builder.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-get-list-views", name: "Get List Views", - description: "Get all views of a list. See the docs [here](https://clickup.com/api) in **Views / Get List Views** section.", - version: "0.0.9", + description: "Get all views of a list. [See the documentation](https://clickup.com/api) in **Views / Get List Views** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId } = this; diff --git a/components/clickup/actions/get-list/get-list.mjs b/components/clickup/actions/get-list/get-list.mjs index 792f99eacda2d..d8025d5a0c39b 100644 --- a/components/clickup/actions/get-list/get-list.mjs +++ b/components/clickup/actions/get-list/get-list.mjs @@ -1,23 +1,35 @@ -import builder from "../../common/builder.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-get-list", name: "Get List", - description: "Get a list. See the docs [here](https://clickup.com/api) in **Lists / Get List** section.", - version: "0.0.9", + description: "Get a list. [See the documentation](https://clickup.com/api) in **Lists / Get List** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId } = this; diff --git a/components/clickup/actions/get-lists/get-lists.mjs b/components/clickup/actions/get-lists/get-lists.mjs index 664b3d3476a08..a9a3af88e5403 100644 --- a/components/clickup/actions/get-lists/get-lists.mjs +++ b/components/clickup/actions/get-lists/get-lists.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-get-lists", name: "Get Lists", - description: "Get a list of lists. See the docs [here](https://clickup.com/api) in **Lists / Get Lists** section.", - version: "0.0.9", + description: "Get a list of lists. [See the documentation](https://clickup.com/api) in **Lists / Get Lists** section.", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-space-views/get-space-views.mjs b/components/clickup/actions/get-space-views/get-space-views.mjs index 7149f43368ae0..ba6fcf95b31fc 100644 --- a/components/clickup/actions/get-space-views/get-space-views.mjs +++ b/components/clickup/actions/get-space-views/get-space-views.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-get-space-views", name: "Get Space Views", - description: "Get all views of a space. See the docs [here](https://clickup.com/api) in **Views / Get Space Views** section.", - version: "0.0.9", + description: "Get all views of a space. [See the documentation](https://clickup.com/api) in **Views / Get Space Views** section.", + version: "0.0.10", type: "action", async run({ $ }) { const { spaceId } = this; diff --git a/components/clickup/actions/get-space/get-space.mjs b/components/clickup/actions/get-space/get-space.mjs index 42cbc4bf7bc52..2297a2dbc301a 100644 --- a/components/clickup/actions/get-space/get-space.mjs +++ b/components/clickup/actions/get-space/get-space.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-get-space", name: "Get Space", - description: "Get a space in a workplace. See the docs [here](https://clickup.com/api) in **Spaces / Get Space** section.", - version: "0.0.9", + description: "Get a space in a workplace. [See the documentation](https://clickup.com/api) in **Spaces / Get Space** section.", + version: "0.0.10", type: "action", async run({ $ }) { const { spaceId } = this; diff --git a/components/clickup/actions/get-spaces/get-spaces.mjs b/components/clickup/actions/get-spaces/get-spaces.mjs index e194934fb2715..dc24a41f5c03a 100644 --- a/components/clickup/actions/get-spaces/get-spaces.mjs +++ b/components/clickup/actions/get-spaces/get-spaces.mjs @@ -3,8 +3,8 @@ import common from "../common/workspace-prop.mjs"; export default { key: "clickup-get-spaces", name: "Get Spaces", - description: "Get a list of spaces in a workplace. See the docs [here](https://clickup.com/api) in **Spaces / Get Spaces** section.", - version: "0.0.9", + description: "Get a list of spaces in a workplace. [See the documentation](https://clickup.com/api) in **Spaces / Get Spaces** section.", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-task-comments/get-task-comments.mjs b/components/clickup/actions/get-task-comments/get-task-comments.mjs index 2b3832bc7cbaa..05ffdc0f0e2f1 100644 --- a/components/clickup/actions/get-task-comments/get-task-comments.mjs +++ b/components/clickup/actions/get-task-comments/get-task-comments.mjs @@ -1,33 +1,48 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-get-task-comments", name: "Get Task Comments", - description: "Get a task comments. See the docs [here](https://clickup.com/api) in **Comments / Get Task Comments** section.", - version: "0.0.9", + description: "Get a task comments. [See the documentation](https://clickup.com/api) in **Comments / Get Task Comments** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], optional: true, + }, + taskId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), ], + description: "To show options please select a **List** first", }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, - }, - }), async run({ $ }) { const { taskId } = this; diff --git a/components/clickup/actions/get-task-templates/get-task-templates.mjs b/components/clickup/actions/get-task-templates/get-task-templates.mjs index 5e1972a96a635..f8d50d0d858e8 100644 --- a/components/clickup/actions/get-task-templates/get-task-templates.mjs +++ b/components/clickup/actions/get-task-templates/get-task-templates.mjs @@ -3,8 +3,8 @@ import common from "../common/workspace-prop.mjs"; export default { key: "clickup-get-task-templates", name: "Get Task Templates", - description: "Get a list of templates. See the docs [here](https://clickup.com/api) in **Task Templates / Get Task Templates** section.", - version: "0.0.9", + description: "Get a list of templates. [See the documentation](https://clickup.com/api) in **Task Templates / Get Task Templates** section.", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/get-task/get-task.mjs b/components/clickup/actions/get-task/get-task.mjs index b1c7d45658abd..1de5fb08e6e59 100644 --- a/components/clickup/actions/get-task/get-task.mjs +++ b/components/clickup/actions/get-task/get-task.mjs @@ -1,31 +1,47 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-get-task", name: "Get Task", - description: "Get a task. See the docs [here](https://clickup.com/api) in **Tasks / Get Task** section.", - version: "0.0.9", + description: "Get a task. [See the documentation](https://clickup.com/api) in **Tasks / Get Task** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], }, - }), + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", + }, + }, async run({ $ }) { const { taskId } = this; diff --git a/components/clickup/actions/get-tasks/get-tasks.mjs b/components/clickup/actions/get-tasks/get-tasks.mjs index 9842496855870..a1121435fbe27 100644 --- a/components/clickup/actions/get-tasks/get-tasks.mjs +++ b/components/clickup/actions/get-tasks/get-tasks.mjs @@ -1,13 +1,12 @@ import clickup from "../../clickup.app.mjs"; -import builder from "../../common/builder.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-get-tasks", name: "Get Tasks", - description: "Get a list of tasks. See the docs [here](https://clickup.com/api) in **Tasks / Get Tasks** section.", - version: "0.0.9", + description: "Get a list of tasks. [See the documentation](https://clickup.com/api) in **Tasks / Get Tasks** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -49,14 +48,27 @@ export default { ], optional: true, }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId, diff --git a/components/clickup/actions/get-team-views/get-team-views.mjs b/components/clickup/actions/get-team-views/get-team-views.mjs index 30d99c799bf6e..33e8332ddc9bd 100644 --- a/components/clickup/actions/get-team-views/get-team-views.mjs +++ b/components/clickup/actions/get-team-views/get-team-views.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-get-team-views", name: "Get Team Views", - description: "Get all views of a team. See the docs [here](https://clickup.com/api) in **Views / Get Team Views** section.", - version: "0.0.9", + description: "Get all views of a team. [See the documentation](https://clickup.com/api) in **Views / Get Team Views** section.", + version: "0.0.10", type: "action", async run({ $ }) { const { workspaceId } = this; diff --git a/components/clickup/actions/get-view-comments/get-view-comments.mjs b/components/clickup/actions/get-view-comments/get-view-comments.mjs index 476a42b563131..09a5af022ab8b 100644 --- a/components/clickup/actions/get-view-comments/get-view-comments.mjs +++ b/components/clickup/actions/get-view-comments/get-view-comments.mjs @@ -1,30 +1,46 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-get-view-comments", name: "Get View Comments", - description: "Get a view comments. See the docs [here](https://clickup.com/api) in **Comments / Get Chat View Comments** section.", - version: "0.0.9", + description: "Get a view comments. [See the documentation](https://clickup.com/api) in **Comments / Get Chat View Comments** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], optional: true, + }, + viewId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "viewId", + (c) => ({ + folderId: c.folderId, + listId: c.listId, + }), ], }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - viewId: propsFragments.viewId, - }, - }), async run({ $ }) { const { viewId } = this; diff --git a/components/clickup/actions/get-view-tasks/get-view-tasks.mjs b/components/clickup/actions/get-view-tasks/get-view-tasks.mjs index c1efcd4bcd785..1eb073ca21bd3 100644 --- a/components/clickup/actions/get-view-tasks/get-view-tasks.mjs +++ b/components/clickup/actions/get-view-tasks/get-view-tasks.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-get-view-tasks", name: "Get View Tasks", - description: "Get all tasks of a view. See the docs [here](https://clickup.com/api) in **Views / Get View Tasks** section.", - version: "0.0.9", + description: "Get all tasks of a view. [See the documentation](https://clickup.com/api) in **Views / Get View Tasks** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -19,20 +17,38 @@ export default { default: 0, optional: true, }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], optional: true, + }, + viewId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "viewId", + (c) => ({ + folderId: c.folderId, + listId: c.listId, + }), ], }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - viewId: propsFragments.viewId, - }, - }), async run({ $ }) { const { viewId, diff --git a/components/clickup/actions/get-view/get-view.mjs b/components/clickup/actions/get-view/get-view.mjs index a0ede32d6f5c7..3882d398116a8 100644 --- a/components/clickup/actions/get-view/get-view.mjs +++ b/components/clickup/actions/get-view/get-view.mjs @@ -1,30 +1,46 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/list-props.mjs"; export default { ...common, key: "clickup-get-view", name: "Get View", - description: "Get a view. See the docs [here](https://clickup.com/api) in **Views / Get View** section.", - version: "0.0.9", + description: "Get a view. [See the documentation](https://clickup.com/api) in **Views / Get View** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], optional: true, + }, + viewId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "viewId", + (c) => ({ + folderId: c.folderId, + listId: c.listId, + }), ], }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - viewId: propsFragments.viewId, - }, - }), async run({ $ }) { const { viewId } = this; diff --git a/components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs b/components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs index e9ff3fd00e786..02c79b8185424 100644 --- a/components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs +++ b/components/clickup/actions/remove-task-custom-field/remove-task-custom-field.mjs @@ -1,32 +1,56 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-remove-task-custom-field", name: "Remove Task Custom Field", - description: "Remove custom field from a task. See the docs [here](https://clickup.com/api) in **Custom Fields / Remove Custom Field Value** section.", - version: "0.0.9", + description: "Remove custom field from a task. [See the documentation](https://clickup.com/api) in **Custom Fields / Remove Custom Field Value** section.", + version: "0.0.10", type: "action", props: { ...common.props, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, - customFieldId: propsFragments.customFieldId, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], }, - }), + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", + }, + customFieldId: { + propDefinition: [ + common.props.clickup, + "customFieldId", + (c) => ({ + listId: c.listId, + }), + ], + }, + }, async run({ $ }) { const { taskId, diff --git a/components/clickup/actions/start-time-entry/start-time-entry.mjs b/components/clickup/actions/start-time-entry/start-time-entry.mjs index e23d304561617..dd2ebd27885af 100644 --- a/components/clickup/actions/start-time-entry/start-time-entry.mjs +++ b/components/clickup/actions/start-time-entry/start-time-entry.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-start-time-entry", name: "Start Time Entry", - description: "Start time entry. [See documentation here](https://clickup.com/api/clickupreference/operation/StartatimeEntry)", - version: "0.0.3", + description: "Start time entry. [See the documentation](https://clickup.com/api/clickupreference/operation/StartatimeEntry)", + version: "0.0.4", type: "action", props: { ...common.props, @@ -16,23 +14,40 @@ export default { description: "Description of the time entry", type: "string", }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], optional: true, + }, + listId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", }, - }), + }, async run({ $ }) { const response = await this.clickup.startTimeEntry({ $, diff --git a/components/clickup/actions/stop-time-entry/stop-time-entry.mjs b/components/clickup/actions/stop-time-entry/stop-time-entry.mjs index 734988b46fe4c..7634ec8801080 100644 --- a/components/clickup/actions/stop-time-entry/stop-time-entry.mjs +++ b/components/clickup/actions/stop-time-entry/stop-time-entry.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-stop-time-entry", name: "Stop Time Entry", - description: "Stop time entry. [See documentation here](https://clickup.com/api/clickupreference/operation/StopatimeEntry)", - version: "0.0.4", + description: "Stop time entry. [See the documentation](https://clickup.com/api/clickupreference/operation/StopatimeEntry)", + version: "0.0.5", type: "action", async run({ $ }) { const response = await this.clickup.stopTimeEntry({ diff --git a/components/clickup/actions/update-checklist-item/update-checklist-item.mjs b/components/clickup/actions/update-checklist-item/update-checklist-item.mjs index cb5f9a32046aa..c0af13274f110 100644 --- a/components/clickup/actions/update-checklist-item/update-checklist-item.mjs +++ b/components/clickup/actions/update-checklist-item/update-checklist-item.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-update-checklist-item", name: "Update Checklist Item", - description: "Updates item in a checklist. See the docs [here](https://clickup.com/api) in **Checklists / Edit Checklist Item** section.", - version: "0.0.9", + description: "Updates item in a checklist. [See the documentation](https://clickup.com/api) in **Checklists / Edit Checklist Item** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -34,29 +32,77 @@ export default { type: "boolean", optional: true, }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, - checklistId: propsFragments.checklistId, - checklistItemId: propsFragments.checklistItemId, - parent: { - ...propsFragments.checklistItemId, - label: "Checklist Parent", - description: "Set another checklist item as parent", - optional: true, - }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], }, - }), + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", + }, + checklistId: { + propDefinition: [ + common.props.clickup, + "checklistId", + (c) => ({ + taskId: c.taskId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + }, + checklistItemId: { + propDefinition: [ + common.props.clickup, + "checklistItemId", + (c) => ({ + checklistId: c.checklistId, + taskId: c.taskId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + }, + parent: { + propDefinition: [ + common.props.clickup, + "checklistItemId", + (c) => ({ + checklistId: c.checklistId, + taskId: c.taskId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + label: "Checklist Parent ID", + description: "Set another checklist item as parent", + optional: true, + }, + }, async run({ $ }) { const { checklistId, diff --git a/components/clickup/actions/update-checklist/update-checklist.mjs b/components/clickup/actions/update-checklist/update-checklist.mjs index b91b412ec05d6..09dc9083b6760 100644 --- a/components/clickup/actions/update-checklist/update-checklist.mjs +++ b/components/clickup/actions/update-checklist/update-checklist.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-update-checklist", name: "Update Checklist", - description: "Updates a checklist in a task. See the docs [here](https://clickup.com/api) in **Checklists / Edit Checklist** section.", - version: "0.0.9", + description: "Updates a checklist in a task. [See the documentation](https://clickup.com/api) in **Checklists / Edit Checklist** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -23,22 +21,50 @@ export default { min: 0, optional: true, }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, - checklistId: propsFragments.checklistId, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], }, - }), + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", + }, + checklistId: { + propDefinition: [ + common.props.clickup, + "checklistId", + (c) => ({ + taskId: c.taskId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + }, + }, async run({ $ }) { const { checklistId, diff --git a/components/clickup/actions/update-comment/update-comment.mjs b/components/clickup/actions/update-comment/update-comment.mjs index 33cc776c97601..597bf1b00a601 100644 --- a/components/clickup/actions/update-comment/update-comment.mjs +++ b/components/clickup/actions/update-comment/update-comment.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-update-comment", name: "Update Comment", - description: "Updates a comment. See the docs [here](https://clickup.com/api) in **Comments / Update Comment** section.", - version: "0.0.11", + description: "Updates a comment. [See the documentation](https://clickup.com/api) in **Comments / Update Comment** section.", + version: "0.0.12", type: "action", props: { ...common.props, @@ -33,12 +33,6 @@ export default { type: "boolean", optional: true, }, - listWithFolder: { - propDefinition: [ - common.props.clickup, - "listWithFolder", - ], - }, }, async run({ $ }) { const { diff --git a/components/clickup/actions/update-folder/update-folder.mjs b/components/clickup/actions/update-folder/update-folder.mjs index 133e8ff5d37c4..5b1e01c7fe512 100644 --- a/components/clickup/actions/update-folder/update-folder.mjs +++ b/components/clickup/actions/update-folder/update-folder.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-update-folder", name: "Update Folder", - description: "Update a folder. See the docs [here](https://clickup.com/api) in **Folders / Update Folder** section.", - version: "0.0.9", + description: "Update a folder. [See the documentation](https://clickup.com/api) in **Folders / Update Folder** section.", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-list/update-list.mjs b/components/clickup/actions/update-list/update-list.mjs index 67d75cc9759ff..1b60b1f455c9d 100644 --- a/components/clickup/actions/update-list/update-list.mjs +++ b/components/clickup/actions/update-list/update-list.mjs @@ -1,5 +1,4 @@ import clickup from "../../clickup.app.mjs"; -import builder from "../../common/builder.mjs"; import constants from "../common/constants.mjs"; import common from "../common/list-props.mjs"; @@ -7,8 +6,8 @@ export default { ...common, key: "clickup-update-list", name: "Update List", - description: "Update a list. See the docs [here](https://clickup.com/api) in **Lists / Update List** section.", - version: "0.0.9", + description: "Update a list. [See the documentation](https://clickup.com/api) in **Lists / Update List** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -40,14 +39,27 @@ export default { ], optional: true, }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], }, }, - additionalProps: builder.buildListProps(), async run({ $ }) { const { listId, diff --git a/components/clickup/actions/update-space/update-space.mjs b/components/clickup/actions/update-space/update-space.mjs index 3628044b235e2..6fcb93454cf9f 100644 --- a/components/clickup/actions/update-space/update-space.mjs +++ b/components/clickup/actions/update-space/update-space.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "clickup-update-space", name: "Update Space", - description: "Update a space. See the docs [here](https://clickup.com/api) in **Spaces / Update Space** section.", - version: "0.0.9", + description: "Update a space. [See the documentation](https://clickup.com/api) in **Spaces / Update Space** section.", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs b/components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs index 1b855167fdffe..431fa562f561d 100644 --- a/components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs +++ b/components/clickup/actions/update-task-custom-field/update-task-custom-field.mjs @@ -1,13 +1,11 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/task-props.mjs"; export default { ...common, key: "clickup-update-task-custom-field", name: "Update Task Custom Field", - description: "Update custom field value of a task. See the docs [here](https://clickup.com/api) in **Custom Fields / Set Custom Field Value** section.", - version: "0.0.9", + description: "Update custom field value of a task. [See the documentation](https://clickup.com/api) in **Custom Fields / Set Custom Field Value** section.", + version: "0.0.10", type: "action", props: { ...common.props, @@ -16,22 +14,48 @@ export default { type: "any", description: "The value of custom field", }, - listWithFolder: { + folderId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, - customFieldId: propsFragments.customFieldId, + listId: { + propDefinition: [ + common.props.clickup, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], + }, + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", }, - }), + customFieldId: { + propDefinition: [ + common.props.clickup, + "customFieldId", + (c) => ({ + listId: c.listId, + }), + ], + }, + }, async run({ $ }) { const { taskId, diff --git a/components/clickup/actions/update-task/update-task.mjs b/components/clickup/actions/update-task/update-task.mjs index e01c8496a48b9..4a72ccdae050f 100644 --- a/components/clickup/actions/update-task/update-task.mjs +++ b/components/clickup/actions/update-task/update-task.mjs @@ -1,6 +1,4 @@ import { ConfigurationError } from "@pipedream/platform"; -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import constants from "../common/constants.mjs"; import common from "../common/task-props.mjs"; @@ -8,8 +6,8 @@ export default { ...common, key: "clickup-update-task", name: "Update Task", - description: "Update a task. See the docs [here](https://clickup.com/api) in **Tasks / Update Task** section.", - version: "0.0.11", + description: "Update a task. [See the documentation](https://clickup.com/api) in **Tasks / Update Task** section.", + version: "0.0.12", type: "action", props: { ...common.props, @@ -54,29 +52,63 @@ export default { description: "The start date of task, please use `YYYY-MM-DD` format", optional: true, }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.clickup, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], optional: true, + }, + listId: { propDefinition: [ common.props.clickup, - "listWithFolder", + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], + optional: true, }, - }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - taskId: { - ...propsFragments.taskId, - description: "To show options please select a **List** first", - }, - status: propsFragments.status, - parent: { - ...propsFragments.taskId, - label: "Parent Task", - optional: true, - }, + taskId: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + description: "To show options please select a **List** first", + }, + status: { + propDefinition: [ + common.props.clickup, + "status", + (c) => ({ + listId: c.listId, + }), + ], + optional: true, }, - }), + parent: { + propDefinition: [ + common.props.clickup, + "taskId", + (c) => ({ + listId: c.listId, + useCustomTaskIds: c.useCustomTaskIds, + authorizedTeamId: c.authorizedTeamId, + }), + ], + label: "Parent Task ID", + optional: true, + }, + }, async run({ $ }) { const { taskId, diff --git a/components/clickup/clickup.app.mjs b/components/clickup/clickup.app.mjs index 0183778e7bfe9..2c4f1d4ba159d 100644 --- a/components/clickup/clickup.app.mjs +++ b/components/clickup/clickup.app.mjs @@ -55,8 +55,8 @@ export default { }, useCustomTaskIds: { type: "boolean", - label: "Use custom task ids", - description: "Whether it should use custom task id instead of the ClickUp task id. should be used with `Authorized Team`", + label: "Use custom task IDs", + description: "Whether it should use custom task id instead of the ClickUp task ID. Should be used with `Authorized Team`", optional: true, }, authorizedTeamId: { @@ -127,11 +127,223 @@ export default { options: Object.keys(constants.PRIORITIES), default: "Normal", }, - listWithFolder: { - type: "boolean", - label: "Filter List ID By Folder?", - description: "If `TRUE`, the **List ID** field will be filtered by the selected **Folder ID**", - reloadProps: true, + folderId: { + type: "string", + label: "Folder ID", + description: "The ID of a folder", + async options({ spaceId }) { + const folders = await this.getFolders({ + spaceId, + }); + return folders?.map(({ + name: label, id: value, + }) => ({ + label, + value, + })) || []; + }, + }, + listId: { + type: "string", + label: "List ID", + description: "The ID of a list. To show lists within a folder, please select a **Folder** first", + async options({ + folderId, spaceId, + }) { + const lists = folderId + ? await this.getLists({ + folderId, + }) + : await this.getFolderlessLists({ + spaceId, + }); + return lists?.map(({ + name: label, id: value, + }) => ({ + label, + value, + })) || []; + }, + }, + viewId: { + type: "string", + label: "View ID", + description: "The ID of a view", + async options({ + workspaceId, + spaceId, + folderId, + listId, + }) { + let views = []; + if (workspaceId) { + views = views.concat(await this.getTeamViews({ + workspaceId, + })); + } + if (spaceId) { + views = views.concat(await this.getSpaceViews({ + spaceId, + })); + } + if (folderId) { + views = views.concat(await this.getFolderViews({ + folderId, + })); + } + if (listId) { + views = views.concat(await this.getListViews({ + listId, + })); + } + return views?.map((view) => ({ + label: view.name, + value: view.id, + })) || []; + }, + }, + taskId: { + type: "string", + label: "Task ID", + description: "The ID of a task", + async options ({ + page, listId, useCustomTaskIds, + }) { + const tasks = await this.getTasks({ + listId, + params: { + page, + }, + }); + + const tasksHasCustomId = tasks.some((task) => task.custom_id); + if (useCustomTaskIds && !tasksHasCustomId) { + throw new ConfigurationError("Custom task id is a ClickApp, and it must to be enabled on ClickUp settings."); + } + + return tasks?.map((task) => ({ + label: task.name, + value: useCustomTaskIds ? + task.custom_id : + task.id, + })) || []; + }, + }, + checklistId: { + type: "string", + label: "Checklist ID", + description: "To show options please select a **Task** first", + async options ({ + taskId, useCustomTaskIds, authorizedTeamId, + }) { + if (!taskId) { + return []; + } + + const params = + this.getParamsForCustomTaskIdCall(useCustomTaskIds, authorizedTeamId); + + const checklists = await this.getChecklists({ + taskId, + params, + }); + + return checklists?.map((checklist) => ({ + label: checklist.name, + value: checklist.id, + })) || []; + }, + }, + status: { + type: "string", + label: "Status", + description: "Select a status", + optional: true, + async options({ listId }) { + const { statuses } = await this.getList({ + listId, + }); + return statuses?.map(({ status }) => status) || []; + }, + }, + commentId: { + type: "string", + label: "Comment ID", + description: "The ID of a comment", + async options ({ + taskId, listId, viewId, + }) { + if (!taskId && !listId && !viewId) { + throw new ConfigurationError("Please enter the List, View, or Task to retrieve Comments from"); + } + let comments = []; + + if (taskId) { + comments = comments.concat(await this.getTaskComments({ + taskId, + params: {}, + })); + } + if (listId) { + comments = comments.concat(await this.getListComments({ + listId, + })); + } + if (viewId) { + comments = comments.concat(await this.getViewComments({ + viewId, + })); + } + + return comments?.map((comment) => ({ + label: comment.comment_text, + value: comment.id, + })) || []; + }, + }, + checklistItemId: { + type: "string", + label: "Checklist Item ID", + description: "To show options please select a **Task and Checklist** first", + async options({ + taskId, checklistId, useCustomTaskIds, authorizedTeamId, + }) { + if (!taskId || !checklistId) { + return []; + } + + const params = + this.getParamsForCustomTaskIdCall(useCustomTaskIds, authorizedTeamId); + + const items = await this.getChecklistItems({ + taskId, + checklistId, + params, + }); + + return items?.map((item) => ({ + label: item.name, + value: item.id, + })) || []; + }, + }, + customFieldId: { + type: "string", + label: "Custom Field ID", + description: "Select a custom field", + async options({ listId }) { + if (!listId) { + return []; + } + const fields = await this.getCustomFields({ + listId, + }); + + return fields?.map((field) => ({ + label: field.name, + value: field.id, + })) || []; + }, }, }, methods: { diff --git a/components/clickup/common/builder.mjs b/components/clickup/common/builder.mjs deleted file mode 100644 index c33efd4f56b01..0000000000000 --- a/components/clickup/common/builder.mjs +++ /dev/null @@ -1,84 +0,0 @@ -const buildListProps = ({ - listPropsOptional: optional = false, - tailProps, -} = {}) => function additionalProps() { - if (!this.listWithFolder) { - return { - listId: { - type: "string", - label: "List ID", - description: "The id of a list", - optional, - options: async () => { - const { - app, - clickup, - spaceId, - } = this; - const lists = await (clickup || app).getFolderlessLists({ - spaceId, - }); - return lists.map(({ - name: label, id: value, - }) => ({ - label, - value, - })); - }, - }, - ...tailProps, - }; - } - - return { - folderId: { - type: "string", - label: "Folder ID", - description: "The id of a folder", - optional, - options: async () => { - const { - app, - clickup, - spaceId, - } = this; - const folders = await (clickup || app).getFolders({ - spaceId, - }); - return folders.map(({ - name: label, id: value, - }) => ({ - label, - value, - })); - }, - }, - listId: { - type: "string", - label: "List ID", - description: "The id of a list", - optional, - options: async () => { - const { - app, - clickup, - folderId, - } = this; - const lists = await (clickup || app).getLists({ - folderId, - }); - return lists.map(({ - name: label, id: value, - }) => ({ - label, - value, - })); - }, - }, - ...tailProps, - }; -}; - -export default { - buildListProps, -}; diff --git a/components/clickup/common/props-fragments.mjs b/components/clickup/common/props-fragments.mjs deleted file mode 100644 index 508359ab9b2a0..0000000000000 --- a/components/clickup/common/props-fragments.mjs +++ /dev/null @@ -1,223 +0,0 @@ -import { ConfigurationError } from "@pipedream/platform"; - -export default { - viewId: { - type: "string", - label: "View Id", - description: "The id of a view", - options: async () => { - const { - app, - clickup, - workspaceId, - spaceId, - folderId, - listId, - } = this; - - let views = []; - if (workspaceId) { - views = views.concat(await (clickup || app).getTeamViews({ - workspaceId, - })); - } - if (spaceId) { - views = views.concat(await (clickup || app).getSpaceViews({ - spaceId, - })); - } - if (folderId) { - views = views.concat(await (clickup || app).getFolderViews({ - folderId, - })); - } - if (listId) { - views = views.concat(await (clickup || app).getListViews({ - listId, - })); - } - return views.map((view) => ({ - label: view.name, - value: view.id, - })); - }, - }, - taskId: { - type: "string", - label: "Task", - description: "The id of a task", - options: async ({ page }) => { - const { - app, - clickup, - listId, - useCustomTaskIds, - } = this; - - const tasks = await (clickup || app).getTasks({ - listId, - params: { - page, - }, - }); - - const tasksHasCustomId = tasks.some((task) => task.custom_id); - if (useCustomTaskIds && !tasksHasCustomId) { - throw new ConfigurationError("Custom task id is a ClickApp, and it must to be enabled on ClickUp settings."); - } - - return tasks.map((task) => ({ - label: task.name, - value: useCustomTaskIds ? - task.custom_id : - task.id, - })); - }, - }, - status: { - type: "string", - label: "Status", - description: "Select a status", - optional: true, - options: async () => { - const { - app, - clickup, - listId, - } = this; - - const { statuses } = await (clickup || app).getList({ - listId, - }); - return statuses.map(({ status }) => status); - }, - }, - checklistId: { - type: "string", - label: "Checklist", - description: "To show options please select a **Task** first", - options: async () => { - const { - app, - clickup, - taskId, - useCustomTaskIds, - authorizedTeamId, - } = this; - - if (!taskId) { - return []; - } - - const params = - (clickup || app).getParamsForCustomTaskIdCall(useCustomTaskIds, authorizedTeamId); - - const checklists = await (clickup || app).getChecklists({ - taskId, - params, - }); - - return checklists.map((checklist) => ({ - label: checklist.name, - value: checklist.id, - })); - }, - }, - checklistItemId: { - type: "string", - label: "Checklist Item", - description: "To show options please select a **Task and Checklist** first", - options: async () => { - const { - app, - clickup, - taskId, - checklistId, - useCustomTaskIds, - authorizedTeamId, - } = this; - - if (!taskId || !checklistId) { - return []; - } - - const params = - (clickup || app).getParamsForCustomTaskIdCall(useCustomTaskIds, authorizedTeamId); - - const items = await (clickup || app).getChecklistItems({ - taskId, - checklistId, - params, - }); - - return items.map((item) => ({ - label: item.name, - value: item.id, - })); - }, - }, - customFieldId: { - type: "string", - label: "Custom Field", - description: "Select a custom field", - options: async () => { - const { - app, - clickup, - listId, - } = this; - if (!listId) { - return []; - } - const fields = await (clickup || app).getCustomFields({ - listId, - }); - - return fields.map((field) => ({ - label: field.name, - value: field.id, - })); - }, - }, - commentId: { - type: "string", - label: "Comment", - description: "The id of a comment", - options: async () => { - const { - app, - clickup, - taskId, - listId, - viewId, - } = this; - - if (!taskId && !listId && !viewId) { - throw new ConfigurationError("Please enter the List, View, or Task to retrieve Comments from"); - } - let comments = []; - - if (taskId) { - comments = comments.concat(await (clickup || app).getTaskComments({ - taskId, - params: {}, - })); - } - if (listId) { - comments = comments.concat(await (clickup || app).getListComments({ - listId, - })); - } - if (viewId) { - comments = comments.concat(await (clickup || app).getViewComments({ - viewId, - })); - } - - return comments.map((comment) => ({ - label: comment.comment_text, - value: comment.id, - })); - }, - }, -}; diff --git a/components/clickup/package.json b/components/clickup/package.json index 42a72bed2f7ec..a9b47e99b45bf 100644 --- a/components/clickup/package.json +++ b/components/clickup/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/clickup", - "version": "0.3.0", + "version": "0.3.1", "description": "Pipedream Clickup Components", "main": "clickup.app.mjs", "keywords": [ @@ -14,7 +14,7 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.0", + "@pipedream/platform": "^3.1.0", "crypto": "^1.0.1", "lodash": "^4.17.21" } diff --git a/components/clickup/sources/new-folder/new-folder.mjs b/components/clickup/sources/new-folder/new-folder.mjs index ec5eec8fa83ce..a99f60b369613 100644 --- a/components/clickup/sources/new-folder/new-folder.mjs +++ b/components/clickup/sources/new-folder/new-folder.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-new-folder", name: "New Folder (Instant)", description: "Emit new event when a new folder is created", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", type: "source", methods: { diff --git a/components/clickup/sources/new-list/new-list.mjs b/components/clickup/sources/new-list/new-list.mjs index ce91399c4edc8..7e2b0ba2f7876 100644 --- a/components/clickup/sources/new-list/new-list.mjs +++ b/components/clickup/sources/new-list/new-list.mjs @@ -6,7 +6,7 @@ export default { key: "clickup-new-list", name: "New List (Instant)", description: "Emit new event when a new list is created", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", type: "source", methods: { diff --git a/components/clickup/sources/new-task-advanced/new-task-advanced.mjs b/components/clickup/sources/new-task-advanced/new-task-advanced.mjs index e311b83349508..8fb206d09a4ce 100644 --- a/components/clickup/sources/new-task-advanced/new-task-advanced.mjs +++ b/components/clickup/sources/new-task-advanced/new-task-advanced.mjs @@ -1,4 +1,3 @@ -import builder from "../../common/builder.mjs"; import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; @@ -7,7 +6,7 @@ export default { key: "clickup-new-task-advanced", name: "New Task Advanced (Instant)", description: "Emit new event when a new task is created matching the filter", - version: "0.0.6", + version: "0.0.7", dedupe: "unique", type: "source", props: { @@ -21,17 +20,28 @@ export default { }), ], }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.app, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], optional: true, + }, + listId: { propDefinition: [ common.props.app, - "listWithFolder", + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], + optional: true, }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - }), methods: { ...common.methods, _getMeta({ task_id: taskId }) { diff --git a/components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs b/components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs index 61f21dfe69d92..4874d8de2d1fe 100644 --- a/components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs +++ b/components/clickup/sources/new-task-comment-updated/new-task-comment-updated.mjs @@ -1,4 +1,3 @@ -import builder from "../../common/builder.mjs"; import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; @@ -7,7 +6,7 @@ export default { key: "clickup-new-task-comment-updated", name: "New Task Comment Updated (Instant)", description: "Emit new event when a new task comment is updated", - version: "0.0.1", + version: "0.0.2", dedupe: "unique", type: "source", props: { @@ -21,17 +20,28 @@ export default { }), ], }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.app, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], optional: true, + }, + listId: { propDefinition: [ common.props.app, - "listWithFolder", + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], + optional: true, }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - }), methods: { ...common.methods, _getMeta({ diff --git a/components/clickup/sources/new-task-comment/new-task-comment.mjs b/components/clickup/sources/new-task-comment/new-task-comment.mjs index c945cf8fc359f..5e06f4bb39023 100644 --- a/components/clickup/sources/new-task-comment/new-task-comment.mjs +++ b/components/clickup/sources/new-task-comment/new-task-comment.mjs @@ -1,4 +1,3 @@ -import builder from "../../common/builder.mjs"; import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; @@ -7,7 +6,7 @@ export default { key: "clickup-new-task-comment", name: "New Task Comment (Instant)", description: "Emit new event when a new task comment is posted", - version: "0.0.1", + version: "0.0.2", dedupe: "unique", type: "source", props: { @@ -21,17 +20,28 @@ export default { }), ], }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.app, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], optional: true, + }, + listId: { propDefinition: [ common.props.app, - "listWithFolder", + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], + optional: true, }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - }), methods: { ...common.methods, _getMeta({ diff --git a/components/clickup/sources/new-task/new-task.mjs b/components/clickup/sources/new-task/new-task.mjs index ac421e120060a..83b5a04bdd581 100644 --- a/components/clickup/sources/new-task/new-task.mjs +++ b/components/clickup/sources/new-task/new-task.mjs @@ -1,4 +1,3 @@ -import builder from "../../common/builder.mjs"; import common from "../common/common.mjs"; import sampleEmit from "./test-event.mjs"; @@ -7,7 +6,7 @@ export default { key: "clickup-new-task", name: "New Task (Instant)", description: "Emit new event when a new task is created", - version: "0.1.5", + version: "0.1.6", dedupe: "unique", type: "source", props: { @@ -21,17 +20,28 @@ export default { }), ], }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.app, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], optional: true, + }, + listId: { propDefinition: [ common.props.app, - "listWithFolder", + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), ], + optional: true, }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - }), methods: { ...common.methods, _getMeta({ task_id: taskId }) { diff --git a/components/clickup/sources/updated-task/updated-task.mjs b/components/clickup/sources/updated-task/updated-task.mjs index e4502079f3885..777cbb553d838 100644 --- a/components/clickup/sources/updated-task/updated-task.mjs +++ b/components/clickup/sources/updated-task/updated-task.mjs @@ -1,5 +1,3 @@ -import builder from "../../common/builder.mjs"; -import propsFragments from "../../common/props-fragments.mjs"; import common from "../common/common.mjs"; import constants from "../common/constants.mjs"; import sampleEmit from "./test-event.mjs"; @@ -9,7 +7,7 @@ export default { key: "clickup-updated-task", name: "New Updated Task (Instant)", description: "Emit new event when a new task is updated", - version: "0.0.11", + version: "0.0.12", dedupe: "unique", type: "source", props: { @@ -30,26 +28,41 @@ export default { options: constants.TASK_FIELDS, optional: true, }, - listWithFolder: { + folderId: { + propDefinition: [ + common.props.app, + "folderId", + (c) => ({ + spaceId: c.spaceId, + }), + ], + optional: true, + }, + listId: { + propDefinition: [ + common.props.app, + "listId", + (c) => ({ + folderId: c.folderId, + spaceId: c.spaceId, + }), + ], optional: true, + }, + customFieldIds: { propDefinition: [ common.props.app, - "listWithFolder", + "customFieldId", + (c) => ({ + listId: c.listId, + }), ], + label: "Custom Fields", + type: "string[]", + description: "Select a custom field to filter", + optional: true, }, }, - additionalProps: builder.buildListProps({ - listPropsOptional: true, - tailProps: { - customFieldIds: { - ...propsFragments.customFieldId, - label: "Custom Fields", - type: "string[]", - description: "Select a custom field to filter", - optional: true, - }, - }, - }), methods: { ...common.methods, _getMeta(historyItems) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e492d9ef4862e..09f9b14152eb4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -990,8 +990,7 @@ importers: specifier: ^3.0.0 version: 3.0.3 - components/arpoone: - specifiers: {} + components/arpoone: {} components/arxiv: {} @@ -2541,8 +2540,8 @@ importers: components/clickup: dependencies: '@pipedream/platform': - specifier: ^3.0.0 - version: 3.0.3 + specifier: ^3.1.0 + version: 3.1.0 crypto: specifier: ^1.0.1 version: 1.0.1 @@ -6794,8 +6793,7 @@ importers: specifier: ^1.6.5 version: 1.6.6 - components/issue_badge: - specifiers: {} + components/issue_badge: {} components/itemize: dependencies: @@ -7449,11 +7447,9 @@ importers: specifier: ^3.0.0 version: 3.0.3 - components/limitless: - specifiers: {} + components/limitless: {} - components/limitless_ai: - specifiers: {} + components/limitless_ai: {} components/limoexpress: dependencies: @@ -10372,8 +10368,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/postmaster: - specifiers: {} + components/postmaster: {} components/power_automate: {} @@ -15558,8 +15553,7 @@ importers: specifier: ^3.0.0 version: 3.0.3 - components/zowie: - specifiers: {} + components/zowie: {} components/zulip: dependencies: @@ -15709,14 +15703,6 @@ importers: specifier: ^6.0.0 version: 6.2.0 - modelcontextprotocol/node_modules2/@modelcontextprotocol/sdk/dist/cjs: {} - - modelcontextprotocol/node_modules2/@modelcontextprotocol/sdk/dist/esm: {} - - modelcontextprotocol/node_modules2/zod-to-json-schema/dist/cjs: {} - - modelcontextprotocol/node_modules2/zod-to-json-schema/dist/esm: {} - packages/ai: dependencies: '@pipedream/sdk': @@ -36158,6 +36144,8 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) + transitivePeerDependencies: + - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: