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
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(asana): add 59 AI agent actions for users, teams, attachments and paid-plan features (#16072)
Odai Ahmadf4428dcba7a7
diff --git a/bun.lock b/bun.lockindex 889ba24f799..6d2e3064753 100644--- a/bun.lock+++ b/bun.lock@@ -766,13 +766,14 @@},"packages/pieces/community/asana": {"name": "@activepieces/piece-asana",- "version": "0.6.2",+ "version": "0.7.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*","@activepieces/pieces-common": "workspace:*","@activepieces/pieces-framework": "workspace:*","dayjs": "1.11.9",+ "form-data": "4.0.6",},"devDependencies": {"tslib": "2.6.2",diff --git a/packages/pieces/community/asana/package.json b/packages/pieces/community/asana/package.jsonindex 8f716314610..d59f7b60e57 100644--- a/packages/pieces/community/asana/package.json+++ b/packages/pieces/community/asana/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-asana",- "version": "0.6.2",+ "version": "0.7.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {@@ -13,6 +13,7 @@"@activepieces/pieces-common": "workspace:*","@activepieces/pieces-framework": "workspace:*","dayjs": "1.11.9",+ "form-data": "4.0.6","@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*"},diff --git a/packages/pieces/community/asana/src/i18n/translation.json b/packages/pieces/community/asana/src/i18n/translation.jsonindex 0560c099af5..688bae2279a 100644--- a/packages/pieces/community/asana/src/i18n/translation.json+++ b/packages/pieces/community/asana/src/i18n/translation.json@@ -441,11 +441,413 @@"Partial (goals)": "Partial (goals)","Missed (goals)": "Missed (goals)","Dropped": "Dropped",+ "Get User": "Get User",+ "List Users": "List Users",+ "List My Favorites": "List My Favorites",+ "Get Workspace": "Get Workspace",+ "List Workspace Memberships": "List Workspace Memberships",+ "Get Workspace Membership": "Get Workspace Membership",+ "Add User to Workspace": "Add User to Workspace",+ "Remove User from Workspace": "Remove User from Workspace",+ "Create Team": "Create Team",+ "Get Team": "Get Team",+ "Update Team": "Update Team",+ "List User Teams": "List User Teams",+ "Add User to Team": "Add User to Team",+ "Remove User from Team": "Remove User from Team",+ "List Team Memberships": "List Team Memberships",+ "Get Team Membership": "Get Team Membership",+ "Get Attachment": "Get Attachment",+ "List Attachments": "List Attachments",+ "Delete Attachment": "Delete Attachment",+ "List Access Requests": "List Access Requests",+ "Request Access": "Request Access",+ "Approve Access Request": "Approve Access Request",+ "Reject Access Request": "Reject Access Request",+ "List Reactions": "List Reactions",+ "Get an Asana user by gid or email.": "Get an Asana user by gid or email.",+ "List the users in an Asana workspace or team.": "List the users in an Asana workspace or team.",+ "List the connected user's favorites of one type in a workspace.": "List the connected user's favorites of one type in a workspace.",+ "Get an Asana workspace or organization.": "Get an Asana workspace or organization.",+ "List who belongs to an Asana workspace and with what role.": "List who belongs to an Asana workspace and with what role.",+ "Get one Asana workspace membership.": "Get one Asana workspace membership.",+ "Invite or add a user to an Asana workspace or organization.": "Invite or add a user to an Asana workspace or organization.",+ "Remove a user from an Asana workspace or organization.": "Remove a user from an Asana workspace or organization.",+ "Create a team in an Asana organization.": "Create a team in an Asana organization.",+ "Get an Asana team.": "Get an Asana team.",+ "Change the name, description, visibility or endorsement of an Asana team.": "Change the name, description, visibility or endorsement of an Asana team.",+ "List the teams a user belongs to in an Asana organization.": "List the teams a user belongs to in an Asana organization.",+ "Add a user to an Asana team.": "Add a user to an Asana team.",+ "Remove a user from an Asana team.": "Remove a user from an Asana team.",+ "List the members of an Asana team, or the team memberships of a user.": "List the members of an Asana team, or the team memberships of a user.",+ "Get one Asana team membership.": "Get one Asana team membership.",+ "Get an Asana attachment and its download link.": "Get an Asana attachment and its download link.",+ "List the attachments on an Asana task, project or project brief.": "List the attachments on an Asana task, project or project brief.",+ "Permanently delete an attachment from Asana.": "Permanently delete an attachment from Asana.",+ "List pending requests to access a private Asana project or portfolio.": "List pending requests to access a private Asana project or portfolio.",+ "Ask for access to a private Asana project or portfolio.": "Ask for access to a private Asana project or portfolio.",+ "Approve a pending request to access an Asana project or portfolio.": "Approve a pending request to access an Asana project or portfolio.",+ "Decline a pending request to access an Asana project or portfolio.": "Decline a pending request to access an Asana project or portfolio.",+ "List who reacted with a given emoji on an Asana comment or status update.": "List who reacted with a given emoji on an Asana comment or status update.",+ "Favorite Type": "Favorite Type",+ "Workspace Membership GID": "Workspace Membership GID",+ "Team Name": "Team Name",+ "Visibility": "Visibility",+ "Endorsed": "Endorsed",+ "Team Membership GID": "Team Membership GID",+ "Attachment GID": "Attachment GID",+ "Project or Portfolio GID": "Project or Portfolio GID",+ "Requester": "Requester",+ "Message": "Message",+ "Access Request GID": "Access Request GID",+ "Story or Status Update GID": "Story or Status Update GID",+ "Emoji": "Emoji","Exact due moment as an ISO 8601 date-time that ends in Z (UTC) or a +hh:mm/-hh:mm offset, for example 2026-10-15T17:00:00Z or 2026-10-15T19:00:00+02:00; a value without an offset is rejected. Cannot be combined with Due Date.": "Exact due moment as an ISO 8601 date-time that ends in Z (UTC) or a +hh:mm/-hh:mm offset, for example 2026-10-15T17:00:00Z or 2026-10-15T19:00:00+02:00; a value without an offset is rejected. Cannot be combined with Due Date.","Tags to apply, one per item: a tag gid or the exact tag name in this workspace. Names are matched case-insensitively; an all-digit value is used as a gid when such a tag exists and is otherwise matched as a name; an unknown name fails the call. Create new tags first with Create Tag.": "Tags to apply, one per item: a tag gid or the exact tag name in this workspace. Names are matched case-insensitively; an all-digit value is used as a gid when such a tag exists and is otherwise matched as a name; an unknown name fails the call. Create new tags first with Create Tag.","New exact due moment as an ISO 8601 date-time that ends in Z (UTC) or a +hh:mm/-hh:mm offset, for example 2026-10-15T17:00:00Z or 2026-10-15T19:00:00+02:00; a value without an offset is rejected. Cannot be combined with Due Date.": "New exact due moment as an ISO 8601 date-time that ends in Z (UTC) or a +hh:mm/-hh:mm offset, for example 2026-10-15T17:00:00Z or 2026-10-15T19:00:00+02:00; a value without an offset is rejected. Cannot be combined with Due Date.",+ "User to look up: \"me\", an email address or a user gid. Obtain gids from List Users or Search Workspace Objects (object type user).": "User to look up: \"me\", an email address or a user gid. Obtain gids from List Users or Search Workspace Objects (object type user).",+ "Gid of the workspace or organization whose users to list. Obtain it from List Workspaces. Set this, Team GID, or both.": "Gid of the workspace or organization whose users to list. Obtain it from List Workspaces. Set this, Team GID, or both.",+ "Gid of the team whose users to list. Obtain it from List Teams. Set this, Workspace GID, or both.": "Gid of the team whose users to list. Obtain it from List Teams. Set this, Workspace GID, or both.",+ "Maximum number of users to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of users to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the workspace to read favorites from. Obtain it from List Workspaces or Get Current User.": "Gid of the workspace to read favorites from. Obtain it from List Workspaces or Get Current User.",+ "Kind of favorites to return.": "Kind of favorites to return.",+ "Maximum number of favorites to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of favorites to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the workspace or organization. Obtain it from List Workspaces or Get Current User.": "Gid of the workspace or organization. Obtain it from List Workspaces or Get Current User.",+ "Gid of the workspace or organization. Obtain it from List Workspaces.": "Gid of the workspace or organization. Obtain it from List Workspaces.",+ "Only return the membership of this user: \"me\", an email address or a user gid. Leave empty to list everyone.": "Only return the membership of this user: \"me\", an email address or a user gid. Leave empty to list everyone.",+ "Gid of the workspace membership. Obtain it from List Workspace Memberships.": "Gid of the workspace membership. Obtain it from List Workspace Memberships.",+ "User to add: an email address or a user gid.": "User to add: an email address or a user gid.",+ "User to remove: an email address or a user gid. Obtain it from List Users or List Workspace Memberships.": "User to remove: an email address or a user gid. Obtain it from List Users or List Workspace Memberships.",+ "Name of the new team, for example \"Marketing\".": "Name of the new team, for example \"Marketing\".",+ "Plain-text description of the team.": "Plain-text description of the team.",+ "Who in the organization can see and join the team. Leave empty for the Asana default.": "Who in the organization can see and join the team. Leave empty for the Asana default.",+ "Gid of the team. Obtain it from List Teams or List User Teams.": "Gid of the team. Obtain it from List Teams or List User Teams.",+ "Gid of the team to update. Obtain it from List Teams or List User Teams.": "Gid of the team to update. Obtain it from List Teams or List User Teams.",+ "New team name. Leave empty to keep it.": "New team name. Leave empty to keep it.",+ "New visibility. Leave empty to keep it.": "New visibility. Leave empty to keep it.",+ "Yes to mark the team as endorsed, No to remove the endorsement. Leave empty to keep it.": "Yes to mark the team as endorsed, No to remove the endorsement. Leave empty to keep it.",+ "User whose teams to list: \"me\", an email address or a user gid.": "User whose teams to list: \"me\", an email address or a user gid.",+ "Gid of the organization to list teams in. Obtain it from List Workspaces (is_organization must be true).": "Gid of the organization to list teams in. Obtain it from List Workspaces (is_organization must be true).",+ "User to add: \"me\", an email address or a user gid.": "User to add: \"me\", an email address or a user gid.",+ "User to remove: \"me\", an email address or a user gid. Obtain it from List Team Memberships.": "User to remove: \"me\", an email address or a user gid. Obtain it from List Team Memberships.",+ "Gid of the team whose members to list. Obtain it from List Teams. Set this, or User with Workspace GID.": "Gid of the team whose members to list. Obtain it from List Teams. Set this, or User with Workspace GID.",+ "User whose team memberships to list: \"me\", an email address or a user gid. Requires Workspace GID.": "User whose team memberships to list: \"me\", an email address or a user gid. Requires Workspace GID.",+ "Gid of the organization to search in. Required with User, and only used with User.": "Gid of the organization to search in. Required with User, and only used with User.",+ "Gid of the team membership. Obtain it from List Team Memberships or Add User to Team.": "Gid of the team membership. Obtain it from List Team Memberships or Add User to Team.",+ "Gid of the attachment. Obtain it from List Attachments.": "Gid of the attachment. Obtain it from List Attachments.",+ "Gid of the task, project or project brief whose attachments to list. Obtain a task gid from List Project Tasks or Get Task.": "Gid of the task, project or project brief whose attachments to list. Obtain a task gid from List Project Tasks or Get Task.",+ "Maximum number of attachments to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of attachments to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the attachment to delete. Obtain it from List Attachments.": "Gid of the attachment to delete. Obtain it from List Attachments.",+ "Gid of the project or portfolio whose access requests to list. Obtain a project gid from List Projects.": "Gid of the project or portfolio whose access requests to list. Obtain a project gid from List Projects.",+ "Only return requests from this user: \"me\", an email address or a user gid. Leave empty for all requesters.": "Only return requests from this user: \"me\", an email address or a user gid. Leave empty for all requesters.",+ "Gid of the private project or portfolio to request access to.": "Gid of the private project or portfolio to request access to.",+ "Optional note for the owners explaining why access is needed.": "Optional note for the owners explaining why access is needed.",+ "Gid of the pending access request. Obtain it from List Access Requests.": "Gid of the pending access request. Obtain it from List Access Requests.",+ "Gid of the story (for example a task comment) or status update. Obtain it from List Task Stories or List Status Updates.": "Gid of the story (for example a task comment) or status update. Obtain it from List Task Stories or List Status Updates.",+ "The emoji character itself, not a name or shortcode, for example the thumbs-up character (U+1F44D). Use the base emoji without a skin-tone variant.": "The emoji character itself, not a name or shortcode, for example the thumbs-up character (U+1F44D). Use the base emoji without a skin-tone variant.",+ "Maximum number of reactions to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of reactions to return in this page, from 1 to 100. Defaults to 50.",+ "Public to the organization": "Public to the organization",+ "Membership by request": "Membership by request",+ "Private (secret)": "Private (secret)",+ "Search Tasks": "Search Tasks",+ "Add Task Dependencies": "Add Task Dependencies",+ "List Task Dependencies": "List Task Dependencies",+ "Remove Task Dependencies": "Remove Task Dependencies",+ "Create Custom Field": "Create Custom Field",+ "Get Custom Field": "Get Custom Field",+ "List Custom Fields": "List Custom Fields",+ "Update Custom Field": "Update Custom Field",+ "Delete Custom Field": "Delete Custom Field",+ "Create Custom Field Enum Option": "Create Custom Field Enum Option",+ "Reorder Custom Field Enum Option": "Reorder Custom Field Enum Option",+ "Update Custom Field Enum Option": "Update Custom Field Enum Option",+ "List Project Templates": "List Project Templates",+ "Instantiate Project Template": "Instantiate Project Template",+ "List Task Templates": "List Task Templates",+ "List My Portfolios": "List My Portfolios",+ "Get Portfolio": "Get Portfolio",+ "List Portfolio Items": "List Portfolio Items",+ "Add Portfolio Item": "Add Portfolio Item",+ "Remove Portfolio Item": "Remove Portfolio Item",+ "List Goals": "List Goals",+ "Get Goal": "Get Goal",+ "List Goal Relationships": "List Goal Relationships",+ "Add Goal Supporting Relationship": "Add Goal Supporting Relationship",+ "List Time Periods": "List Time Periods",+ "Get Time Period": "Get Time Period",+ "Create Allocation": "Create Allocation",+ "Get Allocation": "Get Allocation",+ "List Allocations": "List Allocations",+ "Update Allocation": "Update Allocation",+ "Delete Allocation": "Delete Allocation",+ "List Time Tracking Entries": "List Time Tracking Entries",+ "List Custom Types": "List Custom Types",+ "Update User": "Update User","Share a project, goal, portfolio or custom field with a user or team.": "Share a project, goal, portfolio or custom field with a user or team.",+ "Search the tasks of an Asana workspace with advanced filters (paid Asana plans only).": "Search the tasks of an Asana workspace with advanced filters (paid Asana plans only).",+ "Mark other Asana tasks as dependencies that block a task (paid Asana plans only).": "Mark other Asana tasks as dependencies that block a task (paid Asana plans only).",+ "List the tasks that an Asana task depends on (paid Asana plans only).": "List the tasks that an Asana task depends on (paid Asana plans only).",+ "Unlink dependency tasks from an Asana task (paid Asana plans only).": "Unlink dependency tasks from an Asana task (paid Asana plans only).",+ "Create a custom field definition in an Asana workspace (paid Asana plans only).": "Create a custom field definition in an Asana workspace (paid Asana plans only).",+ "Get the definition of an Asana custom field (paid Asana plans only).": "Get the definition of an Asana custom field (paid Asana plans only).",+ "List the custom field definitions of an Asana workspace (paid Asana plans only).": "List the custom field definitions of an Asana workspace (paid Asana plans only).",+ "Change the name, description, number format or notifications of an Asana custom field (paid Asana plans only).": "Change the name, description, number format or notifications of an Asana custom field (paid Asana plans only).",+ "Delete an Asana custom field definition (paid Asana plans only).": "Delete an Asana custom field definition (paid Asana plans only).",+ "Add a new option to an Asana single-select or multi-select custom field (paid Asana plans only).": "Add a new option to an Asana single-select or multi-select custom field (paid Asana plans only).",+ "Move an option of an Asana select custom field before or after another option (paid Asana plans only).": "Move an option of an Asana select custom field before or after another option (paid Asana plans only).",+ "Rename, recolor, disable or re-enable an option of an Asana select custom field (paid Asana plans only).": "Rename, recolor, disable or re-enable an option of an Asana select custom field (paid Asana plans only).",+ "Start creating a new Asana project from a project template (paid Asana plans only).": "Start creating a new Asana project from a project template (paid Asana plans only).",+ "List the task templates of an Asana project (paid Asana plans only).": "List the task templates of an Asana project (paid Asana plans only).",+ "Get the details of an Asana portfolio (Advanced Asana plans and up).": "Get the details of an Asana portfolio (Advanced Asana plans and up).",+ "List the projects and nested portfolios inside an Asana portfolio (Advanced Asana plans and up).": "List the projects and nested portfolios inside an Asana portfolio (Advanced Asana plans and up).",+ "Add a project or portfolio to an Asana portfolio (Advanced Asana plans and up).": "Add a project or portfolio to an Asana portfolio (Advanced Asana plans and up).",+ "Take a project or portfolio out of an Asana portfolio (Advanced Asana plans and up).": "Take a project or portfolio out of an Asana portfolio (Advanced Asana plans and up).",+ "List Asana goals by workspace, team, time period or supporting work (Advanced Asana plans and up).": "List Asana goals by workspace, team, time period or supporting work (Advanced Asana plans and up).",+ "Get the details and progress metric of an Asana goal (Advanced Asana plans and up).": "Get the details and progress metric of an Asana goal (Advanced Asana plans and up).",+ "List the subgoals and supporting work linked to an Asana goal (Advanced Asana plans and up).": "List the subgoals and supporting work linked to an Asana goal (Advanced Asana plans and up).",+ "Link a subgoal, project, task or portfolio as supporting an Asana goal (Advanced Asana plans and up).": "Link a subgoal, project, task or portfolio as supporting an Asana goal (Advanced Asana plans and up).",+ "List the goal time periods (fiscal years, quarters) of an Asana workspace (Advanced Asana plans and up).": "List the goal time periods (fiscal years, quarters) of an Asana workspace (Advanced Asana plans and up).",+ "Get one Asana goal time period (Advanced Asana plans and up).": "Get one Asana goal time period (Advanced Asana plans and up).",+ "Allocate a person's time to an Asana project for a date range (Advanced Asana plans and up).": "Allocate a person's time to an Asana project for a date range (Advanced Asana plans and up).",+ "Get one Asana resource-management allocation (Advanced Asana plans and up).": "Get one Asana resource-management allocation (Advanced Asana plans and up).",+ "List Asana resource-management allocations for a project or a person (Advanced Asana plans and up).": "List Asana resource-management allocations for a project or a person (Advanced Asana plans and up).",+ "Change the dates, effort or assignee of an Asana allocation (Advanced Asana plans and up).": "Change the dates, effort or assignee of an Asana allocation (Advanced Asana plans and up).",+ "Delete an Asana resource-management allocation (Advanced Asana plans and up).": "Delete an Asana resource-management allocation (Advanced Asana plans and up).",+ "List logged time entries for a task, project, portfolio, user or workspace (Advanced Asana plans and up).": "List logged time entries for a task, project, portfolio, user or workspace (Advanced Asana plans and up).",+ "List the custom task types of an Asana project or workspace (Advanced Asana plans and up).": "List the custom task types of an Asana project or workspace (Advanced Asana plans and up).",+ "Set a user's profile custom fields (or your own name) in an Asana workspace (higher Asana plans only).": "Set a user's profile custom fields (or your own name) in an Asana workspace (higher Asana plans only).",+ "Task Type": "Task Type",+ "Assigned To (any of)": "Assigned To (any of)",+ "In Projects (any of)": "In Projects (any of)",+ "In Sections (any of)": "In Sections (any of)",+ "Tagged With (any of)": "Tagged With (any of)",+ "Blocked": "Blocked",+ "Subtask": "Subtask",+ "Due After": "Due After",+ "Due Before": "Due Before",+ "Modified After": "Modified After",+ "Created After": "Created After",+ "Sort By": "Sort By",+ "Sort Ascending": "Sort Ascending",+ "Dependency Task GIDs": "Dependency Task GIDs",+ "Field Name": "Field Name",+ "Field Type": "Field Type",+ "Option Names": "Option Names",+ "Decimal Places": "Decimal Places",+ "Number Format": "Number Format",+ "Currency Code": "Currency Code",+ "Custom Label": "Custom Label",+ "Custom Label Position": "Custom Label Position",+ "Notify Followers on Change": "Notify Followers on Change",+ "Custom Field GID": "Custom Field GID",+ "Option Name": "Option Name",+ "Insert Before Option GID": "Insert Before Option GID",+ "Insert After Option GID": "Insert After Option GID",+ "Option GID to Move": "Option GID to Move",+ "Before Option GID": "Before Option GID",+ "After Option GID": "After Option GID",+ "Option GID": "Option GID",+ "Enabled": "Enabled",+ "Project Template GID": "Project Template GID",+ "Requested Dates": "Requested Dates",+ "Requested Roles": "Requested Roles",+ "Strict Dates": "Strict Dates",+ "Portfolio GID": "Portfolio GID",+ "Item GID": "Item GID",+ "Insert Before Item GID": "Insert Before Item GID",+ "Insert After Item GID": "Insert After Item GID",+ "Supporting Project GID": "Supporting Project GID",+ "Supporting Task GID": "Supporting Task GID",+ "Supporting Portfolio GID": "Supporting Portfolio GID",+ "Workspace-Level Goals": "Workspace-Level Goals",+ "Time Period GIDs": "Time Period GIDs",+ "Goal GID": "Goal GID",+ "Relationship Type": "Relationship Type",+ "Parent Goal GID": "Parent Goal GID",+ "Supporting Resource GID": "Supporting Resource GID",+ "Contribution Weight": "Contribution Weight",+ "Insert Before Subgoal GID": "Insert Before Subgoal GID",+ "Insert After Subgoal GID": "Insert After Subgoal GID",+ "Start On": "Start On",+ "End On": "End On",+ "Time Period GID": "Time Period GID",+ "Assignee GID": "Assignee GID",+ "End Date": "End Date",+ "Effort Unit": "Effort Unit",+ "Effort Value": "Effort Value",+ "Allocation GID": "Allocation GID",+ "Attributed Project GID": "Attributed Project GID",+ "User GID": "User GID",+ "Entered From": "Entered From",+ "Entered To": "Entered To",+ "Name": "Name",+ "Custom Field Values": "Custom Field Values",+ "Gid of the workspace to search. Obtain it from List Workspaces.": "Gid of the workspace to search. Obtain it from List Workspaces.",+ "Words to match in the task name and description. Leave empty to filter only.": "Words to match in the task name and description. Leave empty to filter only.",+ "Only return tasks of this type. Leave empty for all types.": "Only return tasks of this type. Leave empty for all types.",+ "Users, any of whom may be the assignee: \"me\", an email address or a user gid.": "Users, any of whom may be the assignee: \"me\", an email address or a user gid.",+ "Project gids; tasks in any of them (or inheriting them from a parent task) match. Obtain gids from List Projects.": "Project gids; tasks in any of them (or inheriting them from a parent task) match. Obtain gids from List Projects.",+ "Section gids; tasks in any of them match. Setting Projects as well also returns every task of those projects, so leave Projects empty to search inside sections only.": "Section gids; tasks in any of them match. Setting Projects as well also returns every task of those projects, so leave Projects empty to search inside sections only.",+ "Tag gids; tasks carrying any of them match. Obtain gids from List Tags.": "Tag gids; tasks carrying any of them match. Obtain gids from List Tags.",+ "Yes for completed tasks only, No for incomplete tasks only. Leave empty for both.": "Yes for completed tasks only, No for incomplete tasks only. Leave empty for both.",+ "Yes for tasks that wait on incomplete dependencies, No for tasks that do not. Leave empty for both.": "Yes for tasks that wait on incomplete dependencies, No for tasks that do not. Leave empty for both.",+ "Yes for subtasks only, No for top-level tasks only. Leave empty for both.": "Yes for subtasks only, No for top-level tasks only. Leave empty for both.",+ "Only tasks due after this date, YYYY-MM-DD.": "Only tasks due after this date, YYYY-MM-DD.",+ "Only tasks due before this date, YYYY-MM-DD.": "Only tasks due before this date, YYYY-MM-DD.",+ "Only tasks modified after this ISO 8601 date-time, which must end in Z or an offset, for example 2026-10-01T00:00:00Z.": "Only tasks modified after this ISO 8601 date-time, which must end in Z or an offset, for example 2026-10-01T00:00:00Z.",+ "Only tasks created after this ISO 8601 date-time (ending in Z or an offset). Use it with Sort By Created at, ascending, to fetch the next page.": "Only tasks created after this ISO 8601 date-time (ending in Z or an offset). Use it with Sort By Created at, ascending, to fetch the next page.",+ "Result order. Leave empty for most recently modified first.": "Result order. Leave empty for most recently modified first.",+ "Yes to sort oldest or smallest first. Leave empty for descending.": "Yes to sort oldest or smallest first. Leave empty for descending.",+ "Gid of the blocked task. Obtain it from List Project Tasks or Search Workspace Objects.": "Gid of the blocked task. Obtain it from List Project Tasks or Search Workspace Objects.",+ "Gids of the tasks that must be completed first, at most 30.": "Gids of the tasks that must be completed first, at most 30.",+ "Gid of the task whose dependencies to list. Obtain it from List Project Tasks or Search Workspace Objects.": "Gid of the task whose dependencies to list. Obtain it from List Project Tasks or Search Workspace Objects.",+ "Gids of the dependency tasks to unlink. Obtain them from List Task Dependencies.": "Gids of the dependency tasks to unlink. Obtain them from List Task Dependencies.",+ "Gid of the workspace that will own the field; it cannot be moved later. Obtain it from List Workspaces.": "Gid of the workspace that will own the field; it cannot be moved later. Obtain it from List Workspaces.",+ "Name of the field, unique in the workspace, for example \"Priority\".": "Name of the field, unique in the workspace, for example \"Priority\".",+ "Kind of value the field holds. It cannot be changed after creation.": "Kind of value the field holds. It cannot be changed after creation.",+ "Plain-text description shown with the field.": "Plain-text description shown with the field.",+ "Only for single-select and multi-select fields: the option names in display order, for example High, Medium, Low (1 to 500 options).": "Only for single-select and multi-select fields: the option names in display order, for example High, Medium, Low (1 to 500 options).",+ "Only for number fields: digits after the decimal point, 0 to 6.": "Only for number fields: digits after the decimal point, 0 to 6.",+ "Only for number fields: how the value is displayed. Leave empty for plain numbers.": "Only for number fields: how the value is displayed. Leave empty for plain numbers.",+ "ISO 4217 code such as USD or EUR. Only used with the Currency format.": "ISO 4217 code such as USD or EUR. Only used with the Currency format.",+ "Unit text shown next to the value, for example \"pts\". Only used with the Custom label format.": "Unit text shown next to the value, for example \"pts\". Only used with the Custom label format.",+ "Where the custom label goes. Only used with the Custom label format.": "Where the custom label goes. Only used with the Custom label format.",+ "Yes to notify task followers when this field changes, No to stay silent. Leave empty for the Asana default.": "Yes to notify task followers when this field changes, No to stay silent. Leave empty for the Asana default.",+ "Gid of the custom field. Obtain it from List Custom Fields.": "Gid of the custom field. Obtain it from List Custom Fields.",+ "Gid of the workspace. Obtain it from List Workspaces.": "Gid of the workspace. Obtain it from List Workspaces.",+ "Maximum number of custom fields to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of custom fields to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the custom field to update. Obtain it from List Custom Fields.": "Gid of the custom field to update. Obtain it from List Custom Fields.",+ "New name, unique in the workspace. Leave empty to keep it.": "New name, unique in the workspace. Leave empty to keep it.",+ "Number fields only: digits after the decimal point, 0 to 6. Leave empty to keep it.": "Number fields only: digits after the decimal point, 0 to 6. Leave empty to keep it.",+ "Number fields only: new display format. Leave empty to keep it.": "Number fields only: new display format. Leave empty to keep it.",+ "ISO 4217 code such as USD, used with the Currency format. Leave empty to keep it.": "ISO 4217 code such as USD, used with the Currency format. Leave empty to keep it.",+ "Unit text used with the Custom label format. Leave empty to keep it.": "Unit text used with the Custom label format. Leave empty to keep it.",+ "Where the custom label goes. Leave empty to keep it.": "Where the custom label goes. Leave empty to keep it.",+ "Yes to notify task followers when this field changes, No to stop those notifications. Leave empty to keep the current setting.": "Yes to notify task followers when this field changes, No to stop those notifications. Leave empty to keep the current setting.",+ "Gid of the custom field to delete. Obtain it from List Custom Fields.": "Gid of the custom field to delete. Obtain it from List Custom Fields.",+ "Gid of the single-select or multi-select custom field. Obtain it from List Custom Fields.": "Gid of the single-select or multi-select custom field. Obtain it from List Custom Fields.",+ "Label of the new option, for example \"Blocked\".": "Label of the new option, for example \"Blocked\".",+ "Asana option color name, for example red, orange, yellow, green, blue, purple or none. Leave empty for none.": "Asana option color name, for example red, orange, yellow, green, blue, purple or none. Leave empty for none.",+ "Gid of an existing option of this field to place the new option before. Obtain it from Get Custom Field. Do not combine with Insert After.": "Gid of an existing option of this field to place the new option before. Obtain it from Get Custom Field. Do not combine with Insert After.",+ "Gid of an existing option of this field to place the new option after. Do not combine with Insert Before.": "Gid of an existing option of this field to place the new option after. Do not combine with Insert Before.",+ "Gid of the custom field that owns the options. Obtain it from List Custom Fields.": "Gid of the custom field that owns the options. Obtain it from List Custom Fields.",+ "Gid of the option to move. Obtain it from Get Custom Field (enum_options).": "Gid of the option to move. Obtain it from Get Custom Field (enum_options).",+ "Gid of the option to place the moved option directly before. Set this or After Option GID, not both.": "Gid of the option to place the moved option directly before. Set this or After Option GID, not both.",+ "Gid of the option to place the moved option directly after. Set this or Before Option GID, not both.": "Gid of the option to place the moved option directly after. Set this or Before Option GID, not both.",+ "Gid of the option to update. Obtain it from Get Custom Field (enum_options).": "Gid of the option to update. Obtain it from Get Custom Field (enum_options).",+ "New label. Leave empty to keep it.": "New label. Leave empty to keep it.",+ "New Asana option color name, for example red, green, blue or none. Leave empty to keep it.": "New Asana option color name, for example red, green, blue or none. Leave empty to keep it.",+ "Yes to make the option selectable again, No to disable (retire) it. Leave empty to keep the current state.": "Yes to make the option selectable again, No to disable (retire) it. Leave empty to keep the current state.",+ "Maximum number of templates to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of templates to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the template. Obtain it from List Project Templates.": "Gid of the template. Obtain it from List Project Templates.",+ "Name of the new project.": "Name of the new project.",+ "Organizations only: gid of the team for the new project. Leave empty to use the template's team.": "Organizations only: gid of the team for the new project. Leave empty to use the template's team.",+ "Who can see the new project. Leave empty for the default; organization admins may restrict the choices.": "Who can see the new project. Leave empty for the default; organization admins may restrict the choices.",+ "One row per date variable of the template: its gid (from requested_dates in List Project Templates; 1 = project start date, 2 = project due date) and a date in YYYY-MM-DD format.": "One row per date variable of the template: its gid (from requested_dates in List Project Templates; 1 = project start date, 2 = project due date) and a date in YYYY-MM-DD format.",+ "One row per template role: its gid (from requested_roles in List Project Templates) and the user to assign, as \"me\", an email address or a user gid.": "One row per template role: its gid (from requested_roles in List Project Templates) and the user to assign, as \"me\", an email address or a user gid.",+ "Yes to fail when any date variable of the template has no value in Requested Dates; No to leave missing dates empty. Leave empty for the Asana default.": "Yes to fail when any date variable of the template has no value in Requested Dates; No to leave missing dates empty. Leave empty for the Asana default.",+ "Gid of the project whose task templates to list. Obtain it from List Projects.": "Gid of the project whose task templates to list. Obtain it from List Projects.",+ "Maximum number of portfolios to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of portfolios to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the portfolio. Obtain it from List My Portfolios.": "Gid of the portfolio. Obtain it from List My Portfolios.",+ "Maximum number of items to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of items to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the project or portfolio to add. Obtain a project gid from List Projects.": "Gid of the project or portfolio to add. Obtain a project gid from List Projects.",+ "Gid of an item already in the portfolio to place the new item before. Do not combine with Insert After.": "Gid of an item already in the portfolio to place the new item before. Do not combine with Insert After.",+ "Gid of an item already in the portfolio to place the new item after. Do not combine with Insert Before.": "Gid of an item already in the portfolio to place the new item after. Do not combine with Insert Before.",+ "Gid of the project or portfolio to remove. Obtain it from List Portfolio Items.": "Gid of the project or portfolio to remove. Obtain it from List Portfolio Items.",+ "Gid of the workspace whose goals to list. Obtain it from List Workspaces.": "Gid of the workspace whose goals to list. Obtain it from List Workspaces.",+ "Gid of a team, to list only that team's goals. Obtain it from List Teams.": "Gid of a team, to list only that team's goals. Obtain it from List Teams.",+ "Gid of a project, to list the goals it supports.": "Gid of a project, to list the goals it supports.",+ "Gid of a task, to list the goals it supports.": "Gid of a task, to list the goals it supports.",+ "Gid of a portfolio, to list the goals it supports.": "Gid of a portfolio, to list the goals it supports.",+ "Yes for company-wide (workspace-level) goals only, No for team goals only. Requires Workspace GID. Leave empty for both.": "Yes for company-wide (workspace-level) goals only, No for team goals only. Requires Workspace GID. Leave empty for both.",+ "Only goals in these time periods. Obtain gids from List Time Periods.": "Only goals in these time periods. Obtain gids from List Time Periods.",+ "Maximum number of goals to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of goals to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the goal. Obtain it from List Goals.": "Gid of the goal. Obtain it from List Goals.",+ "Gid of the goal whose supporting relationships to list. Obtain it from List Goals.": "Gid of the goal whose supporting relationships to list. Obtain it from List Goals.",+ "Only return this kind of relationship. Leave empty for both.": "Only return this kind of relationship. Leave empty for both.",+ "Maximum number of relationships to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of relationships to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the goal being supported. Obtain it from List Goals.": "Gid of the goal being supported. Obtain it from List Goals.",+ "Gid of the goal, project, task or portfolio that supports the parent goal.": "Gid of the goal, project, task or portfolio that supports the parent goal.",+ "Share of the supporter's progress that counts toward the parent goal, from 0 to 1, for example 0.25. Leave empty for 0.": "Share of the supporter's progress that counts toward the parent goal, from 0 to 1, for example 0.25. Leave empty for 0.",+ "For a subgoal: gid of an existing subgoal to place it before. Do not combine with Insert After.": "For a subgoal: gid of an existing subgoal to place it before. Do not combine with Insert After.",+ "For a subgoal: gid of an existing subgoal to place it after. Do not combine with Insert Before.": "For a subgoal: gid of an existing subgoal to place it after. Do not combine with Insert Before.",+ "Narrow the list by period start date, YYYY-MM-DD (sent to Asana as start_on).": "Narrow the list by period start date, YYYY-MM-DD (sent to Asana as start_on).",+ "Narrow the list by period end date, YYYY-MM-DD (sent to Asana as end_on).": "Narrow the list by period end date, YYYY-MM-DD (sent to Asana as end_on).",+ "Maximum number of time periods to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of time periods to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the time period. Obtain it from List Time Periods or from the time_period of a goal.": "Gid of the time period. Obtain it from List Time Periods or from the time_period of a goal.",+ "Gid of the project the time is allocated to. Obtain it from List Projects.": "Gid of the project the time is allocated to. Obtain it from List Projects.",+ "Gid of the user or placeholder whose time is allocated. Obtain a user gid from List Users or Get Current User.": "Gid of the user or placeholder whose time is allocated. Obtain a user gid from List Users or Get Current User.",+ "First day of the allocation, YYYY-MM-DD.": "First day of the allocation, YYYY-MM-DD.",+ "Last day of the allocation, YYYY-MM-DD, on or after Start Date.": "Last day of the allocation, YYYY-MM-DD, on or after Start Date.",+ "Unit of Effort Value. Set together with Effort Value, or leave both empty.": "Unit of Effort Value. Set together with Effort Value, or leave both empty.",+ "Amount of effort in the chosen unit, for example 20 (hours) or 50 (percent).": "Amount of effort in the chosen unit, for example 20 (hours) or 50 (percent).",+ "Gid of the allocation. Obtain it from List Allocations.": "Gid of the allocation. Obtain it from List Allocations.",+ "Gid of a project, to list its allocations. Obtain it from List Projects.": "Gid of a project, to list its allocations. Obtain it from List Projects.",+ "Gid of a user or placeholder, to list their allocations.": "Gid of a user or placeholder, to list their allocations.",+ "Gid of the workspace, to scope an assignee's allocations. Obtain it from List Workspaces.": "Gid of the workspace, to scope an assignee's allocations. Obtain it from List Workspaces.",+ "Maximum number of allocations to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of allocations to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the allocation to update. Obtain it from List Allocations.": "Gid of the allocation to update. Obtain it from List Allocations.",+ "New first day, YYYY-MM-DD. Leave empty to keep it.": "New first day, YYYY-MM-DD. Leave empty to keep it.",+ "New last day, YYYY-MM-DD. Leave empty to keep it.": "New last day, YYYY-MM-DD. Leave empty to keep it.",+ "Unit of Effort Value. Set together with Effort Value, or leave both empty to keep the effort.": "Unit of Effort Value. Set together with Effort Value, or leave both empty to keep the effort.",+ "New amount of effort in the chosen unit.": "New amount of effort in the chosen unit.",+ "Gid of the user or placeholder to move the allocation to. Leave empty to keep it.": "Gid of the user or placeholder to move the allocation to. Leave empty to keep it.",+ "Gid of the allocation to delete. Obtain it from List Allocations.": "Gid of the allocation to delete. Obtain it from List Allocations.",+ "Gid of a task, to list the time logged on it.": "Gid of a task, to list the time logged on it.",+ "Gid of a project, to list the time attributed to it.": "Gid of a project, to list the time attributed to it.",+ "Gid of a portfolio, to list the time logged on its work.": "Gid of a portfolio, to list the time logged on its work.",+ "Gid of a user, to list the time they logged.": "Gid of a user, to list the time they logged.",+ "Gid of the workspace, to list time across it. Requires Entered From or Entered To.": "Gid of the workspace, to list time across it. Requires Entered From or Entered To.",+ "Start of the entry date range, YYYY-MM-DD.": "Start of the entry date range, YYYY-MM-DD.",+ "End of the entry date range, YYYY-MM-DD.": "End of the entry date range, YYYY-MM-DD.",+ "Maximum number of entries to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of entries to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of a project, to list the custom types it uses. Set this or Workspace GID, not both.": "Gid of a project, to list the custom types it uses. Set this or Workspace GID, not both.",+ "Gid of a workspace, to list all its custom types. Set this or Project GID, not both.": "Gid of a workspace, to list all its custom types. Set this or Project GID, not both.",+ "Maximum number of custom types to return in this page, from 1 to 100. Defaults to 50.": "Maximum number of custom types to return in this page, from 1 to 100. Defaults to 50.",+ "Gid of the workspace whose user profile to update. Obtain it from List Workspaces.": "Gid of the workspace whose user profile to update. Obtain it from List Workspaces.",+ "User to update: \"me\", an email address or a user gid.": "User to update: \"me\", an email address or a user gid.",+ "New display name. Asana only accepts this for the connected user (\"me\"). Leave empty to keep it.": "New display name. Asana only accepts this for the connected user (\"me\"). Leave empty to keep it.",+ "Map of custom field gid to new value, for example 1201234567890 = \"Berlin office\". Leave empty to keep them.": "Map of custom field gid to new value, for example 1201234567890 = \"Berlin office\". Leave empty to keep them.","User (custom fields only)": "User (custom fields only)",- "Gid of the project (or goal, portfolio, custom field or custom type) to share. Obtain a project gid from List Projects.": "Gid of the project (or goal, portfolio, custom field or custom type) to share. Obtain a project gid from List Projects.",- "Plain-text body; it is sent to Asana as escaped rich text inside <body>...</body>. Cannot be combined with HTML Text.": "Plain-text body; it is sent to Asana as escaped rich text inside <body>...</body>. Cannot be combined with HTML Text."+ "Milestone": "Milestone",+ "Approval": "Approval",+ "Custom task type": "Custom task type",+ "Modified at (default)": "Modified at (default)",+ "Created at": "Created at",+ "Due date": "Due date",+ "Completed at": "Completed at",+ "Likes": "Likes",+ "Relevance": "Relevance",+ "Number": "Number",+ "Single-select (enum)": "Single-select (enum)",+ "Multi-select (multi_enum)": "Multi-select (multi_enum)",+ "Date": "Date",+ "People": "People",+ "Currency": "Currency",+ "Percentage": "Percentage",+ "Custom label": "Custom label",+ "Duration": "Duration",+ "Identifier": "Identifier",+ "Before the value (prefix)": "Before the value (prefix)",+ "After the value (suffix)": "After the value (suffix)",+ "Public to the workspace": "Public to the workspace",+ "Private": "Private",+ "Subgoals": "Subgoals",+ "Supporting work (projects, tasks, portfolios)": "Supporting work (projects, tasks, portfolios)",+ "Hours": "Hours",+ "Percent of time": "Percent of time",+ "Gid of the project (or goal, portfolio, custom field or custom type) to share. Obtain a project gid from List Projects, or a custom field gid from List Custom Fields.": "Gid of the project (or goal, portfolio, custom field or custom type) to share. Obtain a project gid from List Projects, or a custom field gid from List Custom Fields.",+ "List the custom project templates of an Asana team, or of a plain workspace (paid Asana plans only).": "List the custom project templates of an Asana team, or of a plain workspace (paid Asana plans only).",+ "List the Asana portfolios owned by the connected user in a workspace (Advanced Asana plans and up).": "List the Asana portfolios owned by the connected user in a workspace (Advanced Asana plans and up).",+ "Plain-text body; it is sent to Asana as escaped rich text inside <body>...</body>. Cannot be combined with HTML Text.": "Plain-text body; it is sent to Asana as escaped rich text inside <body>...</body>. Cannot be combined with HTML Text.",+ "Gid of a plain (non-organization) workspace whose templates to list. Asana rejects organizations here; use Team GID for them. Set this or Team GID.": "Gid of a plain (non-organization) workspace whose templates to list. Asana rejects organizations here; use Team GID for them. Set this or Team GID.",+ "Gid of the team whose templates to list (preferred; required in organizations). Obtain it from List Teams. Set this or Workspace GID.": "Gid of the team whose templates to list (preferred; required in organizations). Obtain it from List Teams. Set this or Workspace GID.",+ "Upload Attachment": "Upload Attachment",+ "Upload a file, or attach a link, to an Asana task, project or project brief.": "Upload a file, or attach a link, to an Asana task, project or project brief.",+ "File": "File",+ "External URL": "External URL",+ "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.": "Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.",+ "The file to upload (up to 100 MB). Leave empty when attaching an External URL.": "The file to upload (up to 100 MB). Leave empty when attaching an External URL.",+ "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.": "An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.",+ "Display name of the attachment. Required with External URL; for a File it replaces the file name.": "Display name of the attachment. Required with External URL; for a File it replaces the file name."}\ No newline at end of filediff --git a/packages/pieces/community/asana/src/index.ts b/packages/pieces/community/asana/src/index.tsindex b4459a8d25a..e7eccd3d9b4 100644--- a/packages/pieces/community/asana/src/index.ts+++ b/packages/pieces/community/asana/src/index.ts@@ -70,6 +70,65 @@ import { asanaListTaskTagsAction } from './lib/actions/ai/list-task-tags';import { asanaAddTagToTaskAction } from './lib/actions/ai/add-tag-to-task';import { asanaRemoveTagFromTaskAction } from './lib/actions/ai/remove-tag-from-task';import { asanaListTagTasksAction } from './lib/actions/ai/list-tag-tasks';+import { asanaGetUserAction } from './lib/actions/ai/get-user';+import { asanaListUsersAction } from './lib/actions/ai/list-users';+import { asanaListFavoritesAction } from './lib/actions/ai/list-favorites';+import { asanaGetWorkspaceAction } from './lib/actions/ai/get-workspace';+import { asanaListWorkspaceMembershipsAction } from './lib/actions/ai/list-workspace-memberships';+import { asanaGetWorkspaceMembershipAction } from './lib/actions/ai/get-workspace-membership';+import { asanaAddUserToWorkspaceAction } from './lib/actions/ai/add-user-to-workspace';+import { asanaRemoveUserFromWorkspaceAction } from './lib/actions/ai/remove-user-from-workspace';+import { asanaCreateTeamAction } from './lib/actions/ai/create-team';+import { asanaGetTeamAction } from './lib/actions/ai/get-team';+import { asanaUpdateTeamAction } from './lib/actions/ai/update-team';+import { asanaListUserTeamsAction } from './lib/actions/ai/list-user-teams';+import { asanaAddUserToTeamAction } from './lib/actions/ai/add-user-to-team';+import { asanaRemoveUserFromTeamAction } from './lib/actions/ai/remove-user-from-team';+import { asanaListTeamMembershipsAction } from './lib/actions/ai/list-team-memberships';+import { asanaGetTeamMembershipAction } from './lib/actions/ai/get-team-membership';+import { asanaGetAttachmentAction } from './lib/actions/ai/get-attachment';+import { asanaListAttachmentsAction } from './lib/actions/ai/list-attachments';+import { asanaDeleteAttachmentAction } from './lib/actions/ai/delete-attachment';+import { asanaUploadAttachmentAction } from './lib/actions/ai/upload-attachment';+import { asanaListAccessRequestsAction } from './lib/actions/ai/list-access-requests';+import { asanaCreateAccessRequestAction } from './lib/actions/ai/create-access-request';+import { asanaApproveAccessRequestAction } from './lib/actions/ai/approve-access-request';+import { asanaRejectAccessRequestAction } from './lib/actions/ai/reject-access-request';+import { asanaListReactionsAction } from './lib/actions/ai/list-reactions';+import { asanaSearchTasksAction } from './lib/actions/ai/search-tasks';+import { asanaAddTaskDependenciesAction } from './lib/actions/ai/add-task-dependencies';+import { asanaListTaskDependenciesAction } from './lib/actions/ai/list-task-dependencies';+import { asanaRemoveTaskDependenciesAction } from './lib/actions/ai/remove-task-dependencies';+import { asanaCreateCustomFieldAction } from './lib/actions/ai/create-custom-field';+import { asanaGetCustomFieldAction } from './lib/actions/ai/get-custom-field';+import { asanaListCustomFieldsAction } from './lib/actions/ai/list-custom-fields';+import { asanaUpdateCustomFieldAction } from './lib/actions/ai/update-custom-field';+import { asanaDeleteCustomFieldAction } from './lib/actions/ai/delete-custom-field';+import { asanaCreateCustomFieldEnumOptionAction } from './lib/actions/ai/create-custom-field-enum-option';+import { asanaReorderCustomFieldEnumOptionAction } from './lib/actions/ai/reorder-custom-field-enum-option';+import { asanaUpdateCustomFieldEnumOptionAction } from './lib/actions/ai/update-custom-field-enum-option';+import { asanaListProjectTemplatesAction } from './lib/actions/ai/list-project-templates';+import { asanaInstantiateProjectTemplateAction } from './lib/actions/ai/instantiate-project-template';+import { asanaListTaskTemplatesAction } from './lib/actions/ai/list-task-templates';+import { asanaListPortfoliosAction } from './lib/actions/ai/list-portfolios';+import { asanaGetPortfolioAction } from './lib/actions/ai/get-portfolio';+import { asanaListPortfolioItemsAction } from './lib/actions/ai/list-portfolio-items';+import { asanaAddPortfolioItemAction } from './lib/actions/ai/add-portfolio-item';+import { asanaRemovePortfolioItemAction } from './lib/actions/ai/remove-portfolio-item';+import { asanaListGoalsAction } from './lib/actions/ai/list-goals';+import { asanaGetGoalAction } from './lib/actions/ai/get-goal';+import { asanaListGoalRelationshipsAction } from './lib/actions/ai/list-goal-relationships';+import { asanaAddGoalSupportingRelationshipAction } from './lib/actions/ai/add-goal-supporting-relationship';+import { asanaListTimePeriodsAction } from './lib/actions/ai/list-time-periods';+import { asanaGetTimePeriodAction } from './lib/actions/ai/get-time-period';+import { asanaCreateAllocationAction } from './lib/actions/ai/create-allocation';+import { asanaGetAllocationAction } from './lib/actions/ai/get-allocation';+import { asanaListAllocationsAction } from './lib/actions/ai/list-allocations';+import { asanaUpdateAllocationAction } from './lib/actions/ai/update-allocation';+import { asanaDeleteAllocationAction } from './lib/actions/ai/delete-allocation';+import { asanaListTimeTrackingEntriesAction } from './lib/actions/ai/list-time-tracking-entries';+import { asanaListCustomTypesAction } from './lib/actions/ai/list-custom-types';+import { asanaUpdateUserAction } from './lib/actions/ai/update-user';import { asanaAuth } from './lib/auth';export const asana = createPiece({@@ -147,6 +206,65 @@ export const asana = createPiece({asanaAddTagToTaskAction,asanaRemoveTagFromTaskAction,asanaListTagTasksAction,+ asanaGetUserAction,+ asanaListUsersAction,+ asanaListFavoritesAction,+ asanaGetWorkspaceAction,+ asanaListWorkspaceMembershipsAction,+ asanaGetWorkspaceMembershipAction,+ asanaAddUserToWorkspaceAction,+ asanaRemoveUserFromWorkspaceAction,+ asanaCreateTeamAction,+ asanaGetTeamAction,+ asanaUpdateTeamAction,+ asanaListUserTeamsAction,+ asanaAddUserToTeamAction,+ asanaRemoveUserFromTeamAction,+ asanaListTeamMembershipsAction,+ asanaGetTeamMembershipAction,+ asanaGetAttachmentAction,+ asanaListAttachmentsAction,+ asanaDeleteAttachmentAction,+ asanaUploadAttachmentAction,+ asanaListAccessRequestsAction,+ asanaCreateAccessRequestAction,+ asanaApproveAccessRequestAction,+ asanaRejectAccessRequestAction,+ asanaListReactionsAction,+ asanaSearchTasksAction,+ asanaAddTaskDependenciesAction,+ asanaListTaskDependenciesAction,+ asanaRemoveTaskDependenciesAction,+ asanaCreateCustomFieldAction,+ asanaGetCustomFieldAction,+ asanaListCustomFieldsAction,+ asanaUpdateCustomFieldAction,+ asanaDeleteCustomFieldAction,+ asanaCreateCustomFieldEnumOptionAction,+ asanaReorderCustomFieldEnumOptionAction,+ asanaUpdateCustomFieldEnumOptionAction,+ asanaListProjectTemplatesAction,+ asanaInstantiateProjectTemplateAction,+ asanaListTaskTemplatesAction,+ asanaListPortfoliosAction,+ asanaGetPortfolioAction,+ asanaListPortfolioItemsAction,+ asanaAddPortfolioItemAction,+ asanaRemovePortfolioItemAction,+ asanaListGoalsAction,+ asanaGetGoalAction,+ asanaListGoalRelationshipsAction,+ asanaAddGoalSupportingRelationshipAction,+ asanaListTimePeriodsAction,+ asanaGetTimePeriodAction,+ asanaCreateAllocationAction,+ asanaGetAllocationAction,+ asanaListAllocationsAction,+ asanaUpdateAllocationAction,+ asanaDeleteAllocationAction,+ asanaListTimeTrackingEntriesAction,+ asanaListCustomTypesAction,+ asanaUpdateUserAction,createCustomApiCallAction({baseUrl: () => `https://app.asana.com/api/1.0`,auth: asanaAuth,diff --git a/packages/pieces/community/asana/src/lib/actions/ai/add-goal-supporting-relationship.ts b/packages/pieces/community/asana/src/lib/actions/ai/add-goal-supporting-relationship.tsnew file mode 100644index 00000000000..e9dc0fe7a8c--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/add-goal-supporting-relationship.ts@@ -0,0 +1,65 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaAddGoalSupportingRelationshipAction = createAction({+ auth: asanaAuth,+ name: 'add_goal_supporting_relationship',+ classification: 'WRITE',+ displayName: 'Add Goal Supporting Relationship',+ description: 'Link a subgoal, project, task or portfolio as supporting an Asana goal (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Links a goal, project, task or portfolio as supporting a parent goal and returns the new goal relationship (gid, type, contribution weight). Contribution Weight (0 to 1, default 0) sets how much the supporter\'s progress counts toward an automatically calculated parent goal; it must be above 0 to count. Check List Goal Relationships first so the same resource is not linked twice. Goals need an Advanced or higher Asana plan. Not idempotent: it creates a relationship record, and Asana does not document what a repeat does.',+ idempotent: false,+ },+ props: {+ goal: Property.ShortText({+ displayName: 'Parent Goal GID',+ description: 'Gid of the goal being supported. Obtain it from List Goals.',+ required: true,+ }),+ supporting_resource: Property.ShortText({+ displayName: 'Supporting Resource GID',+ description: 'Gid of the goal, project, task or portfolio that supports the parent goal.',+ required: true,+ }),+ contribution_weight: Property.Number({+ displayName: 'Contribution Weight',+ description: 'Share of the supporter\'s progress that counts toward the parent goal, from 0 to 1, for example 0.25. Leave empty for 0.',+ required: false,+ }),+ insert_before: Property.ShortText({+ displayName: 'Insert Before Subgoal GID',+ description: 'For a subgoal: gid of an existing subgoal to place it before. Do not combine with Insert After.',+ required: false,+ }),+ insert_after: Property.ShortText({+ displayName: 'Insert After Subgoal GID',+ description: 'For a subgoal: gid of an existing subgoal to place it after. Do not combine with Insert Before.',+ required: false,+ }),+ },+ async run(context) {+ const { goal, supporting_resource, contribution_weight, insert_before, insert_after } = context.propsValue;+ asanaUtils.assertNotBoth({ first: insert_before, second: insert_after, firstLabel: 'Insert Before Subgoal GID', secondLabel: 'Insert After Subgoal GID' });+ if (asanaUtils.hasValue(contribution_weight) && (typeof contribution_weight !== 'number' || contribution_weight < 0 || contribution_weight > 1)) {+ throw new Error(`Contribution Weight must be a number from 0 to 1, got ${contribution_weight}.`);+ }+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/goals/${asanaUtils.pathSegment(goal)}/addSupportingRelationship`,+ operation: 'Add Goal Supporting Relationship',+ query: { opt_fields: ASANA_FIELDS.goalRelationship },+ data: {+ supporting_resource: supporting_resource.trim(),+ ...(typeof contribution_weight === 'number' ? { contribution_weight } : {}),+ ...(asanaUtils.hasValue(insert_before) ? { insert_before: String(insert_before).trim() } : {}),+ ...(asanaUtils.hasValue(insert_after) ? { insert_after: String(insert_after).trim() } : {}),+ },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/add-portfolio-item.ts b/packages/pieces/community/asana/src/lib/actions/ai/add-portfolio-item.tsnew file mode 100644index 00000000000..099918d5e4c--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/add-portfolio-item.ts@@ -0,0 +1,58 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaPortfolioItemChangeOutputSchema } from '../../output-schemas';++export const asanaAddPortfolioItemAction = createAction({+ auth: asanaAuth,+ name: 'add_portfolio_item',+ classification: 'WRITE',+ displayName: 'Add Portfolio Item',+ description: 'Add a project or portfolio to an Asana portfolio (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Adds a project (or a nested portfolio) to a portfolio, optionally placed before or after an existing item. The project itself is not changed. Remove it again with Remove Portfolio Item. Portfolios need an Advanced or higher Asana plan. Adding an item that is already in the portfolio converges, so it is safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaPortfolioItemChangeOutputSchema,+ props: {+ portfolio: Property.ShortText({+ displayName: 'Portfolio GID',+ description: 'Gid of the portfolio. Obtain it from List My Portfolios.',+ required: true,+ }),+ item: Property.ShortText({+ displayName: 'Item GID',+ description: 'Gid of the project or portfolio to add. Obtain a project gid from List Projects.',+ required: true,+ }),+ insert_before: Property.ShortText({+ displayName: 'Insert Before Item GID',+ description: 'Gid of an item already in the portfolio to place the new item before. Do not combine with Insert After.',+ required: false,+ }),+ insert_after: Property.ShortText({+ displayName: 'Insert After Item GID',+ description: 'Gid of an item already in the portfolio to place the new item after. Do not combine with Insert Before.',+ required: false,+ }),+ },+ async run(context) {+ const { portfolio, item, insert_before, insert_after } = context.propsValue;+ asanaUtils.assertNotBoth({ first: insert_before, second: insert_after, firstLabel: 'Insert Before Item GID', secondLabel: 'Insert After Item GID' });+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/portfolios/${asanaUtils.pathSegment(portfolio)}/addItem`,+ operation: 'Add Portfolio Item',+ data: {+ item: item.trim(),+ ...(asanaUtils.hasValue(insert_before) ? { insert_before: String(insert_before).trim() } : {}),+ ...(asanaUtils.hasValue(insert_after) ? { insert_after: String(insert_after).trim() } : {}),+ },+ });+ return { success: true, portfolio_gid: portfolio.trim(), item_gid: item.trim() };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/add-task-dependencies.ts b/packages/pieces/community/asana/src/lib/actions/ai/add-task-dependencies.tsnew file mode 100644index 00000000000..1ab874a6d7a--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/add-task-dependencies.ts@@ -0,0 +1,52 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaAddTaskDependenciesOutputSchema } from '../../output-schemas';++const MAX_DEPENDENCIES = 30;++export const asanaAddTaskDependenciesAction = createAction({+ auth: asanaAuth,+ name: 'add_task_dependencies',+ classification: 'WRITE',+ displayName: 'Add Task Dependencies',+ description: 'Mark other Asana tasks as dependencies that block a task (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Marks the given tasks as dependencies of a task, meaning the task is blocked until they are complete. A task can have at most 30 dependencies and dependents combined, so check List Task Dependencies first when it already has many. Undo with Remove Task Dependencies. Dependencies need a paid Asana plan; a free workspace gets a paid-plan error. Tasks that are already dependencies are left as they are, so it is safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaAddTaskDependenciesOutputSchema,+ props: {+ task: Property.ShortText({+ displayName: 'Task GID',+ description: 'Gid of the blocked task. Obtain it from List Project Tasks or Search Workspace Objects.',+ required: true,+ }),+ dependencies: Property.Array({+ displayName: 'Dependency Task GIDs',+ description: `Gids of the tasks that must be completed first, at most ${MAX_DEPENDENCIES}.`,+ required: true,+ }),+ },+ async run(context) {+ const task = context.propsValue.task.trim();+ const dependencies = asanaUtils.toStringArray(context.propsValue.dependencies);+ if (dependencies.length === 0) {+ throw new Error('Dependency Task GIDs must contain at least one task gid.');+ }+ if (dependencies.length > MAX_DEPENDENCIES) {+ throw new Error(`Asana allows at most ${MAX_DEPENDENCIES} dependencies and dependents per task; got ${dependencies.length} gids.`);+ }+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/tasks/${asanaUtils.pathSegment(task)}/addDependencies`,+ operation: 'Add Task Dependencies',+ data: { dependencies },+ });+ return { success: true, task_gid: task, dependency_gids: dependencies };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/add-user-to-team.ts b/packages/pieces/community/asana/src/lib/actions/ai/add-user-to-team.tsnew file mode 100644index 00000000000..d77521cb66f--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/add-user-to-team.ts@@ -0,0 +1,43 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaTeamMembershipOutputSchema } from '../../output-schemas';++export const asanaAddUserToTeamAction = createAction({+ auth: asanaAuth,+ name: 'add_user_to_team',+ classification: 'WRITE',+ displayName: 'Add User to Team',+ description: 'Add a user to an Asana team.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Adds a user to a team and returns the team membership. The connected user must already be a member of the team, and the added user must belong to the same organization (use Add User to Workspace first if needed). Adding an existing member leaves them in place, so it is safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTeamMembershipOutputSchema,+ props: {+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Gid of the team. Obtain it from List Teams or List User Teams.',+ required: true,+ }),+ user: Property.ShortText({+ displayName: 'User',+ description: 'User to add: "me", an email address or a user gid.',+ required: true,+ }),+ },+ async run(context) {+ const { team, user } = context.propsValue;+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/teams/${asanaUtils.pathSegment(team)}/addUser`,+ operation: 'Add User to Team',+ query: { opt_fields: ASANA_FIELDS.teamMembership },+ data: { user: user.trim() },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/add-user-to-workspace.ts b/packages/pieces/community/asana/src/lib/actions/ai/add-user-to-workspace.tsnew file mode 100644index 00000000000..d653f412a80--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/add-user-to-workspace.ts@@ -0,0 +1,43 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaUserOutputSchema } from '../../output-schemas';++export const asanaAddUserToWorkspaceAction = createAction({+ auth: asanaAuth,+ name: 'add_user_to_workspace',+ classification: 'WRITE',+ displayName: 'Add User to Workspace',+ description: 'Invite or add a user to an Asana workspace or organization.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Adds a user to a workspace or organization by email or gid and returns the user record. Only workspace admins can do this. An email that has no Asana account receives an invitation, and a new member may take a paid seat on paid plans, so confirm with the user first. Adding someone who is already a member leaves them in place.',+ idempotent: true,+ },+ outputSchema: asanaUserOutputSchema,+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace or organization. Obtain it from List Workspaces.',+ required: true,+ }),+ user: Property.ShortText({+ displayName: 'User',+ description: 'User to add: an email address or a user gid.',+ required: true,+ }),+ },+ async run(context) {+ const { workspace, user } = context.propsValue;+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/workspaces/${asanaUtils.pathSegment(workspace)}/addUser`,+ operation: 'Add User to Workspace',+ query: { opt_fields: 'name,email' },+ data: { user: user.trim() },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/approve-access-request.ts b/packages/pieces/community/asana/src/lib/actions/ai/approve-access-request.tsnew file mode 100644index 00000000000..7abf71f5d3c--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/approve-access-request.ts@@ -0,0 +1,38 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaAccessRequestDecisionOutputSchema } from '../../output-schemas';++export const asanaApproveAccessRequestAction = createAction({+ auth: asanaAuth,+ name: 'approve_access_request',+ classification: 'WRITE',+ displayName: 'Approve Access Request',+ description: 'Approve a pending request to access an Asana project or portfolio.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Approves one pending access request, which gives the requester editor access to the project or portfolio (approving a request made by the connected user themself sets their own membership to editor, so they may lose admin rights such as deleting the project). Only people who can manage the target\'s members can approve. Find request gids with List Access Requests; use Reject Access Request to decline. Not idempotent: a request that was already handled cannot be approved again.',+ idempotent: false,+ },+ outputSchema: asanaAccessRequestDecisionOutputSchema,+ props: {+ access_request: Property.ShortText({+ displayName: 'Access Request GID',+ description: 'Gid of the pending access request. Obtain it from List Access Requests.',+ required: true,+ }),+ },+ async run(context) {+ const accessRequest = context.propsValue.access_request.trim();+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/access_requests/${asanaUtils.pathSegment(accessRequest)}/approve`,+ operation: 'Approve Access Request',+ data: {},+ });+ return { success: true, access_request_gid: accessRequest, approval_status: 'approved' };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/create-access-request.ts b/packages/pieces/community/asana/src/lib/actions/ai/create-access-request.tsnew file mode 100644index 00000000000..146c869f7f3--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/create-access-request.ts@@ -0,0 +1,45 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaAccessRequestOutputSchema } from '../../output-schemas';++export const asanaCreateAccessRequestAction = createAction({+ auth: asanaAuth,+ name: 'create_access_request',+ classification: 'WRITE',+ displayName: 'Request Access',+ description: 'Ask for access to a private Asana project or portfolio.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Submits a request, as the connected user, to join a private project or portfolio, with an optional message for its owners, and returns the request with its approval_status. Use it when a project returns a permission error. Asana may treat this as a paid feature on some plans. Not idempotent: a repeat call while the connected user already has a pending request for the same target fails with an "already requested" error instead of creating a second request, so treat that error as meaning a request is already pending.',+ idempotent: false,+ },+ outputSchema: asanaAccessRequestOutputSchema,+ props: {+ target: Property.ShortText({+ displayName: 'Project or Portfolio GID',+ description: 'Gid of the private project or portfolio to request access to.',+ required: true,+ }),+ message: Property.LongText({+ displayName: 'Message',+ description: 'Optional note for the owners explaining why access is needed.',+ required: false,+ }),+ },+ async run(context) {+ const { target, message } = context.propsValue;+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: '/access_requests',+ operation: 'Request Access',+ data: {+ target: target.trim(),+ ...(asanaUtils.hasValue(message) ? { message } : {}),+ },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/create-allocation.ts b/packages/pieces/community/asana/src/lib/actions/ai/create-allocation.tsnew file mode 100644index 00000000000..89bb9eaebca--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/create-allocation.ts@@ -0,0 +1,74 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_EFFORT_TYPE_OPTIONS, ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaCreateAllocationAction = createAction({+ auth: asanaAuth,+ name: 'create_allocation',+ classification: 'WRITE',+ displayName: 'Create Allocation',+ description: 'Allocate a person\'s time to an Asana project for a date range (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Creates a resource-management allocation: a user (or placeholder) assigned to a project from Start Date to End Date, optionally with an effort as hours or a percentage of their time, and returns it. Check List Allocations first to avoid a duplicate for the same person, project and dates. Allocations need an Advanced or higher Asana plan with resource management; lower plans get a paid-plan error. Not idempotent: each call creates another allocation.',+ idempotent: false,+ },+ props: {+ parent: Property.ShortText({+ displayName: 'Project GID',+ description: 'Gid of the project the time is allocated to. Obtain it from List Projects.',+ required: true,+ }),+ assignee: Property.ShortText({+ displayName: 'Assignee GID',+ description: 'Gid of the user or placeholder whose time is allocated. Obtain a user gid from List Users or Get Current User.',+ required: true,+ }),+ start_date: Property.ShortText({+ displayName: 'Start Date',+ description: 'First day of the allocation, YYYY-MM-DD.',+ required: true,+ }),+ end_date: Property.ShortText({+ displayName: 'End Date',+ description: 'Last day of the allocation, YYYY-MM-DD, on or after Start Date.',+ required: true,+ }),+ effort_type: Property.StaticDropdown({+ displayName: 'Effort Unit',+ description: 'Unit of Effort Value. Set together with Effort Value, or leave both empty.',+ required: false,+ options: { disabled: false, options: ASANA_EFFORT_TYPE_OPTIONS },+ }),+ effort_value: Property.Number({+ displayName: 'Effort Value',+ description: 'Amount of effort in the chosen unit, for example 20 (hours) or 50 (percent).',+ required: false,+ }),+ },+ async run(context) {+ const props = context.propsValue;+ const startDate = asanaUtils.assertDate({ value: props.start_date, field: 'Start Date' });+ const endDate = asanaUtils.assertDate({ value: props.end_date, field: 'End Date' });+ if (endDate < startDate) {+ throw new Error(`End Date (${endDate}) must be on or after Start Date (${startDate}).`);+ }+ const effort = asanaUtils.buildAllocationEffort({ type: props.effort_type, value: props.effort_value });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: '/allocations',+ operation: 'Create Allocation',+ query: { opt_fields: ASANA_FIELDS.allocation },+ data: {+ parent: props.parent.trim(),+ assignee: props.assignee.trim(),+ start_date: startDate,+ end_date: endDate,+ ...(effort === undefined ? {} : { effort }),+ },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/create-custom-field-enum-option.ts b/packages/pieces/community/asana/src/lib/actions/ai/create-custom-field-enum-option.tsnew file mode 100644index 00000000000..91f71f96a79--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/create-custom-field-enum-option.ts@@ -0,0 +1,62 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaCreateCustomFieldEnumOptionAction = createAction({+ auth: asanaAuth,+ name: 'create_custom_field_enum_option',+ classification: 'WRITE',+ displayName: 'Create Custom Field Enum Option',+ description: 'Add a new option to an Asana single-select or multi-select custom field (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Adds a selectable option to a single-select or multi-select custom field and returns it (gid, name, color, enabled). New options go at the end unless Insert Before or Insert After names an existing option. A field holds at most 500 options, including disabled ones; options can never be deleted, only disabled with Update Custom Field Enum Option. Check Get Custom Field first to avoid a duplicate option. Needs a paid Asana plan. Not idempotent: each call adds another option.',+ idempotent: false,+ },+ props: {+ custom_field: Property.ShortText({+ displayName: 'Custom Field GID',+ description: 'Gid of the single-select or multi-select custom field. Obtain it from List Custom Fields.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Option Name',+ description: 'Label of the new option, for example "Blocked".',+ required: true,+ }),+ color: Property.ShortText({+ displayName: 'Color',+ description: 'Asana option color name, for example red, orange, yellow, green, blue, purple or none. Leave empty for none.',+ required: false,+ }),+ insert_before: Property.ShortText({+ displayName: 'Insert Before Option GID',+ description: 'Gid of an existing option of this field to place the new option before. Obtain it from Get Custom Field. Do not combine with Insert After.',+ required: false,+ }),+ insert_after: Property.ShortText({+ displayName: 'Insert After Option GID',+ description: 'Gid of an existing option of this field to place the new option after. Do not combine with Insert Before.',+ required: false,+ }),+ },+ async run(context) {+ const { custom_field, name, color, insert_before, insert_after } = context.propsValue;+ asanaUtils.assertNotBoth({ first: insert_before, second: insert_after, firstLabel: 'Insert Before Option GID', secondLabel: 'Insert After Option GID' });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/custom_fields/${asanaUtils.pathSegment(custom_field)}/enum_options`,+ operation: 'Create Custom Field Enum Option',+ query: { opt_fields: ASANA_FIELDS.enumOption },+ data: {+ name,+ ...(asanaUtils.hasValue(color) ? { color: String(color).trim() } : {}),+ ...(asanaUtils.hasValue(insert_before) ? { insert_before: String(insert_before).trim() } : {}),+ ...(asanaUtils.hasValue(insert_after) ? { insert_after: String(insert_after).trim() } : {}),+ },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/create-custom-field.ts b/packages/pieces/community/asana/src/lib/actions/ai/create-custom-field.tsnew file mode 100644index 00000000000..d1aebdb4470--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/create-custom-field.ts@@ -0,0 +1,131 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import {+ ASANA_CUSTOM_FIELD_FORMAT_OPTIONS,+ ASANA_CUSTOM_LABEL_POSITION_OPTIONS,+ ASANA_FIELDS,+ ASANA_MAX_PRECISION,+ AsanaRecord,+ asanaClient,+ asanaProps,+ asanaUtils,+} from '../../common/client';++const TYPE_OPTIONS = [+ { label: 'Text', value: 'text' },+ { label: 'Number', value: 'number' },+ { label: 'Single-select (enum)', value: 'enum' },+ { label: 'Multi-select (multi_enum)', value: 'multi_enum' },+ { label: 'Date', value: 'date' },+ { label: 'People', value: 'people' },+];++export const asanaCreateCustomFieldAction = createAction({+ auth: asanaAuth,+ name: 'create_custom_field',+ classification: 'WRITE',+ displayName: 'Create Custom Field',+ description: 'Create a custom field definition in an Asana workspace (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Creates a workspace-wide custom field definition (text, number, single-select, multi-select, date or people) and returns it with its enum options. The name must be unique in the workspace and must not clash with built-in fields such as Due Date or Assignee; the type can never be changed later. Check List Custom Fields first to avoid a duplicate. For select fields, pass the option names here or add them later with Create Custom Field Enum Option. Custom fields need a paid Asana plan; a free workspace gets a paid-plan error. Not idempotent: a repeat fails on the duplicate name.',+ idempotent: false,+ },+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace that will own the field; it cannot be moved later. Obtain it from List Workspaces.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Field Name',+ description: 'Name of the field, unique in the workspace, for example "Priority".',+ required: true,+ }),+ resource_subtype: Property.StaticDropdown({+ displayName: 'Field Type',+ description: 'Kind of value the field holds. It cannot be changed after creation.',+ required: true,+ options: { disabled: false, options: TYPE_OPTIONS },+ }),+ description: Property.LongText({+ displayName: 'Description',+ description: 'Plain-text description shown with the field.',+ required: false,+ }),+ enum_options: Property.Array({+ displayName: 'Option Names',+ description: 'Only for single-select and multi-select fields: the option names in display order, for example High, Medium, Low (1 to 500 options).',+ required: false,+ }),+ precision: Property.Number({+ displayName: 'Decimal Places',+ description: `Only for number fields: digits after the decimal point, 0 to ${ASANA_MAX_PRECISION}.`,+ required: false,+ }),+ format: Property.StaticDropdown({+ displayName: 'Number Format',+ description: 'Only for number fields: how the value is displayed. Leave empty for plain numbers.',+ required: false,+ options: { disabled: false, options: ASANA_CUSTOM_FIELD_FORMAT_OPTIONS },+ }),+ currency_code: Property.ShortText({+ displayName: 'Currency Code',+ description: 'ISO 4217 code such as USD or EUR. Only used with the Currency format.',+ required: false,+ }),+ custom_label: Property.ShortText({+ displayName: 'Custom Label',+ description: 'Unit text shown next to the value, for example "pts". Only used with the Custom label format.',+ required: false,+ }),+ custom_label_position: Property.StaticDropdown({+ displayName: 'Custom Label Position',+ description: 'Where the custom label goes. Only used with the Custom label format.',+ required: false,+ options: { disabled: false, options: ASANA_CUSTOM_LABEL_POSITION_OPTIONS },+ }),+ has_notifications_enabled: asanaProps.optionalBoolean({+ displayName: 'Notify Followers on Change',+ description: 'Yes to notify task followers when this field changes, No to stay silent. Leave empty for the Asana default.',+ }),+ },+ async run(context) {+ const props = context.propsValue;+ const type = props.resource_subtype;+ const optionNames = asanaUtils.toStringArray(props.enum_options);+ const isSelect = type === 'enum' || type === 'multi_enum';+ if (optionNames.length > 0 && !isSelect) {+ throw new Error('Option Names only apply to single-select (enum) and multi-select (multi_enum) fields.');+ }+ if (isSelect && optionNames.length > 500) {+ throw new Error(`A select field can have at most 500 options; got ${optionNames.length}.`);+ }+ if (asanaUtils.hasValue(props.precision) && type !== 'number') {+ throw new Error('Decimal Places only applies to number fields.');+ }+ const data: Record<string, unknown> = {+ workspace: props.workspace.trim(),+ name: props.name,+ resource_subtype: type,+ ...(asanaUtils.hasValue(props.description) ? { description: props.description } : {}),+ ...(optionNames.length > 0 ? { enum_options: optionNames.map((name) => ({ name })) } : {}),+ ...(asanaUtils.hasValue(props.precision) ? { precision: asanaUtils.assertPrecision(props.precision) } : {}),+ ...(asanaUtils.hasValue(props.format) ? { format: props.format } : {}),+ ...(asanaUtils.hasValue(props.currency_code) ? { currency_code: String(props.currency_code).trim().toUpperCase() } : {}),+ ...(asanaUtils.hasValue(props.custom_label) ? { custom_label: props.custom_label } : {}),+ ...(asanaUtils.hasValue(props.custom_label_position) ? { custom_label_position: props.custom_label_position } : {}),+ ...(typeof props.has_notifications_enabled === 'boolean' ? { has_notifications_enabled: props.has_notifications_enabled } : {}),+ };+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: '/custom_fields',+ operation: 'Create Custom Field',+ query: { opt_fields: ASANA_FIELDS.customField },+ data,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/create-membership.ts b/packages/pieces/community/asana/src/lib/actions/ai/create-membership.tsindex 95ec7556912..a6a6a8f1016 100644--- a/packages/pieces/community/asana/src/lib/actions/ai/create-membership.ts+++ b/packages/pieces/community/asana/src/lib/actions/ai/create-membership.ts@@ -28,7 +28,7 @@ export const asanaCreateMembershipAction = createAction({props: {parent: Property.ShortText({displayName: 'Parent GID',- description: 'Gid of the project (or goal, portfolio, custom field or custom type) to share. Obtain a project gid from List Projects.',+ description: 'Gid of the project (or goal, portfolio, custom field or custom type) to share. Obtain a project gid from List Projects, or a custom field gid from List Custom Fields.',required: true,}),member: Property.ShortText({diff --git a/packages/pieces/community/asana/src/lib/actions/ai/create-team.ts b/packages/pieces/community/asana/src/lib/actions/ai/create-team.tsnew file mode 100644index 00000000000..e950046a0e3--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/create-team.ts@@ -0,0 +1,59 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, ASANA_TEAM_VISIBILITY_OPTIONS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaTeamOutputSchema } from '../../output-schemas';++export const asanaCreateTeamAction = createAction({+ auth: asanaAuth,+ name: 'create_team',+ classification: 'WRITE',+ displayName: 'Create Team',+ description: 'Create a team in an Asana organization.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Creates a new team in an organization and returns it; the connected user becomes a member. Teams exist only in organizations (company-domain workspaces), so a plain workspace fails. Check List Teams first to avoid duplicates: each call creates a separate team, so retries duplicate. Visibility "secret" may need a paid plan; on a free plan Asana answers with HTTP 500 instead of a plan error.',+ idempotent: false,+ },+ outputSchema: asanaTeamOutputSchema,+ props: {+ organization: Property.ShortText({+ displayName: 'Organization (Workspace) GID',+ description: 'Gid of the organization, for example 1201234567890123. Obtain it from List Workspaces (is_organization must be true).',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Team Name',+ description: 'Name of the new team, for example "Marketing".',+ required: true,+ }),+ description: Property.LongText({+ displayName: 'Description',+ description: 'Plain-text description of the team.',+ required: false,+ }),+ visibility: Property.StaticDropdown({+ displayName: 'Visibility',+ description: 'Who can see and join the team; empty uses the Asana default. Secret may need a paid plan.',+ required: false,+ options: { disabled: false, options: ASANA_TEAM_VISIBILITY_OPTIONS },+ }),+ },+ async run(context) {+ const { organization, name, description, visibility } = context.propsValue;+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: '/teams',+ operation: 'Create Team',+ query: { opt_fields: ASANA_FIELDS.teamFull },+ data: {+ organization: organization.trim(),+ name,+ ...(asanaUtils.hasValue(description) ? { description } : {}),+ ...(asanaUtils.hasValue(visibility) ? { visibility } : {}),+ },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/delete-allocation.ts b/packages/pieces/community/asana/src/lib/actions/ai/delete-allocation.tsnew file mode 100644index 00000000000..081fc2b6027--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/delete-allocation.ts@@ -0,0 +1,37 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaDeleteAllocationOutputSchema } from '../../output-schemas';++export const asanaDeleteAllocationAction = createAction({+ auth: asanaAuth,+ name: 'delete_allocation',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Allocation',+ description: 'Delete an Asana resource-management allocation (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one allocation, freeing that person\'s booked time on the project; the project and the user are not affected. To shorten or reassign a booking instead, use Update Allocation. Allocations need an Advanced or higher Asana plan. Irreversible; repeating the call on the same allocation fails.',+ idempotent: false,+ },+ outputSchema: asanaDeleteAllocationOutputSchema,+ props: {+ allocation: Property.ShortText({+ displayName: 'Allocation GID',+ description: 'Gid of the allocation to delete. Obtain it from List Allocations.',+ required: true,+ }),+ },+ async run(context) {+ const allocation = context.propsValue.allocation.trim();+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.DELETE,+ path: `/allocations/${asanaUtils.pathSegment(allocation)}`,+ operation: 'Delete Allocation',+ });+ return { success: true, allocation_gid: allocation };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/delete-attachment.ts b/packages/pieces/community/asana/src/lib/actions/ai/delete-attachment.tsnew file mode 100644index 00000000000..95920ba9c37--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/delete-attachment.ts@@ -0,0 +1,37 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaDeleteAttachmentOutputSchema } from '../../output-schemas';++export const asanaDeleteAttachmentAction = createAction({+ auth: asanaAuth,+ name: 'delete_attachment',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Attachment',+ description: 'Permanently delete an attachment from Asana.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one attachment from its task, project or project brief; the file cannot be restored through the API. Confirm the gid with Get Attachment or List Attachments first. Not idempotent: repeating the call on the same attachment fails.',+ idempotent: false,+ },+ outputSchema: asanaDeleteAttachmentOutputSchema,+ props: {+ attachment: Property.ShortText({+ displayName: 'Attachment GID',+ description: 'Gid of the attachment to delete. Obtain it from List Attachments.',+ required: true,+ }),+ },+ async run(context) {+ const attachment = context.propsValue.attachment.trim();+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.DELETE,+ path: `/attachments/${asanaUtils.pathSegment(attachment)}`,+ operation: 'Delete Attachment',+ });+ return { success: true, attachment_gid: attachment };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/delete-custom-field.ts b/packages/pieces/community/asana/src/lib/actions/ai/delete-custom-field.tsnew file mode 100644index 00000000000..6f43cc88e55--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/delete-custom-field.ts@@ -0,0 +1,37 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaDeleteCustomFieldOutputSchema } from '../../output-schemas';++export const asanaDeleteCustomFieldAction = createAction({+ auth: asanaAuth,+ name: 'delete_custom_field',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Custom Field',+ description: 'Delete an Asana custom field definition (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes a custom field definition from the workspace; the API offers no way to restore it, and every task, project or portfolio using the field is affected. To retire a single select option instead, set its Enabled to No with Update Custom Field Enum Option. Locked fields can only be deleted by the user who locked them. Needs a paid Asana plan. Irreversible; repeating the call on the same field fails.',+ idempotent: false,+ },+ outputSchema: asanaDeleteCustomFieldOutputSchema,+ props: {+ custom_field: Property.ShortText({+ displayName: 'Custom Field GID',+ description: 'Gid of the custom field to delete. Obtain it from List Custom Fields.',+ required: true,+ }),+ },+ async run(context) {+ const customField = context.propsValue.custom_field.trim();+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.DELETE,+ path: `/custom_fields/${asanaUtils.pathSegment(customField)}`,+ operation: 'Delete Custom Field',+ });+ return { success: true, custom_field_gid: customField };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-allocation.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-allocation.tsnew file mode 100644index 00000000000..37beeca55b1--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-allocation.ts@@ -0,0 +1,34 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaGetAllocationAction = createAction({+ auth: asanaAuth,+ name: 'get_allocation',+ classification: 'READ',+ displayName: 'Get Allocation',+ description: 'Get one Asana resource-management allocation (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one allocation: the assignee, the project, start and end dates, effort (hours or percent) and who created it. Allocations need an Advanced or higher Asana plan with resource management. Read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ allocation: Property.ShortText({+ displayName: 'Allocation GID',+ description: 'Gid of the allocation. Obtain it from List Allocations.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/allocations/${asanaUtils.pathSegment(context.propsValue.allocation)}`,+ operation: 'Get Allocation',+ query: { opt_fields: ASANA_FIELDS.allocation },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-attachment.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-attachment.tsnew file mode 100644index 00000000000..ce741ddfca1--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-attachment.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaAttachmentOutputSchema } from '../../output-schemas';++export const asanaGetAttachmentAction = createAction({+ auth: asanaAuth,+ name: 'get_attachment',+ classification: 'READ',+ displayName: 'Get Attachment',+ description: 'Get an Asana attachment and its download link.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one attachment: name, size, host, parent and its download, view and permanent URLs. The download_url is short-lived, so fetch it right before downloading. Use List Attachments to find attachment gids on a task, project or project brief. Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaAttachmentOutputSchema,+ props: {+ attachment: Property.ShortText({+ displayName: 'Attachment GID',+ description: 'Gid of the attachment. Obtain it from List Attachments.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/attachments/${asanaUtils.pathSegment(context.propsValue.attachment)}`,+ operation: 'Get Attachment',+ query: { opt_fields: ASANA_FIELDS.attachment },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-custom-field.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-custom-field.tsnew file mode 100644index 00000000000..e5c376b5852--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-custom-field.ts@@ -0,0 +1,34 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaGetCustomFieldAction = createAction({+ auth: asanaAuth,+ name: 'get_custom_field',+ classification: 'READ',+ displayName: 'Get Custom Field',+ description: 'Get the definition of an Asana custom field (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one custom field definition: name, type, description, number format and precision, notification setting and, for select fields, every enum option with its gid, color and enabled flag. Use it to find enum option gids before Update Custom Field Enum Option or Reorder Custom Field Enum Option. Needs a paid Asana plan; a free workspace gets a paid-plan error. Read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ custom_field: Property.ShortText({+ displayName: 'Custom Field GID',+ description: 'Gid of the custom field. Obtain it from List Custom Fields.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/custom_fields/${asanaUtils.pathSegment(context.propsValue.custom_field)}`,+ operation: 'Get Custom Field',+ query: { opt_fields: ASANA_FIELDS.customField },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-goal.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-goal.tsnew file mode 100644index 00000000000..922cceb23c5--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-goal.ts@@ -0,0 +1,34 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaGetGoalAction = createAction({+ auth: asanaAuth,+ name: 'get_goal',+ classification: 'READ',+ displayName: 'Get Goal',+ description: 'Get the details and progress metric of an Asana goal (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one goal: name, notes, status, dates, owner, team, time period, followers, latest status update and its progress metric (initial, current and target values, unit and progress source). For the subgoals, projects, tasks or portfolios that feed it use List Goal Relationships. Goals need an Advanced or higher Asana plan. Read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ goal: Property.ShortText({+ displayName: 'Goal GID',+ description: 'Gid of the goal. Obtain it from List Goals.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/goals/${asanaUtils.pathSegment(context.propsValue.goal)}`,+ operation: 'Get Goal',+ query: { opt_fields: ASANA_FIELDS.goal },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-portfolio.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-portfolio.tsnew file mode 100644index 00000000000..c4d3bd0e3b6--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-portfolio.ts@@ -0,0 +1,34 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaGetPortfolioAction = createAction({+ auth: asanaAuth,+ name: 'get_portfolio',+ classification: 'READ',+ displayName: 'Get Portfolio',+ description: 'Get the details of an Asana portfolio (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one portfolio: name, owner, creator, members, dates, privacy, color, archived state, latest status update and link. For the projects inside it use List Portfolio Items. Portfolios need an Advanced or higher Asana plan. Read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ portfolio: Property.ShortText({+ displayName: 'Portfolio GID',+ description: 'Gid of the portfolio. Obtain it from List My Portfolios.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/portfolios/${asanaUtils.pathSegment(context.propsValue.portfolio)}`,+ operation: 'Get Portfolio',+ query: { opt_fields: ASANA_FIELDS.portfolio },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-team-membership.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-team-membership.tsnew file mode 100644index 00000000000..e246b4ee77a--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-team-membership.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaTeamMembershipOutputSchema } from '../../output-schemas';++export const asanaGetTeamMembershipAction = createAction({+ auth: asanaAuth,+ name: 'get_team_membership',+ classification: 'READ',+ displayName: 'Get Team Membership',+ description: 'Get one Asana team membership.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one team membership: the user, the team and the is_admin, is_guest and is_limited_access flags. Use List Team Memberships to find membership gids. Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTeamMembershipOutputSchema,+ props: {+ team_membership: Property.ShortText({+ displayName: 'Team Membership GID',+ description: 'Gid of the team membership. Obtain it from List Team Memberships or Add User to Team.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/team_memberships/${asanaUtils.pathSegment(context.propsValue.team_membership)}`,+ operation: 'Get Team Membership',+ query: { opt_fields: ASANA_FIELDS.teamMembership },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-team.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-team.tsnew file mode 100644index 00000000000..1127a22c6c8--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-team.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaTeamOutputSchema } from '../../output-schemas';++export const asanaGetTeamAction = createAction({+ auth: asanaAuth,+ name: 'get_team',+ classification: 'READ',+ displayName: 'Get Team',+ description: 'Get an Asana team.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one team: name, description, visibility, endorsed flag, organization and link. Use List Teams or List User Teams to find team gids, and List Team Memberships or List Users (with a team) for its members. Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTeamOutputSchema,+ props: {+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Gid of the team. Obtain it from List Teams or List User Teams.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/teams/${asanaUtils.pathSegment(context.propsValue.team)}`,+ operation: 'Get Team',+ query: { opt_fields: ASANA_FIELDS.teamFull },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-time-period.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-time-period.tsnew file mode 100644index 00000000000..fe9911a887b--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-time-period.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaTimePeriodOutputSchema } from '../../output-schemas';++export const asanaGetTimePeriodAction = createAction({+ auth: asanaAuth,+ name: 'get_time_period',+ classification: 'READ',+ displayName: 'Get Time Period',+ description: 'Get one Asana goal time period (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one time period: display name, period type, start and end dates and its parent period (for example the fiscal year of a quarter). Goals need an Advanced or higher Asana plan. Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTimePeriodOutputSchema,+ props: {+ time_period: Property.ShortText({+ displayName: 'Time Period GID',+ description: 'Gid of the time period. Obtain it from List Time Periods or from the time_period of a goal.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/time_periods/${asanaUtils.pathSegment(context.propsValue.time_period)}`,+ operation: 'Get Time Period',+ query: { opt_fields: ASANA_FIELDS.timePeriod },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-user.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-user.tsnew file mode 100644index 00000000000..87b6042851b--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-user.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaCurrentUserOutputSchema } from '../../output-schemas';++export const asanaGetUserAction = createAction({+ auth: asanaAuth,+ name: 'get_user',+ classification: 'READ',+ displayName: 'Get User',+ description: 'Get an Asana user by gid or email.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one user (gid, name, email) and the workspaces they share with the connected user. Accepts "me", an email address or a user gid, so it also turns an email into a gid. Use Get Current User for yourself and List Users to browse a workspace or team. Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaCurrentUserOutputSchema,+ props: {+ user: Property.ShortText({+ displayName: 'User',+ description: 'User to look up: "me", an email address or a user gid. Obtain gids from List Users or Search Workspace Objects (object type user).',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/users/${asanaUtils.pathSegment(context.propsValue.user)}`,+ operation: 'Get User',+ query: { opt_fields: ASANA_FIELDS.user },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-workspace-membership.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-workspace-membership.tsnew file mode 100644index 00000000000..9f2b217b044--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-workspace-membership.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaWorkspaceMembershipOutputSchema } from '../../output-schemas';++export const asanaGetWorkspaceMembershipAction = createAction({+ auth: asanaAuth,+ name: 'get_workspace_membership',+ classification: 'READ',+ displayName: 'Get Workspace Membership',+ description: 'Get one Asana workspace membership.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one workspace membership: the user, the workspace and the is_active, is_admin, is_guest and is_view_only flags. Use List Workspace Memberships to find membership gids or to look up a user\'s membership directly. Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaWorkspaceMembershipOutputSchema,+ props: {+ workspace_membership: Property.ShortText({+ displayName: 'Workspace Membership GID',+ description: 'Gid of the workspace membership. Obtain it from List Workspace Memberships.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/workspace_memberships/${asanaUtils.pathSegment(context.propsValue.workspace_membership)}`,+ operation: 'Get Workspace Membership',+ query: { opt_fields: ASANA_FIELDS.workspaceMembership },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/get-workspace.ts b/packages/pieces/community/asana/src/lib/actions/ai/get-workspace.tsnew file mode 100644index 00000000000..2cffb61be1a--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/get-workspace.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaWorkspaceOutputSchema } from '../../output-schemas';++export const asanaGetWorkspaceAction = createAction({+ auth: asanaAuth,+ name: 'get_workspace',+ classification: 'READ',+ displayName: 'Get Workspace',+ description: 'Get an Asana workspace or organization.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one workspace: name, is_organization and its email domains. Check is_organization before using team actions, because teams exist only in organizations. Use List Workspaces to find workspace gids. Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaWorkspaceOutputSchema,+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace or organization. Obtain it from List Workspaces or Get Current User.',+ required: true,+ }),+ },+ async run(context) {+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/workspaces/${asanaUtils.pathSegment(context.propsValue.workspace)}`,+ operation: 'Get Workspace',+ query: { opt_fields: ASANA_FIELDS.workspace },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/instantiate-project-template.ts b/packages/pieces/community/asana/src/lib/actions/ai/instantiate-project-template.tsnew file mode 100644index 00000000000..36a821a514d--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/instantiate-project-template.ts@@ -0,0 +1,92 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaJobOutputSchema } from '../../output-schemas';++const PRIVACY_OPTIONS = [+ { label: 'Public to the workspace', value: 'public_to_workspace' },+ { label: 'Private', value: 'private' },+];++export const asanaInstantiateProjectTemplateAction = createAction({+ auth: asanaAuth,+ name: 'instantiate_project_template',+ classification: 'WRITE',+ displayName: 'Instantiate Project Template',+ description: 'Start creating a new Asana project from a project template (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Starts an asynchronous job that creates a new project from a custom project template and returns the job (gid, status, new_project). The project may not be ready yet: poll Get Job with the returned job gid until status is succeeded. Get the template gid and its date and role gids from List Project Templates; when the template has dates, give each date variable a value in Requested Dates (gid 1 is the project start date, gid 2 the due date). Custom templates need a paid Asana plan. Each call creates another project, so retries duplicate.',+ idempotent: false,+ },+ outputSchema: asanaJobOutputSchema,+ props: {+ project_template: Property.ShortText({+ displayName: 'Project Template GID',+ description: 'Gid of the template. Obtain it from List Project Templates.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Project Name',+ description: 'Name of the new project.',+ required: true,+ }),+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Organizations only: gid of the team for the new project. Leave empty to use the template\'s team.',+ required: false,+ }),+ privacy_setting: Property.StaticDropdown({+ displayName: 'Privacy',+ description: 'Who can see the new project. Leave empty for the default; organization admins may restrict the choices.',+ required: false,+ options: { disabled: false, options: PRIVACY_OPTIONS },+ }),+ requested_dates: Property.Array({+ displayName: 'Requested Dates',+ description: 'One row per date variable of the template: its gid (from requested_dates in List Project Templates; 1 = project start date, 2 = project due date) and a date in YYYY-MM-DD format.',+ required: false,+ properties: {+ gid: Property.ShortText({ displayName: 'Date Variable GID', required: true }),+ value: Property.ShortText({ displayName: 'Date (YYYY-MM-DD)', required: true }),+ },+ }),+ requested_roles: Property.Array({+ displayName: 'Requested Roles',+ description: 'One row per template role: its gid (from requested_roles in List Project Templates) and the user to assign, as "me", an email address or a user gid.',+ required: false,+ properties: {+ gid: Property.ShortText({ displayName: 'Role GID', required: true }),+ value: Property.ShortText({ displayName: 'User', required: true }),+ },+ }),+ is_strict: asanaProps.optionalBoolean({+ displayName: 'Strict Dates',+ description: 'Yes to fail when any date variable of the template has no value in Requested Dates; No to leave missing dates empty. Leave empty for the Asana default.',+ }),+ },+ async run(context) {+ const props = context.propsValue;+ const requestedDates = asanaUtils+ .toGidValuePairs({ value: props.requested_dates, field: 'Requested Dates' })+ .map((pair) => ({ gid: pair.gid, value: asanaUtils.assertDate({ value: pair.value, field: `Requested Dates value for gid ${pair.gid}` }) }));+ const requestedRoles = asanaUtils.toGidValuePairs({ value: props.requested_roles, field: 'Requested Roles' });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/project_templates/${asanaUtils.pathSegment(props.project_template)}/instantiateProject`,+ operation: 'Instantiate Project Template',+ query: { opt_fields: ASANA_FIELDS.job },+ data: {+ name: props.name,+ ...(asanaUtils.hasValue(props.team) ? { team: String(props.team).trim() } : {}),+ ...(asanaUtils.hasValue(props.privacy_setting) ? { privacy_setting: props.privacy_setting } : {}),+ ...(requestedDates.length > 0 ? { requested_dates: requestedDates } : {}),+ ...(requestedRoles.length > 0 ? { requested_roles: requestedRoles } : {}),+ ...(typeof props.is_strict === 'boolean' ? { is_strict: props.is_strict } : {}),+ },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-access-requests.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-access-requests.tsnew file mode 100644index 00000000000..d6d024a8f24--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-access-requests.ts@@ -0,0 +1,47 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaAccessRequestListOutputSchema } from '../../output-schemas';++export const asanaListAccessRequestsAction = createAction({+ auth: asanaAuth,+ name: 'list_access_requests',+ classification: 'SEARCH',+ displayName: 'List Access Requests',+ description: 'List pending requests to access a private Asana project or portfolio.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the pending access requests on one project or portfolio, optionally from one requester, with each request\'s message and status. Use the returned gids with Approve Access Request or Reject Access Request. Returns every pending request in one response (Asana does not paginate this list). Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaAccessRequestListOutputSchema,+ props: {+ target: Property.ShortText({+ displayName: 'Project or Portfolio GID',+ description: 'Gid of the project or portfolio whose access requests to list. Obtain a project gid from List Projects.',+ required: true,+ }),+ user: Property.ShortText({+ displayName: 'Requester',+ description: 'Only return requests from this user: "me", an email address or a user gid. Leave empty for all requesters.',+ required: false,+ }),+ },+ async run(context) {+ const { target, user } = context.propsValue;+ const data = await asanaClient.asanaData<AsanaRecord[]>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: '/access_requests',+ operation: 'List Access Requests',+ query: {+ target: target.trim(),+ user: asanaUtils.hasValue(user) ? String(user).trim() : undefined,+ opt_fields: ASANA_FIELDS.accessRequest,+ },+ });+ return { data: Array.isArray(data) ? data : [] };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-allocations.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-allocations.tsnew file mode 100644index 00000000000..1c6143f7fc2--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-allocations.ts@@ -0,0 +1,55 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++export const asanaListAllocationsAction = createAction({+ auth: asanaAuth,+ name: 'list_allocations',+ classification: 'SEARCH',+ displayName: 'List Allocations',+ description: 'List Asana resource-management allocations for a project or a person (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists allocations (who is booked on which project, for which dates, with what effort) filtered to a project, a user or placeholder, or both. Set Project GID or Assignee GID. Use it to check existing bookings before Create Allocation, or to find the gid for Update Allocation or Delete Allocation. Allocations need an Advanced or higher Asana plan with resource management. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ parent: Property.ShortText({+ displayName: 'Project GID',+ description: 'Gid of a project, to list its allocations. Obtain it from List Projects.',+ required: false,+ }),+ assignee: Property.ShortText({+ displayName: 'Assignee GID',+ description: 'Gid of a user or placeholder, to list their allocations.',+ required: false,+ }),+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace, to scope an assignee\'s allocations. Obtain it from List Workspaces.',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'allocations' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { parent, assignee, workspace, limit, offset } = context.propsValue;+ if (!asanaUtils.hasValue(parent) && !asanaUtils.hasValue(assignee)) {+ throw new Error('Set Project GID or Assignee GID.');+ }+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/allocations',+ operation: 'List Allocations',+ query: {+ parent: asanaUtils.hasValue(parent) ? String(parent).trim() : undefined,+ assignee: asanaUtils.hasValue(assignee) ? String(assignee).trim() : undefined,+ workspace: asanaUtils.hasValue(workspace) ? String(workspace).trim() : undefined,+ opt_fields: ASANA_FIELDS.allocation,+ },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-attachments.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-attachments.tsnew file mode 100644index 00000000000..c4be131a594--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-attachments.ts@@ -0,0 +1,39 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps } from '../../common/client';+import { asanaAttachmentListOutputSchema } from '../../output-schemas';++export const asanaListAttachmentsAction = createAction({+ auth: asanaAuth,+ name: 'list_attachments',+ classification: 'SEARCH',+ displayName: 'List Attachments',+ description: 'List the attachments on an Asana task, project or project brief.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the files attached to a task, to a project (its Key resources) or to a project brief, with names, sizes and download links. Inline images in a task description are not included. Use Get Attachment for a fresh download_url on one file. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaAttachmentListOutputSchema,+ props: {+ parent: Property.ShortText({+ displayName: 'Parent GID',+ description: 'Gid of the task, project or project brief whose attachments to list. Obtain a task gid from List Project Tasks or Get Task.',+ required: true,+ }),+ limit: asanaProps.limit({ noun: 'attachments' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { parent, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/attachments',+ operation: 'List Attachments',+ query: { parent: parent.trim(), opt_fields: ASANA_FIELDS.attachment },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-custom-fields.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-custom-fields.tsnew file mode 100644index 00000000000..26ac01afe2e--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-custom-fields.ts@@ -0,0 +1,37 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++export const asanaListCustomFieldsAction = createAction({+ auth: asanaAuth,+ name: 'list_custom_fields',+ classification: 'SEARCH',+ displayName: 'List Custom Fields',+ description: 'List the custom field definitions of an Asana workspace (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the custom field definitions of a workspace with type, format and enum options. Use it to find a field gid by name, or to check that a name is free before Create Custom Field. Needs a paid Asana plan; a free workspace gets a paid-plan error. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace. Obtain it from List Workspaces.',+ required: true,+ }),+ limit: asanaProps.limit({ noun: 'custom fields' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { workspace, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: `/workspaces/${asanaUtils.pathSegment(workspace)}/custom_fields`,+ operation: 'List Custom Fields',+ query: { opt_fields: ASANA_FIELDS.customFieldList },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-custom-types.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-custom-types.tsnew file mode 100644index 00000000000..21495b3b1fb--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-custom-types.ts@@ -0,0 +1,50 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++export const asanaListCustomTypesAction = createAction({+ auth: asanaAuth,+ name: 'list_custom_types',+ classification: 'SEARCH',+ displayName: 'List Custom Types',+ description: 'List the custom task types of an Asana project or workspace (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists custom task types (for example Bug or Request) with their status options (name, color, enabled, completion state). Set exactly one of Project GID (types used in that project) or Workspace GID (every type in the workspace, including ones created by Asana products). Custom types need an Advanced or higher Asana plan. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ project: Property.ShortText({+ displayName: 'Project GID',+ description: 'Gid of a project, to list the custom types it uses. Set this or Workspace GID, not both.',+ required: false,+ }),+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of a workspace, to list all its custom types. Set this or Project GID, not both.',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'custom types' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { project, workspace, limit, offset } = context.propsValue;+ asanaUtils.assertNotBoth({ first: project, second: workspace, firstLabel: 'Project GID', secondLabel: 'Workspace GID' });+ if (!asanaUtils.hasValue(project) && !asanaUtils.hasValue(workspace)) {+ throw new Error('Set Project GID or Workspace GID.');+ }+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/custom_types',+ operation: 'List Custom Types',+ query: {+ project: asanaUtils.hasValue(project) ? String(project).trim() : undefined,+ workspace: asanaUtils.hasValue(workspace) ? String(workspace).trim() : undefined,+ opt_fields: ASANA_FIELDS.customType,+ },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-favorites.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-favorites.tsnew file mode 100644index 00000000000..b93693728ab--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-favorites.ts@@ -0,0 +1,54 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { AsanaRecord, asanaClient, asanaProps } from '../../common/client';+import { asanaFavoriteListOutputSchema } from '../../output-schemas';++const RESOURCE_TYPE_OPTIONS = [+ { label: 'Project', value: 'project' },+ { label: 'Task', value: 'task' },+ { label: 'Tag', value: 'tag' },+ { label: 'User', value: 'user' },+ { label: 'Portfolio', value: 'portfolio' },+ { label: 'Project template', value: 'project_template' },+];++export const asanaListFavoritesAction = createAction({+ auth: asanaAuth,+ name: 'list_favorites',+ classification: 'SEARCH',+ displayName: 'List My Favorites',+ description: 'List the connected user\'s favorites of one type in a workspace.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the connected user\'s own favorites (projects, tasks, tags, users, portfolios or project templates) in one workspace, in sidebar order. Asana only returns favorites for the authenticated user, so there is no way to read another user\'s favorites. A quick way to find the projects the user cares about. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaFavoriteListOutputSchema,+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace to read favorites from. Obtain it from List Workspaces or Get Current User.',+ required: true,+ }),+ resource_type: Property.StaticDropdown({+ displayName: 'Favorite Type',+ description: 'Kind of favorites to return.',+ required: true,+ options: { disabled: false, options: RESOURCE_TYPE_OPTIONS },+ }),+ limit: asanaProps.limit({ noun: 'favorites' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { workspace, resource_type, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/users/me/favorites',+ operation: 'List My Favorites',+ query: { workspace: workspace.trim(), resource_type, opt_fields: 'name' },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-goal-relationships.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-goal-relationships.tsnew file mode 100644index 00000000000..aa20b8c8a66--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-goal-relationships.ts@@ -0,0 +1,52 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++const SUBTYPE_OPTIONS = [+ { label: 'Subgoals', value: 'subgoal' },+ { label: 'Supporting work (projects, tasks, portfolios)', value: 'supporting_work' },+];++export const asanaListGoalRelationshipsAction = createAction({+ auth: asanaAuth,+ name: 'list_goal_relationships',+ classification: 'SEARCH',+ displayName: 'List Goal Relationships',+ description: 'List the subgoals and supporting work linked to an Asana goal (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists what supports a goal: its subgoals and the projects, tasks and portfolios linked as supporting work, each with its contribution weight. Use it before Add Goal Supporting Relationship to avoid linking the same resource twice. Goals need an Advanced or higher Asana plan. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ supported_goal: Property.ShortText({+ displayName: 'Goal GID',+ description: 'Gid of the goal whose supporting relationships to list. Obtain it from List Goals.',+ required: true,+ }),+ resource_subtype: Property.StaticDropdown({+ displayName: 'Relationship Type',+ description: 'Only return this kind of relationship. Leave empty for both.',+ required: false,+ options: { disabled: false, options: SUBTYPE_OPTIONS },+ }),+ limit: asanaProps.limit({ noun: 'relationships' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { supported_goal, resource_subtype, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/goal_relationships',+ operation: 'List Goal Relationships',+ query: {+ supported_goal: supported_goal.trim(),+ resource_subtype: asanaUtils.hasValue(resource_subtype) ? resource_subtype : undefined,+ opt_fields: ASANA_FIELDS.goalRelationship,+ },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-goals.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-goals.tsnew file mode 100644index 00000000000..b4414fb39e5--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-goals.ts@@ -0,0 +1,87 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++export const asanaListGoalsAction = createAction({+ auth: asanaAuth,+ name: 'list_goals',+ classification: 'SEARCH',+ displayName: 'List Goals',+ description: 'List Asana goals by workspace, team, time period or supporting work (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists goals with status, dates, owner, team and time period. Scope the list with Workspace GID or Team GID, or find the goals a project, task or portfolio supports; narrow by time period gids from List Time Periods. Use Get Goal for metrics and notes. Goals need an Advanced or higher Asana plan; lower plans get a paid-plan error. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace whose goals to list. Obtain it from List Workspaces.',+ required: false,+ }),+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Gid of a team, to list only that team\'s goals. Obtain it from List Teams.',+ required: false,+ }),+ project: Property.ShortText({+ displayName: 'Supporting Project GID',+ description: 'Gid of a project, to list the goals it supports.',+ required: false,+ }),+ task: Property.ShortText({+ displayName: 'Supporting Task GID',+ description: 'Gid of a task, to list the goals it supports.',+ required: false,+ }),+ portfolio: Property.ShortText({+ displayName: 'Supporting Portfolio GID',+ description: 'Gid of a portfolio, to list the goals it supports.',+ required: false,+ }),+ is_workspace_level: asanaProps.optionalBoolean({+ displayName: 'Workspace-Level Goals',+ description: 'Yes for company-wide (workspace-level) goals only, No for team goals only. Requires Workspace GID. Leave empty for both.',+ }),+ time_periods: Property.Array({+ displayName: 'Time Period GIDs',+ description: 'Only goals in these time periods. Obtain gids from List Time Periods.',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'goals' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const props = context.propsValue;+ const scopes = [props.workspace, props.team, props.project, props.task, props.portfolio];+ if (!scopes.some((scope) => asanaUtils.hasValue(scope))) {+ throw new Error('Set at least one of Workspace GID, Team GID, Supporting Project GID, Supporting Task GID or Supporting Portfolio GID.');+ }+ if (typeof props.is_workspace_level === 'boolean' && !asanaUtils.hasValue(props.workspace)) {+ throw new Error('Workspace-Level Goals needs Workspace GID as well.');+ }+ const timePeriods = asanaUtils.toStringArray(props.time_periods);+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/goals',+ operation: 'List Goals',+ query: {+ workspace: trimmed(props.workspace),+ team: trimmed(props.team),+ project: trimmed(props.project),+ task: trimmed(props.task),+ portfolio: trimmed(props.portfolio),+ is_workspace_level: props.is_workspace_level,+ time_periods: timePeriods.length > 0 ? timePeriods.join(',') : undefined,+ opt_fields: ASANA_FIELDS.goalList,+ },+ limit: props.limit,+ offset: props.offset,+ });+ },+});++function trimmed(value: string | undefined | null): string | undefined {+ return asanaUtils.hasValue(value) ? String(value).trim() : undefined;+}diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-portfolio-items.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-portfolio-items.tsnew file mode 100644index 00000000000..43244427a0d--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-portfolio-items.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++export const asanaListPortfolioItemsAction = createAction({+ auth: asanaAuth,+ name: 'list_portfolio_items',+ classification: 'SEARCH',+ displayName: 'List Portfolio Items',+ description: 'List the projects and nested portfolios inside an Asana portfolio (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the items of a portfolio (projects and nested portfolios) as compact records with gid, name and resource_type. Use Get Project or Get Portfolio for details of an item. Portfolios need an Advanced or higher Asana plan. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ portfolio: Property.ShortText({+ displayName: 'Portfolio GID',+ description: 'Gid of the portfolio. Obtain it from List My Portfolios.',+ required: true,+ }),+ limit: asanaProps.limit({ noun: 'items' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { portfolio, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: `/portfolios/${asanaUtils.pathSegment(portfolio)}/items`,+ operation: 'List Portfolio Items',+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-portfolios.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-portfolios.tsnew file mode 100644index 00000000000..4d53005e90b--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-portfolios.ts@@ -0,0 +1,37 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps } from '../../common/client';++export const asanaListPortfoliosAction = createAction({+ auth: asanaAuth,+ name: 'list_portfolios',+ classification: 'SEARCH',+ displayName: 'List My Portfolios',+ description: 'List the Asana portfolios owned by the connected user in a workspace (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the portfolios in a workspace that the connected user owns, with owner, dates, privacy and color. Asana requires an owner filter and only returns the calling user\'s own portfolios to OAuth apps, so the action always sends owner=me. Use it to find a portfolio gid for Get Portfolio, List Portfolio Items or Add Portfolio Item. Portfolios need an Advanced or higher Asana plan; lower plans get a paid-plan error. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace. Obtain it from List Workspaces.',+ required: true,+ }),+ limit: asanaProps.limit({ noun: 'portfolios' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { workspace, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/portfolios',+ operation: 'List My Portfolios',+ query: { workspace: workspace.trim(), owner: 'me', opt_fields: ASANA_FIELDS.portfolioList },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-project-templates.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-project-templates.tsnew file mode 100644index 00000000000..e0af4a70da8--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-project-templates.ts@@ -0,0 +1,50 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++export const asanaListProjectTemplatesAction = createAction({+ auth: asanaAuth,+ name: 'list_project_templates',+ classification: 'SEARCH',+ displayName: 'List Project Templates',+ description: 'List the custom project templates of an Asana team, or of a plain workspace (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists custom project templates in a workspace or a team, with the date variables (requested_dates) and roles (requested_roles) each one needs. Use it to get the template gid and the date and role gids before Instantiate Project Template. Set Team GID or Workspace GID, not both. In an organization (a company-domain workspace, is_organization=true in List Workspaces) Asana rejects Workspace GID with "Not a valid regular workspace", so use Team GID there (get it from List Teams); Workspace GID only works for plain workspaces. Custom templates need a paid Asana plan. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of a plain (non-organization) workspace whose templates to list. Asana rejects organizations here; use Team GID for them. Set this or Team GID.',+ required: false,+ }),+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Gid of the team whose templates to list (preferred; required in organizations). Obtain it from List Teams. Set this or Workspace GID.',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'templates' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { workspace, team, limit, offset } = context.propsValue;+ asanaUtils.assertNotBoth({ first: workspace, second: team, firstLabel: 'Workspace GID', secondLabel: 'Team GID' });+ if (!asanaUtils.hasValue(workspace) && !asanaUtils.hasValue(team)) {+ throw new Error('Set Workspace GID or Team GID.');+ }+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/project_templates',+ operation: 'List Project Templates',+ query: {+ workspace: asanaUtils.hasValue(workspace) ? String(workspace).trim() : undefined,+ team: asanaUtils.hasValue(team) ? String(team).trim() : undefined,+ opt_fields: ASANA_FIELDS.projectTemplate,+ },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-reactions.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-reactions.tsnew file mode 100644index 00000000000..e355e01728d--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-reactions.ts@@ -0,0 +1,42 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { AsanaRecord, asanaClient, asanaProps } from '../../common/client';++export const asanaListReactionsAction = createAction({+ auth: asanaAuth,+ name: 'list_reactions',+ classification: 'SEARCH',+ displayName: 'List Reactions',+ description: 'List who reacted with a given emoji on an Asana comment or status update.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the reactions with one emoji on a story (such as a task comment) or a status update, including who reacted. The emoji is required: Asana only returns reactions for the emoji you name. Get story gids from List Task Stories and status update gids from List Status Updates. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ target: Property.ShortText({+ displayName: 'Story or Status Update GID',+ description: 'Gid of the story (for example a task comment) or status update. Obtain it from List Task Stories or List Status Updates.',+ required: true,+ }),+ emoji_base: Property.ShortText({+ displayName: 'Emoji',+ description: 'The emoji character itself, not a name or shortcode, for example the thumbs-up character (U+1F44D). Use the base emoji without a skin-tone variant.',+ required: true,+ }),+ limit: asanaProps.limit({ noun: 'reactions' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { target, emoji_base, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/reactions',+ operation: 'List Reactions',+ query: { target: target.trim(), emoji_base: emoji_base.trim() },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-task-dependencies.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-task-dependencies.tsnew file mode 100644index 00000000000..0ceb9747e63--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-task-dependencies.ts@@ -0,0 +1,39 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaTaskListOutputSchema } from '../../output-schemas';++export const asanaListTaskDependenciesAction = createAction({+ auth: asanaAuth,+ name: 'list_task_dependencies',+ classification: 'SEARCH',+ displayName: 'List Task Dependencies',+ description: 'List the tasks that an Asana task depends on (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the tasks a task is waiting on (its dependencies), with name, completion, due dates and assignee. Use it before Add Task Dependencies (30 dependencies and dependents combined at most) or to find the gids for Remove Task Dependencies. Needs a paid Asana plan; a free workspace gets a paid-plan error. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTaskListOutputSchema,+ props: {+ task: Property.ShortText({+ displayName: 'Task GID',+ description: 'Gid of the task whose dependencies to list. Obtain it from List Project Tasks or Search Workspace Objects.',+ required: true,+ }),+ limit: asanaProps.limit({ noun: 'tasks' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { task, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: `/tasks/${asanaUtils.pathSegment(task)}/dependencies`,+ operation: 'List Task Dependencies',+ query: { opt_fields: ASANA_FIELDS.taskList },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-task-templates.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-task-templates.tsnew file mode 100644index 00000000000..b320d7437f5--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-task-templates.ts@@ -0,0 +1,37 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps } from '../../common/client';++export const asanaListTaskTemplatesAction = createAction({+ auth: asanaAuth,+ name: 'list_task_templates',+ classification: 'SEARCH',+ displayName: 'List Task Templates',+ description: 'List the task templates of an Asana project (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the task templates saved in one project, with name, creator and creation time. Templates are per project, so set Project GID. Custom templates need a paid Asana plan. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ project: Property.ShortText({+ displayName: 'Project GID',+ description: 'Gid of the project whose task templates to list. Obtain it from List Projects.',+ required: true,+ }),+ limit: asanaProps.limit({ noun: 'templates' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { project, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/task_templates',+ operation: 'List Task Templates',+ query: { project: project.trim(), opt_fields: ASANA_FIELDS.taskTemplate },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-team-memberships.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-team-memberships.tsnew file mode 100644index 00000000000..e81ef7d5d1f--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-team-memberships.ts@@ -0,0 +1,63 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaTeamMembershipListOutputSchema } from '../../output-schemas';++export const asanaListTeamMembershipsAction = createAction({+ auth: asanaAuth,+ name: 'list_team_memberships',+ classification: 'SEARCH',+ displayName: 'List Team Memberships',+ description: 'List the members of an Asana team, or the team memberships of a user.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists team memberships with is_admin, is_guest and is_limited_access flags. Set Team GID for everyone in one team, or User together with Workspace GID for every team membership of that user. Use it to check who administers a team before changing it. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTeamMembershipListOutputSchema,+ props: {+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Gid of the team whose members to list. Obtain it from List Teams. Set this, or User with Workspace GID.',+ required: false,+ }),+ user: Property.ShortText({+ displayName: 'User',+ description: 'User whose team memberships to list: "me", an email address or a user gid. Requires Workspace GID.',+ required: false,+ }),+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the organization to search in. Required with User, and only used with User.',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'memberships' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { team, user, workspace, limit, offset } = context.propsValue;+ const hasTeam = asanaUtils.hasValue(team);+ const hasUser = asanaUtils.hasValue(user);+ const hasWorkspace = asanaUtils.hasValue(workspace);+ if (hasUser !== hasWorkspace) {+ throw new Error('User and Workspace GID must be set together; Asana needs both to list a user\'s team memberships.');+ }+ if (!hasTeam && !hasUser) {+ throw new Error('Set Team GID, or User together with Workspace GID.');+ }+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/team_memberships',+ operation: 'List Team Memberships',+ query: {+ team: hasTeam ? String(team).trim() : undefined,+ user: hasUser ? String(user).trim() : undefined,+ workspace: hasWorkspace ? String(workspace).trim() : undefined,+ opt_fields: ASANA_FIELDS.teamMembership,+ },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-time-periods.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-time-periods.tsnew file mode 100644index 00000000000..6d1b6f41533--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-time-periods.ts@@ -0,0 +1,54 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaTimePeriodListOutputSchema } from '../../output-schemas';++export const asanaListTimePeriodsAction = createAction({+ auth: asanaAuth,+ name: 'list_time_periods',+ classification: 'SEARCH',+ displayName: 'List Time Periods',+ description: 'List the goal time periods (fiscal years, quarters) of an Asana workspace (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the time periods goals are set against (for example FY26 or Q3 FY26), with display name, period type, start and end dates and parent period. Use the gids to filter List Goals by time period. Start On and End On narrow the list by the dates of the periods. Goals need an Advanced or higher Asana plan. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTimePeriodListOutputSchema,+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace. Obtain it from List Workspaces.',+ required: true,+ }),+ start_on: Property.ShortText({+ displayName: 'Start On',+ description: 'Narrow the list by period start date, YYYY-MM-DD (sent to Asana as start_on).',+ required: false,+ }),+ end_on: Property.ShortText({+ displayName: 'End On',+ description: 'Narrow the list by period end date, YYYY-MM-DD (sent to Asana as end_on).',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'time periods' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { workspace, start_on, end_on, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/time_periods',+ operation: 'List Time Periods',+ query: {+ workspace: workspace.trim(),+ start_on: asanaUtils.hasValue(start_on) ? asanaUtils.assertDate({ value: String(start_on), field: 'Start On' }) : undefined,+ end_on: asanaUtils.hasValue(end_on) ? asanaUtils.assertDate({ value: String(end_on), field: 'End On' }) : undefined,+ opt_fields: ASANA_FIELDS.timePeriod,+ },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-time-tracking-entries.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-time-tracking-entries.tsnew file mode 100644index 00000000000..9fae028079c--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-time-tracking-entries.ts@@ -0,0 +1,89 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++export const asanaListTimeTrackingEntriesAction = createAction({+ auth: asanaAuth,+ name: 'list_time_tracking_entries',+ classification: 'SEARCH',+ displayName: 'List Time Tracking Entries',+ description: 'List logged time entries for a task, project, portfolio, user or workspace (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists native Asana time tracking entries (minutes logged, date entered, who logged it, attributed project, categories). Filter by task, attributed project, portfolio or user. Asana requires Entered From or Entered To whenever Workspace GID is set, even together with another filter, so to list one user\'s time without a date range set User GID alone. Use it to total time spent on a task or project. Time tracking needs an Advanced or higher Asana plan; lower plans get a paid-plan error. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ props: {+ task: Property.ShortText({+ displayName: 'Task GID',+ description: 'Gid of a task, to list the time logged on it.',+ required: false,+ }),+ attributable_to: Property.ShortText({+ displayName: 'Attributed Project GID',+ description: 'Gid of a project, to list the time attributed to it.',+ required: false,+ }),+ portfolio: Property.ShortText({+ displayName: 'Portfolio GID',+ description: 'Gid of a portfolio, to list the time logged on its work.',+ required: false,+ }),+ user: Property.ShortText({+ displayName: 'User GID',+ description: 'Gid of a user, to list the time they logged.',+ required: false,+ }),+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace, to list time across it. Requires Entered From or Entered To.',+ required: false,+ }),+ entered_on_start_date: Property.ShortText({+ displayName: 'Entered From',+ description: 'Start of the entry date range, YYYY-MM-DD.',+ required: false,+ }),+ entered_on_end_date: Property.ShortText({+ displayName: 'Entered To',+ description: 'End of the entry date range, YYYY-MM-DD.',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'entries' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const props = context.propsValue;+ const filters = [props.task, props.attributable_to, props.portfolio, props.user, props.workspace];+ if (!filters.some((filter) => asanaUtils.hasValue(filter))) {+ throw new Error('Set at least one of Task GID, Attributed Project GID, Portfolio GID, User GID or Workspace GID.');+ }+ const startDate = asanaUtils.hasValue(props.entered_on_start_date) ? asanaUtils.assertDate({ value: String(props.entered_on_start_date), field: 'Entered From' }) : undefined;+ const endDate = asanaUtils.hasValue(props.entered_on_end_date) ? asanaUtils.assertDate({ value: String(props.entered_on_end_date), field: 'Entered To' }) : undefined;+ if (asanaUtils.hasValue(props.workspace) && startDate === undefined && endDate === undefined) {+ throw new Error('Asana requires Entered From or Entered To whenever Workspace GID is set. Add a date, or leave Workspace GID empty and filter by Task, Attributed Project, Portfolio or User GID alone.');+ }+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/time_tracking_entries',+ operation: 'List Time Tracking Entries',+ query: {+ task: trimmed(props.task),+ attributable_to: trimmed(props.attributable_to),+ portfolio: trimmed(props.portfolio),+ user: trimmed(props.user),+ workspace: trimmed(props.workspace),+ entered_on_start_date: startDate,+ entered_on_end_date: endDate,+ opt_fields: ASANA_FIELDS.timeTrackingEntry,+ },+ limit: props.limit,+ offset: props.offset,+ });+ },+});++function trimmed(value: string | undefined | null): string | undefined {+ return asanaUtils.hasValue(value) ? String(value).trim() : undefined;+}diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-user-teams.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-user-teams.tsnew file mode 100644index 00000000000..3c451f4cffc--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-user-teams.ts@@ -0,0 +1,44 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaTeamListOutputSchema } from '../../output-schemas';++export const asanaListUserTeamsAction = createAction({+ auth: asanaAuth,+ name: 'list_user_teams',+ classification: 'SEARCH',+ displayName: 'List User Teams',+ description: 'List the teams a user belongs to in an Asana organization.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the teams one user belongs to in an organization. Use "me" for the connected user\'s own teams; use List Teams for every team in the organization. Teams exist only in organizations, so a plain workspace returns an error. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTeamListOutputSchema,+ props: {+ user: Property.ShortText({+ displayName: 'User',+ description: 'User whose teams to list: "me", an email address or a user gid.',+ required: true,+ }),+ organization: Property.ShortText({+ displayName: 'Organization (Workspace) GID',+ description: 'Gid of the organization to list teams in. Obtain it from List Workspaces (is_organization must be true).',+ required: true,+ }),+ limit: asanaProps.limit({ noun: 'teams' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { user, organization, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: `/users/${asanaUtils.pathSegment(user)}/teams`,+ operation: 'List User Teams',+ query: { organization: organization.trim(), opt_fields: ASANA_FIELDS.team },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-users.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-users.tsnew file mode 100644index 00000000000..916ba5b737b--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-users.ts@@ -0,0 +1,51 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaUserListOutputSchema } from '../../output-schemas';++export const asanaListUsersAction = createAction({+ auth: asanaAuth,+ name: 'list_users',+ classification: 'SEARCH',+ displayName: 'List Users',+ description: 'List the users in an Asana workspace or team.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists users (gid, name, email) in a workspace or in a team, sorted by user gid. Set Workspace GID, Team GID or both. Use it to find a user gid for assignees, followers or memberships; to look up one known email use Get User instead. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaUserListOutputSchema,+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace or organization whose users to list. Obtain it from List Workspaces. Set this, Team GID, or both.',+ required: false,+ }),+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Gid of the team whose users to list. Obtain it from List Teams. Set this, Workspace GID, or both.',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'users' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { workspace, team, limit, offset } = context.propsValue;+ if (!asanaUtils.hasValue(workspace) && !asanaUtils.hasValue(team)) {+ throw new Error('Set Workspace GID or Team GID so Asana knows which users to list.');+ }+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: '/users',+ operation: 'List Users',+ query: {+ workspace: asanaUtils.hasValue(workspace) ? String(workspace).trim() : undefined,+ team: asanaUtils.hasValue(team) ? String(team).trim() : undefined,+ opt_fields: ASANA_FIELDS.userList,+ },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/list-workspace-memberships.ts b/packages/pieces/community/asana/src/lib/actions/ai/list-workspace-memberships.tsnew file mode 100644index 00000000000..3f7e6ddfa8b--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/list-workspace-memberships.ts@@ -0,0 +1,47 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaWorkspaceMembershipListOutputSchema } from '../../output-schemas';++export const asanaListWorkspaceMembershipsAction = createAction({+ auth: asanaAuth,+ name: 'list_workspace_memberships',+ classification: 'SEARCH',+ displayName: 'List Workspace Memberships',+ description: 'List who belongs to an Asana workspace and with what role.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists workspace memberships: each user with is_active, is_admin, is_guest and is_view_only flags. Filter by one user to check whether they are an admin or a guest before workspace or team changes. Use List Users when only names and emails are needed. Paginated with next_offset; read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaWorkspaceMembershipListOutputSchema,+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace or organization. Obtain it from List Workspaces.',+ required: true,+ }),+ user: Property.ShortText({+ displayName: 'User',+ description: 'Only return the membership of this user: "me", an email address or a user gid. Leave empty to list everyone.',+ required: false,+ }),+ limit: asanaProps.limit({ noun: 'memberships' }),+ offset: asanaProps.offset(),+ },+ async run(context) {+ const { workspace, user, limit, offset } = context.propsValue;+ return asanaClient.asanaListPage<AsanaRecord>({+ auth: context.auth,+ path: `/workspaces/${asanaUtils.pathSegment(workspace)}/workspace_memberships`,+ operation: 'List Workspace Memberships',+ query: {+ user: asanaUtils.hasValue(user) ? String(user).trim() : undefined,+ opt_fields: ASANA_FIELDS.workspaceMembership,+ },+ limit,+ offset,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/reject-access-request.ts b/packages/pieces/community/asana/src/lib/actions/ai/reject-access-request.tsnew file mode 100644index 00000000000..27f1cd405d7--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/reject-access-request.ts@@ -0,0 +1,38 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaAccessRequestDecisionOutputSchema } from '../../output-schemas';++export const asanaRejectAccessRequestAction = createAction({+ auth: asanaAuth,+ name: 'reject_access_request',+ classification: 'WRITE',+ displayName: 'Reject Access Request',+ description: 'Decline a pending request to access an Asana project or portfolio.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Rejects one pending access request; the requester does not get access and can ask again later. Only people who can manage the target\'s members can reject. Find request gids with List Access Requests; use Approve Access Request to grant access instead. Not idempotent: a request that was already handled cannot be rejected again.',+ idempotent: false,+ },+ outputSchema: asanaAccessRequestDecisionOutputSchema,+ props: {+ access_request: Property.ShortText({+ displayName: 'Access Request GID',+ description: 'Gid of the pending access request. Obtain it from List Access Requests.',+ required: true,+ }),+ },+ async run(context) {+ const accessRequest = context.propsValue.access_request.trim();+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/access_requests/${asanaUtils.pathSegment(accessRequest)}/reject`,+ operation: 'Reject Access Request',+ data: {},+ });+ return { success: true, access_request_gid: accessRequest, approval_status: 'rejected' };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/remove-portfolio-item.ts b/packages/pieces/community/asana/src/lib/actions/ai/remove-portfolio-item.tsnew file mode 100644index 00000000000..d704a6364de--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/remove-portfolio-item.ts@@ -0,0 +1,43 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaPortfolioItemChangeOutputSchema } from '../../output-schemas';++export const asanaRemovePortfolioItemAction = createAction({+ auth: asanaAuth,+ name: 'remove_portfolio_item',+ classification: 'WRITE',+ displayName: 'Remove Portfolio Item',+ description: 'Take a project or portfolio out of an Asana portfolio (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Removes a project (or nested portfolio) from a portfolio. The project itself is kept and nobody loses access to it; to delete a project use Delete Project. Portfolios need an Advanced or higher Asana plan. Removing an item that is already gone converges, so it is safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaPortfolioItemChangeOutputSchema,+ props: {+ portfolio: Property.ShortText({+ displayName: 'Portfolio GID',+ description: 'Gid of the portfolio. Obtain it from List My Portfolios.',+ required: true,+ }),+ item: Property.ShortText({+ displayName: 'Item GID',+ description: 'Gid of the project or portfolio to remove. Obtain it from List Portfolio Items.',+ required: true,+ }),+ },+ async run(context) {+ const { portfolio, item } = context.propsValue;+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/portfolios/${asanaUtils.pathSegment(portfolio)}/removeItem`,+ operation: 'Remove Portfolio Item',+ data: { item: item.trim() },+ });+ return { success: true, portfolio_gid: portfolio.trim(), item_gid: item.trim() };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/remove-task-dependencies.ts b/packages/pieces/community/asana/src/lib/actions/ai/remove-task-dependencies.tsnew file mode 100644index 00000000000..dd3bb2a209d--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/remove-task-dependencies.ts@@ -0,0 +1,47 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaRemoveTaskDependenciesOutputSchema } from '../../output-schemas';++export const asanaRemoveTaskDependenciesAction = createAction({+ auth: asanaAuth,+ name: 'remove_task_dependencies',+ classification: 'WRITE',+ displayName: 'Remove Task Dependencies',+ description: 'Unlink dependency tasks from an Asana task (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Unlinks the given dependency tasks from a task so it no longer waits on them; the tasks themselves are not changed or deleted. Read the current dependencies with List Task Dependencies. Needs a paid Asana plan; a free workspace gets a paid-plan error. Removing a link that is already gone converges, so it is safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaRemoveTaskDependenciesOutputSchema,+ props: {+ task: Property.ShortText({+ displayName: 'Task GID',+ description: 'Gid of the blocked task. Obtain it from List Project Tasks or Search Workspace Objects.',+ required: true,+ }),+ dependencies: Property.Array({+ displayName: 'Dependency Task GIDs',+ description: 'Gids of the dependency tasks to unlink. Obtain them from List Task Dependencies.',+ required: true,+ }),+ },+ async run(context) {+ const task = context.propsValue.task.trim();+ const dependencies = asanaUtils.toStringArray(context.propsValue.dependencies);+ if (dependencies.length === 0) {+ throw new Error('Dependency Task GIDs must contain at least one task gid.');+ }+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/tasks/${asanaUtils.pathSegment(task)}/removeDependencies`,+ operation: 'Remove Task Dependencies',+ data: { dependencies },+ });+ return { success: true, task_gid: task, removed_dependency_gids: dependencies };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/remove-user-from-team.ts b/packages/pieces/community/asana/src/lib/actions/ai/remove-user-from-team.tsnew file mode 100644index 00000000000..8c1be2f8b3f--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/remove-user-from-team.ts@@ -0,0 +1,44 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaRemoveUserFromTeamOutputSchema } from '../../output-schemas';++export const asanaRemoveUserFromTeamAction = createAction({+ auth: asanaAuth,+ name: 'remove_user_from_team',+ classification: 'DESTRUCTIVE',+ displayName: 'Remove User from Team',+ description: 'Remove a user from an Asana team.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Removes a user from a team, revoking the access they had through it (team projects that are not shared with them otherwise). The connected user must be a member of the team to remove themselves or others. The user\'s own tasks and projects are kept, and Add User to Team restores the membership. Converges on repeat: the user stays out of the team.',+ idempotent: true,+ },+ outputSchema: asanaRemoveUserFromTeamOutputSchema,+ props: {+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Gid of the team. Obtain it from List Teams or List User Teams.',+ required: true,+ }),+ user: Property.ShortText({+ displayName: 'User',+ description: 'User to remove: "me", an email address or a user gid. Obtain it from List Team Memberships.',+ required: true,+ }),+ },+ async run(context) {+ const team = context.propsValue.team.trim();+ const user = context.propsValue.user.trim();+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/teams/${asanaUtils.pathSegment(team)}/removeUser`,+ operation: 'Remove User from Team',+ data: { user },+ });+ return { success: true, team_gid: team, user };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/remove-user-from-workspace.ts b/packages/pieces/community/asana/src/lib/actions/ai/remove-user-from-workspace.tsnew file mode 100644index 00000000000..a97fe8bb13f--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/remove-user-from-workspace.ts@@ -0,0 +1,44 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { asanaClient, asanaUtils } from '../../common/client';+import { asanaRemoveUserFromWorkspaceOutputSchema } from '../../output-schemas';++export const asanaRemoveUserFromWorkspaceAction = createAction({+ auth: asanaAuth,+ name: 'remove_user_from_workspace',+ classification: 'DESTRUCTIVE',+ displayName: 'Remove User from Workspace',+ description: 'Remove a user from an Asana workspace or organization.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Removes a user from a workspace or organization. Admin only. Ownership of the removed user\'s resources is transferred to the connected user, and their private resources become inaccessible unless they were made public before removal; re-adding the user does not restore that. Confirm with the user first. Not idempotent: a repeat call on a removed user fails.',+ idempotent: false,+ },+ outputSchema: asanaRemoveUserFromWorkspaceOutputSchema,+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace or organization. Obtain it from List Workspaces.',+ required: true,+ }),+ user: Property.ShortText({+ displayName: 'User',+ description: 'User to remove: an email address or a user gid. Obtain it from List Users or List Workspace Memberships.',+ required: true,+ }),+ },+ async run(context) {+ const workspace = context.propsValue.workspace.trim();+ const user = context.propsValue.user.trim();+ await asanaClient.asanaEmpty({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/workspaces/${asanaUtils.pathSegment(workspace)}/removeUser`,+ operation: 'Remove User from Workspace',+ data: { user },+ });+ return { success: true, workspace_gid: workspace, user };+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/reorder-custom-field-enum-option.ts b/packages/pieces/community/asana/src/lib/actions/ai/reorder-custom-field-enum-option.tsnew file mode 100644index 00000000000..8da8679c526--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/reorder-custom-field-enum-option.ts@@ -0,0 +1,59 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaReorderCustomFieldEnumOptionAction = createAction({+ auth: asanaAuth,+ name: 'reorder_custom_field_enum_option',+ classification: 'WRITE',+ displayName: 'Reorder Custom Field Enum Option',+ description: 'Move an option of an Asana select custom field before or after another option (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Moves an existing option of a single-select or multi-select custom field so it sits directly before or directly after another option of the same field, and returns the moved option (gid, name, color, enabled). Set exactly one of Before Option GID or After Option GID; read the option gids and current order with Get Custom Field. It only changes the order, never the option itself; use Update Custom Field Enum Option to rename, recolor or disable. Locked fields can only be reordered by the user who locked them. Needs a paid Asana plan. Moving to the same position again converges, so it is safe to retry.',+ idempotent: true,+ },+ props: {+ custom_field: Property.ShortText({+ displayName: 'Custom Field GID',+ description: 'Gid of the custom field that owns the options. Obtain it from List Custom Fields.',+ required: true,+ }),+ enum_option: Property.ShortText({+ displayName: 'Option GID to Move',+ description: 'Gid of the option to move. Obtain it from Get Custom Field (enum_options).',+ required: true,+ }),+ before_enum_option: Property.ShortText({+ displayName: 'Before Option GID',+ description: 'Gid of the option to place the moved option directly before. Set this or After Option GID, not both.',+ required: false,+ }),+ after_enum_option: Property.ShortText({+ displayName: 'After Option GID',+ description: 'Gid of the option to place the moved option directly after. Set this or Before Option GID, not both.',+ required: false,+ }),+ },+ async run(context) {+ const { custom_field, enum_option, before_enum_option, after_enum_option } = context.propsValue;+ asanaUtils.assertNotBoth({ first: before_enum_option, second: after_enum_option, firstLabel: 'Before Option GID', secondLabel: 'After Option GID' });+ if (!asanaUtils.hasValue(before_enum_option) && !asanaUtils.hasValue(after_enum_option)) {+ throw new Error('Set Before Option GID or After Option GID to say where the option should move.');+ }+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: `/custom_fields/${asanaUtils.pathSegment(custom_field)}/enum_options/insert`,+ operation: 'Reorder Custom Field Enum Option',+ query: { opt_fields: ASANA_FIELDS.enumOption },+ data: {+ enum_option: enum_option.trim(),+ ...(asanaUtils.hasValue(before_enum_option) ? { before_enum_option: String(before_enum_option).trim() } : {}),+ ...(asanaUtils.hasValue(after_enum_option) ? { after_enum_option: String(after_enum_option).trim() } : {}),+ },+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/search-tasks.ts b/packages/pieces/community/asana/src/lib/actions/ai/search-tasks.tsnew file mode 100644index 00000000000..5e50643ee85--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/search-tasks.ts@@ -0,0 +1,151 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaTaskSearchOutputSchema } from '../../output-schemas';++const SUBTYPE_OPTIONS = [+ { label: 'Task', value: 'default_task' },+ { label: 'Milestone', value: 'milestone' },+ { label: 'Approval', value: 'approval' },+ { label: 'Custom task type', value: 'custom' },+];++const SORT_OPTIONS = [+ { label: 'Modified at (default)', value: 'modified_at' },+ { label: 'Created at', value: 'created_at' },+ { label: 'Due date', value: 'due_date' },+ { label: 'Completed at', value: 'completed_at' },+ { label: 'Likes', value: 'likes' },+ { label: 'Relevance', value: 'relevance' },+];++export const asanaSearchTasksAction = createAction({+ auth: asanaAuth,+ name: 'search_tasks',+ classification: 'SEARCH',+ displayName: 'Search Tasks',+ description: 'Search the tasks of an Asana workspace with advanced filters (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Runs Asana advanced search over a whole workspace: full text on task name and description, plus filters on assignee, projects, sections, tags, completion, blocked state and dates. Needs a paid (premium) Asana workspace or team; a free workspace gets a paid-plan error, so use List Project Tasks, List Assigned Tasks or Search Workspace Objects there instead. Results lag writes by 10 to 60 seconds, so do not use it to read back a task you just changed. There is no offset pagination: to page, sort by Created at ascending and pass the created_at of the last task you saw as Created After on the next call. Tasks created at the same moment as that last task can be skipped at the page boundary; narrow the filters when you need every match. Read-only and safe to retry.',+ idempotent: true,+ },+ outputSchema: asanaTaskSearchOutputSchema,+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace to search. Obtain it from List Workspaces.',+ required: true,+ }),+ text: Property.ShortText({+ displayName: 'Text',+ description: 'Words to match in the task name and description. Leave empty to filter only.',+ required: false,+ }),+ resource_subtype: Property.StaticDropdown({+ displayName: 'Task Type',+ description: 'Only return tasks of this type. Leave empty for all types.',+ required: false,+ options: { disabled: false, options: SUBTYPE_OPTIONS },+ }),+ assignees: Property.Array({+ displayName: 'Assigned To (any of)',+ description: 'Users, any of whom may be the assignee: "me", an email address or a user gid.',+ required: false,+ }),+ projects: Property.Array({+ displayName: 'In Projects (any of)',+ description: 'Project gids; tasks in any of them (or inheriting them from a parent task) match. Obtain gids from List Projects.',+ required: false,+ }),+ sections: Property.Array({+ displayName: 'In Sections (any of)',+ description: 'Section gids; tasks in any of them match. Setting Projects as well also returns every task of those projects, so leave Projects empty to search inside sections only.',+ required: false,+ }),+ tags: Property.Array({+ displayName: 'Tagged With (any of)',+ description: 'Tag gids; tasks carrying any of them match. Obtain gids from List Tags.',+ required: false,+ }),+ completed: asanaProps.optionalBoolean({+ displayName: 'Completed',+ description: 'Yes for completed tasks only, No for incomplete tasks only. Leave empty for both.',+ }),+ is_blocked: asanaProps.optionalBoolean({+ displayName: 'Blocked',+ description: 'Yes for tasks that wait on incomplete dependencies, No for tasks that do not. Leave empty for both.',+ }),+ is_subtask: asanaProps.optionalBoolean({+ displayName: 'Subtask',+ description: 'Yes for subtasks only, No for top-level tasks only. Leave empty for both.',+ }),+ due_on_after: Property.ShortText({+ displayName: 'Due After',+ description: 'Only tasks due after this date, YYYY-MM-DD.',+ required: false,+ }),+ due_on_before: Property.ShortText({+ displayName: 'Due Before',+ description: 'Only tasks due before this date, YYYY-MM-DD.',+ required: false,+ }),+ modified_at_after: Property.ShortText({+ displayName: 'Modified After',+ description: 'Only tasks modified after this ISO 8601 date-time, which must end in Z or an offset, for example 2026-10-01T00:00:00Z.',+ required: false,+ }),+ created_at_after: Property.ShortText({+ displayName: 'Created After',+ description: 'Only tasks created after this ISO 8601 date-time (ending in Z or an offset). Use it with Sort By Created at, ascending, to fetch the next page.',+ required: false,+ }),+ sort_by: Property.StaticDropdown({+ displayName: 'Sort By',+ description: 'Result order. Leave empty for most recently modified first.',+ required: false,+ options: { disabled: false, options: SORT_OPTIONS },+ }),+ sort_ascending: asanaProps.optionalBoolean({+ displayName: 'Sort Ascending',+ description: 'Yes to sort oldest or smallest first. Leave empty for descending.',+ }),+ limit: asanaProps.limit({ noun: 'tasks' }),+ },+ async run(context) {+ const props = context.propsValue;+ const data = await asanaClient.asanaData<AsanaRecord[]>({+ auth: context.auth,+ method: HttpMethod.GET,+ path: `/workspaces/${asanaUtils.pathSegment(props.workspace)}/tasks/search`,+ operation: 'Search Tasks',+ query: {+ text: asanaUtils.hasValue(props.text) ? props.text : undefined,+ resource_subtype: props.resource_subtype,+ 'assignee.any': joinList(props.assignees),+ 'projects.any': joinList(props.projects),+ 'sections.any': joinList(props.sections),+ 'tags.any': joinList(props.tags),+ completed: props.completed,+ is_blocked: props.is_blocked,+ is_subtask: props.is_subtask,+ 'due_on.after': asanaUtils.hasValue(props.due_on_after) ? asanaUtils.assertDate({ value: String(props.due_on_after), field: 'Due After' }) : undefined,+ 'due_on.before': asanaUtils.hasValue(props.due_on_before) ? asanaUtils.assertDate({ value: String(props.due_on_before), field: 'Due Before' }) : undefined,+ 'modified_at.after': asanaUtils.hasValue(props.modified_at_after) ? asanaUtils.assertDateTime({ value: String(props.modified_at_after), field: 'Modified After' }) : undefined,+ 'created_at.after': asanaUtils.hasValue(props.created_at_after) ? asanaUtils.assertDateTime({ value: String(props.created_at_after), field: 'Created After' }) : undefined,+ sort_by: props.sort_by,+ sort_ascending: props.sort_ascending,+ limit: asanaUtils.assertLimit(props.limit),+ opt_fields: ASANA_FIELDS.taskList,+ },+ });+ return { data: Array.isArray(data) ? data : [] };+ },+});++function joinList(value: unknown[] | undefined | null): string | undefined {+ const items = asanaUtils.toStringArray(value);+ return items.length === 0 ? undefined : items.join(',');+}diff --git a/packages/pieces/community/asana/src/lib/actions/ai/update-allocation.ts b/packages/pieces/community/asana/src/lib/actions/ai/update-allocation.tsnew file mode 100644index 00000000000..c5c46f0f57b--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/update-allocation.ts@@ -0,0 +1,75 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_EFFORT_TYPE_OPTIONS, ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';++export const asanaUpdateAllocationAction = createAction({+ auth: asanaAuth,+ name: 'update_allocation',+ classification: 'WRITE',+ displayName: 'Update Allocation',+ description: 'Change the dates, effort or assignee of an Asana allocation (Advanced Asana plans and up).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Updates only the allocation fields you set (start date, end date, effort, assignee); everything else is left unchanged, and it returns the updated allocation. Effort Unit and Effort Value go together. When you change only one date, make sure the range stays valid against the other date (read it with Get Allocation). Allocations need an Advanced or higher Asana plan. Setting the same values again converges, so it is safe to retry.',+ idempotent: true,+ },+ props: {+ allocation: Property.ShortText({+ displayName: 'Allocation GID',+ description: 'Gid of the allocation to update. Obtain it from List Allocations.',+ required: true,+ }),+ start_date: Property.ShortText({+ displayName: 'Start Date',+ description: 'New first day, YYYY-MM-DD. Leave empty to keep it.',+ required: false,+ }),+ end_date: Property.ShortText({+ displayName: 'End Date',+ description: 'New last day, YYYY-MM-DD. Leave empty to keep it.',+ required: false,+ }),+ effort_type: Property.StaticDropdown({+ displayName: 'Effort Unit',+ description: 'Unit of Effort Value. Set together with Effort Value, or leave both empty to keep the effort.',+ required: false,+ options: { disabled: false, options: ASANA_EFFORT_TYPE_OPTIONS },+ }),+ effort_value: Property.Number({+ displayName: 'Effort Value',+ description: 'New amount of effort in the chosen unit.',+ required: false,+ }),+ assignee: Property.ShortText({+ displayName: 'Assignee GID',+ description: 'Gid of the user or placeholder to move the allocation to. Leave empty to keep it.',+ required: false,+ }),+ },+ async run(context) {+ const props = context.propsValue;+ const startDate = asanaUtils.hasValue(props.start_date) ? asanaUtils.assertDate({ value: String(props.start_date), field: 'Start Date' }) : undefined;+ const endDate = asanaUtils.hasValue(props.end_date) ? asanaUtils.assertDate({ value: String(props.end_date), field: 'End Date' }) : undefined;+ if (startDate !== undefined && endDate !== undefined && endDate < startDate) {+ throw new Error(`End Date (${endDate}) must be on or after Start Date (${startDate}).`);+ }+ const effort = asanaUtils.buildAllocationEffort({ type: props.effort_type, value: props.effort_value });+ const data: Record<string, unknown> = {+ ...(startDate === undefined ? {} : { start_date: startDate }),+ ...(endDate === undefined ? {} : { end_date: endDate }),+ ...(effort === undefined ? {} : { effort }),+ ...(asanaUtils.hasValue(props.assignee) ? { assignee: String(props.assignee).trim() } : {}),+ };+ asanaUtils.assertNotEmpty({ patch: data, fields: 'Start Date, End Date, Effort Unit with Effort Value, or Assignee GID' });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.PUT,+ path: `/allocations/${asanaUtils.pathSegment(props.allocation)}`,+ operation: 'Update Allocation',+ query: { opt_fields: ASANA_FIELDS.allocation },+ data,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/update-custom-field-enum-option.ts b/packages/pieces/community/asana/src/lib/actions/ai/update-custom-field-enum-option.tsnew file mode 100644index 00000000000..e91fd4dea08--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/update-custom-field-enum-option.ts@@ -0,0 +1,56 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';++export const asanaUpdateCustomFieldEnumOptionAction = createAction({+ auth: asanaAuth,+ name: 'update_custom_field_enum_option',+ classification: 'WRITE',+ displayName: 'Update Custom Field Enum Option',+ description: 'Rename, recolor, disable or re-enable an option of an Asana select custom field (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Updates only the option fields you set (name, color, enabled) and returns the option. Setting Enabled to No retires the option: it can no longer be picked, but tasks that already have it keep the value; options can never be deleted. A select field must keep at least one enabled option. Change the order with Reorder Custom Field Enum Option. Needs a paid Asana plan. Setting the same values again converges, so it is safe to retry.',+ idempotent: true,+ },+ props: {+ enum_option: Property.ShortText({+ displayName: 'Option GID',+ description: 'Gid of the option to update. Obtain it from Get Custom Field (enum_options).',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Option Name',+ description: 'New label. Leave empty to keep it.',+ required: false,+ }),+ color: Property.ShortText({+ displayName: 'Color',+ description: 'New Asana option color name, for example red, green, blue or none. Leave empty to keep it.',+ required: false,+ }),+ enabled: asanaProps.optionalBoolean({+ displayName: 'Enabled',+ description: 'Yes to make the option selectable again, No to disable (retire) it. Leave empty to keep the current state.',+ }),+ },+ async run(context) {+ const { enum_option, name, color, enabled } = context.propsValue;+ const data: Record<string, unknown> = {+ ...(asanaUtils.hasValue(name) ? { name } : {}),+ ...(asanaUtils.hasValue(color) ? { color: String(color).trim() } : {}),+ ...(typeof enabled === 'boolean' ? { enabled } : {}),+ };+ asanaUtils.assertNotEmpty({ patch: data, fields: 'Option Name, Color or Enabled' });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.PUT,+ path: `/enum_options/${asanaUtils.pathSegment(enum_option)}`,+ operation: 'Update Custom Field Enum Option',+ query: { opt_fields: ASANA_FIELDS.enumOption },+ data,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/update-custom-field.ts b/packages/pieces/community/asana/src/lib/actions/ai/update-custom-field.tsnew file mode 100644index 00000000000..53cf5fc50be--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/update-custom-field.ts@@ -0,0 +1,100 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import {+ ASANA_CUSTOM_FIELD_FORMAT_OPTIONS,+ ASANA_CUSTOM_LABEL_POSITION_OPTIONS,+ ASANA_FIELDS,+ ASANA_MAX_PRECISION,+ AsanaRecord,+ asanaClient,+ asanaProps,+ asanaUtils,+} from '../../common/client';++export const asanaUpdateCustomFieldAction = createAction({+ auth: asanaAuth,+ name: 'update_custom_field',+ classification: 'WRITE',+ displayName: 'Update Custom Field',+ description: 'Change the name, description, number format or notifications of an Asana custom field (paid Asana plans only).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Updates only the custom field settings you set (name, description, number format, precision, currency, custom label, follower notifications); everything else is left unchanged. The field type can never change, and select options are edited with Create, Update and Reorder Custom Field Enum Option, not here. Locked fields can only be changed by the user who locked them. Needs a paid Asana plan; a free workspace gets a paid-plan error. Setting the same values again converges, so it is safe to retry.',+ idempotent: true,+ },+ props: {+ custom_field: Property.ShortText({+ displayName: 'Custom Field GID',+ description: 'Gid of the custom field to update. Obtain it from List Custom Fields.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Field Name',+ description: 'New name, unique in the workspace. Leave empty to keep it.',+ required: false,+ }),+ description: Property.LongText({+ displayName: 'Description',+ description: 'New plain-text description; replaces the current one. Leave empty to keep it.',+ required: false,+ }),+ precision: Property.Number({+ displayName: 'Decimal Places',+ description: `Number fields only: digits after the decimal point, 0 to ${ASANA_MAX_PRECISION}. Leave empty to keep it.`,+ required: false,+ }),+ format: Property.StaticDropdown({+ displayName: 'Number Format',+ description: 'Number fields only: new display format. Leave empty to keep it.',+ required: false,+ options: { disabled: false, options: ASANA_CUSTOM_FIELD_FORMAT_OPTIONS },+ }),+ currency_code: Property.ShortText({+ displayName: 'Currency Code',+ description: 'ISO 4217 code such as USD, used with the Currency format. Leave empty to keep it.',+ required: false,+ }),+ custom_label: Property.ShortText({+ displayName: 'Custom Label',+ description: 'Unit text used with the Custom label format. Leave empty to keep it.',+ required: false,+ }),+ custom_label_position: Property.StaticDropdown({+ displayName: 'Custom Label Position',+ description: 'Where the custom label goes. Leave empty to keep it.',+ required: false,+ options: { disabled: false, options: ASANA_CUSTOM_LABEL_POSITION_OPTIONS },+ }),+ has_notifications_enabled: asanaProps.optionalBoolean({+ displayName: 'Notify Followers on Change',+ description: 'Yes to notify task followers when this field changes, No to stop those notifications. Leave empty to keep the current setting.',+ }),+ },+ async run(context) {+ const props = context.propsValue;+ const data: Record<string, unknown> = {+ ...(asanaUtils.hasValue(props.name) ? { name: props.name } : {}),+ ...(asanaUtils.hasValue(props.description) ? { description: props.description } : {}),+ ...(asanaUtils.hasValue(props.precision) ? { precision: asanaUtils.assertPrecision(props.precision) } : {}),+ ...(asanaUtils.hasValue(props.format) ? { format: props.format } : {}),+ ...(asanaUtils.hasValue(props.currency_code) ? { currency_code: String(props.currency_code).trim().toUpperCase() } : {}),+ ...(asanaUtils.hasValue(props.custom_label) ? { custom_label: props.custom_label } : {}),+ ...(asanaUtils.hasValue(props.custom_label_position) ? { custom_label_position: props.custom_label_position } : {}),+ ...(typeof props.has_notifications_enabled === 'boolean' ? { has_notifications_enabled: props.has_notifications_enabled } : {}),+ };+ asanaUtils.assertNotEmpty({+ patch: data,+ fields: 'Field Name, Description, Decimal Places, Number Format, Currency Code, Custom Label, Custom Label Position or Notify Followers on Change',+ });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.PUT,+ path: `/custom_fields/${asanaUtils.pathSegment(props.custom_field)}`,+ operation: 'Update Custom Field',+ query: { opt_fields: ASANA_FIELDS.customField },+ data,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/update-team.ts b/packages/pieces/community/asana/src/lib/actions/ai/update-team.tsnew file mode 100644index 00000000000..cf535b1c799--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/update-team.ts@@ -0,0 +1,65 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, ASANA_TEAM_VISIBILITY_OPTIONS, AsanaRecord, asanaClient, asanaProps, asanaUtils } from '../../common/client';+import { asanaTeamOutputSchema } from '../../output-schemas';++export const asanaUpdateTeamAction = createAction({+ auth: asanaAuth,+ name: 'update_team',+ classification: 'WRITE',+ displayName: 'Update Team',+ description: 'Change the name, description, visibility or endorsement of an Asana team.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Updates only the team fields you set (name, description, visibility, endorsed); everything else is left unchanged. Team settings may be limited to team admins. Members are changed with Add User to Team and Remove User from Team. Setting the same values again converges, so it is safe to retry. Visibility "secret" may need a paid plan; on a free plan Asana answers with HTTP 500 instead of a plan error.',+ idempotent: true,+ },+ outputSchema: asanaTeamOutputSchema,+ props: {+ team: Property.ShortText({+ displayName: 'Team GID',+ description: 'Gid of the team to update. Obtain it from List Teams or List User Teams.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Team Name',+ description: 'New team name. Leave empty to keep it.',+ required: false,+ }),+ description: Property.LongText({+ displayName: 'Description',+ description: 'New plain-text description; replaces the current one. Leave empty to keep it.',+ required: false,+ }),+ visibility: Property.StaticDropdown({+ displayName: 'Visibility',+ description: 'New visibility; empty keeps it. Secret may need a paid plan.',+ required: false,+ options: { disabled: false, options: ASANA_TEAM_VISIBILITY_OPTIONS },+ }),+ endorsed: asanaProps.optionalBoolean({+ displayName: 'Endorsed',+ description: 'Yes to mark the team as endorsed, No to remove the endorsement. Leave empty to keep it.',+ }),+ },+ async run(context) {+ const { team, name, description, visibility, endorsed } = context.propsValue;+ const data: Record<string, unknown> = {+ ...(asanaUtils.hasValue(name) ? { name } : {}),+ ...(asanaUtils.hasValue(description) ? { description } : {}),+ ...(asanaUtils.hasValue(visibility) ? { visibility } : {}),+ ...(typeof endorsed === 'boolean' ? { endorsed } : {}),+ };+ asanaUtils.assertNotEmpty({ patch: data, fields: 'Team Name, Description, Visibility or Endorsed' });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.PUT,+ path: `/teams/${asanaUtils.pathSegment(team)}`,+ operation: 'Update Team',+ query: { opt_fields: ASANA_FIELDS.teamFull },+ data,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/actions/ai/update-user.ts b/packages/pieces/community/asana/src/lib/actions/ai/update-user.tsnew file mode 100644index 00000000000..cc02d354af2--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/update-user.ts@@ -0,0 +1,75 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient, asanaUtils } from '../../common/client';+import { asanaWorkspaceUserOutputSchema } from '../../output-schemas';++export const asanaUpdateUserAction = createAction({+ auth: asanaAuth,+ name: 'update_user',+ classification: 'WRITE',+ displayName: 'Update User',+ description: 'Set a user\'s profile custom fields (or your own name) in an Asana workspace (higher Asana plans only).',+ audience: 'ai',+ outputSchema: asanaWorkspaceUserOutputSchema,+ aiMetadata: {+ description:+ 'Updates a user\'s profile in one workspace: values of user-profile custom fields (keyed by custom field gid) and, only when the user is the connected user, their name. Only the fields you set change. Custom field values are text, a number, an enum option gid, or a date as YYYY-MM-DD; find field gids with List Custom Fields. User profile custom fields are a higher-tier Asana feature (likely Enterprise); lower plans get a paid-plan or permission error. Setting the same values again converges, so it is safe to retry.',+ idempotent: true,+ },+ props: {+ workspace: Property.ShortText({+ displayName: 'Workspace GID',+ description: 'Gid of the workspace whose user profile to update. Obtain it from List Workspaces.',+ required: true,+ }),+ user: Property.ShortText({+ displayName: 'User',+ description: 'User to update: "me", an email address or a user gid.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'New display name. Asana only accepts this for the connected user ("me"). Leave empty to keep it.',+ required: false,+ }),+ custom_fields: Property.Object({+ displayName: 'Custom Field Values',+ description: 'Map of custom field gid to new value, for example 1201234567890 = "Berlin office". Leave empty to keep them.',+ required: false,+ }),+ },+ async run(context) {+ const { workspace, user, name, custom_fields } = context.propsValue;+ const customFields = toCustomFieldValues(custom_fields);+ const data: Record<string, unknown> = {+ ...(asanaUtils.hasValue(name) ? { name } : {}),+ ...(Object.keys(customFields).length > 0 ? { custom_fields: customFields } : {}),+ };+ asanaUtils.assertNotEmpty({ patch: data, fields: 'Name or Custom Field Values' });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.PUT,+ path: `/workspaces/${asanaUtils.pathSegment(workspace)}/users/${asanaUtils.pathSegment(user)}`,+ operation: 'Update User',+ query: { opt_fields: ASANA_FIELDS.userInWorkspace },+ data,+ });+ },+});++function toCustomFieldValues(value: Record<string, unknown> | undefined | null): Record<string, string | number> {+ if (value === undefined || value === null) {+ return {};+ }+ return Object.entries(value).reduce<Record<string, string | number>>((acc, [key, raw]) => {+ const gid = key.trim();+ if (gid === '' || raw === undefined || raw === null || raw === '') {+ return acc;+ }+ if (typeof raw !== 'string' && typeof raw !== 'number') {+ throw new Error(`Custom Field Values: the value for ${gid} must be text, a number, an enum option gid or a YYYY-MM-DD date.`);+ }+ return { ...acc, [gid]: raw };+ }, {});+}diff --git a/packages/pieces/community/asana/src/lib/actions/ai/upload-attachment.ts b/packages/pieces/community/asana/src/lib/actions/ai/upload-attachment.tsnew file mode 100644index 00000000000..93b64594acd--- /dev/null+++ b/packages/pieces/community/asana/src/lib/actions/ai/upload-attachment.ts@@ -0,0 +1,99 @@+import { ApFile, createAction, Property } from '@activepieces/pieces-framework';+import { HttpMethod } from '@activepieces/pieces-common';+import FormData from 'form-data';+import { asanaAuth } from '../../auth';+import { ASANA_FIELDS, AsanaRecord, asanaClient } from '../../common/client';+import { asanaAttachmentOutputSchema } from '../../output-schemas';++const MAX_UPLOAD_BYTES = 100 * 1024 * 1024;+const NON_ASCII_PATTERN = /[^\x20-\x7E]/;++function buildForm({+ parent,+ file,+ url,+ name,+}: {+ parent: string;+ file: ApFile | undefined;+ url: string | undefined;+ name: string | undefined;+}): FormData {+ const link = url?.trim() ?? '';+ const label = name?.trim() ?? '';+ if ((file === undefined) === (link === '')) {+ throw new Error('Set exactly one of File or External URL: File uploads the file itself, External URL attaches a link.');+ }+ const form = new FormData();+ form.append('parent', parent);+ if (file !== undefined) {+ if (file.data.length > MAX_UPLOAD_BYTES) {+ throw new Error(`The file is ${file.data.length} bytes; Asana accepts attachments up to 100 MB (${MAX_UPLOAD_BYTES} bytes).`);+ }+ const filename = label === '' ? file.filename : label;+ form.append('file', file.data, {+ filename: NON_ASCII_PATTERN.test(filename) ? encodeURIComponent(filename) : filename,+ });+ return form;+ }+ if (!/^https?:\/\//i.test(link)) {+ throw new Error(`External URL must start with http:// or https://, got "${link}".`);+ }+ if (label === '') {+ throw new Error('Name is required with External URL: Asana needs a display name for the link.');+ }+ form.append('resource_subtype', 'external');+ form.append('url', link);+ form.append('name', label);+ return form;+}++export const asanaUploadAttachmentAction = createAction({+ auth: asanaAuth,+ name: 'upload_attachment',+ classification: 'WRITE',+ displayName: 'Upload Attachment',+ description: 'Upload a file, or attach a link, to an Asana task, project or project brief.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Adds one attachment to a task, a project (its Key resources) or a project brief. Either upload a file (up to 100 MB; files from Dropbox, Box, Vimeo or Google Drive cannot be pulled in by URL, download them first) or attach an external link with a URL and a display name; set exactly one. Returns the new attachment with its gid, host and view/download URLs. Use List Attachments to see what is already attached. Not idempotent: every call creates another attachment, so check List Attachments before retrying.',+ idempotent: false,+ },+ outputSchema: asanaAttachmentOutputSchema,+ props: {+ parent: Property.ShortText({+ displayName: 'Parent GID',+ description:+ 'Gid of the task, project or project brief to attach to. Obtain a task gid from List Project Tasks or Get Task, a project gid from List Projects.',+ required: true,+ }),+ file: Property.File({+ displayName: 'File',+ description: 'The file to upload (up to 100 MB). Leave empty when attaching an External URL.',+ required: false,+ }),+ url: Property.ShortText({+ displayName: 'External URL',+ description: 'An http(s) link to attach instead of a file. Requires Name. Leave empty when uploading a File.',+ required: false,+ }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'Display name of the attachment. Required with External URL; for a File it replaces the file name.',+ required: false,+ }),+ },+ async run(context) {+ const { parent, file, url, name } = context.propsValue;+ const form = buildForm({ parent: parent.trim(), file: file ?? undefined, url, name });+ return asanaClient.asanaData<AsanaRecord>({+ auth: context.auth,+ method: HttpMethod.POST,+ path: '/attachments',+ operation: 'Upload Attachment',+ query: { opt_fields: ASANA_FIELDS.attachment },+ form,+ });+ },+});diff --git a/packages/pieces/community/asana/src/lib/common/client.ts b/packages/pieces/community/asana/src/lib/common/client.tsindex f51b388fe2c..4bba817d789 100644--- a/packages/pieces/community/asana/src/lib/common/client.ts+++ b/packages/pieces/community/asana/src/lib/common/client.ts@@ -5,6 +5,7 @@ import {HttpMethod,} from '@activepieces/pieces-common';import { Property } from '@activepieces/pieces-framework';+import FormData from 'form-data';const BASE_URL = 'https://app.asana.com/api/1.0';const DEFAULT_LIMIT = 50;@@ -12,6 +13,7 @@ const MAX_LIMIT = 100;const MAX_TAG_PAGES = 20;const DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;const DATE_TIME_PATTERN = /^\d{4}-\d{2}-\d{2}T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:Z|[+-](\d{2}):(\d{2}))$/i;+const MAX_PRECISION = 6;const MAX_ERROR_BODY_LENGTH = 300;const GID_PATTERN = /^\d+$/;@@ -88,6 +90,7 @@ async function asanaApi<T>({path,query,data,+ form,operation,}: AsanaRequestParams): Promise<T> {try {@@ -99,7 +102,7 @@ async function asanaApi<T>({token: auth.access_token,},queryParams: toQueryParams(query),- body: data === undefined ? undefined : { data },+ body: form ?? (data === undefined ? undefined : { data }),});return response.body;} catch (error) {@@ -307,6 +310,13 @@ function isInRange({ value, max }: { value: string | undefined; max: number }):return value === undefined || Number(value) <= max;}+function assertPrecision(value: number | undefined | null): number {+ if (typeof value !== 'number' || !Number.isInteger(value) || value < 0 || value > MAX_PRECISION) {+ throw new Error(`Decimal Places must be a whole number from 0 to ${MAX_PRECISION}, got ${value}.`);+ }+ return value;+}+function assertDate({ value, field }: { value: string; field: string }): string {const trimmed = value.trim();if (!isCalendarDate(trimmed)) {@@ -361,6 +371,59 @@ function pathSegment(value: string): string {return encodeURIComponent(value.trim());}+function toGidValuePairs({+ value,+ field,+}: {+ value: unknown[] | undefined | null;+ field: string;+}): { gid: string; value: string }[] {+ if (value === undefined || value === null) {+ return [];+ }+ return value.map((entry, index) => {+ const gid = readStringField({ entry, key: 'gid' });+ const pairValue = readStringField({ entry, key: 'value' });+ if (gid === undefined || pairValue === undefined) {+ throw new Error(`${field} row ${index + 1} needs both a GID and a value.`);+ }+ return { gid, value: pairValue };+ });+}++function buildAllocationEffort({+ type,+ value,+}: {+ type: string | undefined | null;+ value: number | undefined | null;+}): { type: string; value: number } | undefined {+ const hasType = typeof type === 'string' && type !== '';+ const hasNumber = typeof value === 'number';+ if (hasType !== hasNumber) {+ throw new Error('Set Effort Unit and Effort Value together, or leave both empty.');+ }+ if (typeof type !== 'string' || typeof value !== 'number') {+ return undefined;+ }+ if (value < 0) {+ throw new Error(`Effort Value must not be negative, got ${value}.`);+ }+ return { type, value };+}++function readStringField({ entry, key }: { entry: unknown; key: string }): string | undefined {+ if (typeof entry !== 'object' || entry === null || !(key in entry)) {+ return undefined;+ }+ const raw: unknown = Reflect.get(entry, key);+ if (typeof raw !== 'string' && typeof raw !== 'number') {+ return undefined;+ }+ const trimmed = String(raw).trim();+ return trimmed === '' ? undefined : trimmed;+}+function optionalBooleanProp({displayName,description,@@ -430,9 +493,15 @@ export const asanaUtils = {assertDateTime,assertNotBoth,assertNotEmpty,+ assertLimit,pathSegment,+ toGidValuePairs,+ buildAllocationEffort,+ assertPrecision,};+export const ASANA_MAX_PRECISION = MAX_PRECISION;+export const ASANA_COLOR_OPTIONS = ['dark-pink','dark-green',@@ -454,6 +523,31 @@ export const ASANA_COLOR_OPTIONS = ['light-warm-gray',].map((color) => ({ label: color, value: color }));+export const ASANA_TEAM_VISIBILITY_OPTIONS = [+ { label: 'Public to the organization', value: 'public' },+ { label: 'Membership by request', value: 'request_to_join' },+ { label: 'Private (secret)', value: 'secret' },+];++export const ASANA_CUSTOM_FIELD_FORMAT_OPTIONS = [+ { label: 'None', value: 'none' },+ { label: 'Currency', value: 'currency' },+ { label: 'Percentage', value: 'percentage' },+ { label: 'Custom label', value: 'custom' },+ { label: 'Duration', value: 'duration' },+ { label: 'Identifier', value: 'identifier' },+];++export const ASANA_CUSTOM_LABEL_POSITION_OPTIONS = [+ { label: 'Before the value (prefix)', value: 'prefix' },+ { label: 'After the value (suffix)', value: 'suffix' },+];++export const ASANA_EFFORT_TYPE_OPTIONS = [+ { label: 'Hours', value: 'hours' },+ { label: 'Percent of time', value: 'percent' },+];+export const ASANA_FIELDS = {task: 'name,resource_subtype,notes,completed,completed_at,created_at,modified_at,due_on,due_at,start_on,start_at,assignee.name,assignee.email,parent.name,projects.name,memberships.project.name,memberships.section.name,tags.name,followers.name,workspace.name,num_subtasks,permalink_url',taskList: 'name,resource_subtype,completed,completed_at,created_at,modified_at,due_on,due_at,start_on,assignee.name,parent.name,permalink_url',@@ -470,7 +564,28 @@ export const ASANA_FIELDS = {user: 'name,email,workspaces.name',workspace: 'name,is_organization,email_domains',team: 'name,description,visibility,organization.name,permalink_url',+ teamFull: 'name,description,html_description,visibility,endorsed,organization.name,permalink_url',+ userList: 'name,email',+ workspaceMembership: 'user.name,workspace.name,is_active,is_admin,is_guest,is_view_only,created_at',+ teamMembership: 'user.name,team.name,is_admin,is_guest,is_limited_access',+ attachment: 'name,resource_subtype,created_at,size,host,download_url,permanent_url,view_url,connected_to_app,parent.name,parent.resource_subtype',+ accessRequest: 'approval_status,message,requester.name,target',taskCounts: 'num_tasks,num_completed_tasks,num_incomplete_tasks,num_milestones,num_completed_milestones,num_incomplete_milestones',+ customField: 'name,resource_subtype,description,format,precision,currency_code,custom_label,custom_label_position,has_notifications_enabled,is_global_to_workspace,is_formula_field,is_value_read_only,input_restrictions,id_prefix,privacy_setting,default_access_level,asana_created_field,created_by.name,enum_options.name,enum_options.enabled,enum_options.color',+ customFieldList: 'name,resource_subtype,description,format,precision,is_global_to_workspace,enum_options.name,enum_options.enabled,enum_options.color',+ enumOption: 'name,enabled,color',+ projectTemplate: 'name,description,color,public,owner,team.name,requested_dates.name,requested_dates.description,requested_roles.name',+ taskTemplate: 'name,created_at,created_by,project',+ portfolio: 'name,archived,color,created_at,created_by.name,owner.name,workspace.name,start_on,due_on,privacy_setting,default_access_level,current_status_update.title,members.name,permalink_url',+ portfolioList: 'name,archived,color,created_at,owner.name,start_on,due_on,privacy_setting,permalink_url',+ goal: 'name,notes,html_notes,status,start_on,due_on,is_workspace_level,privacy_setting,owner.name,team.name,workspace.name,time_period.display_name,time_period.start_on,time_period.end_on,metric.resource_subtype,metric.unit,metric.precision,metric.currency_code,metric.initial_number_value,metric.target_number_value,metric.current_number_value,metric.current_display_value,metric.progress_source,current_status_update.title,followers.name,num_likes',+ goalList: 'name,status,start_on,due_on,is_workspace_level,owner.name,team.name,time_period.display_name',+ goalRelationship: 'resource_subtype,contribution_weight,supported_goal.name,supporting_resource.name,supporting_resource.resource_subtype',+ timePeriod: 'display_name,period,start_on,end_on,parent.display_name',+ allocation: 'resource_subtype,start_date,end_date,effort.type,effort.value,assignee.name,parent.name,created_by.name',+ timeTrackingEntry: 'duration_minutes,entered_on,created_by.name,attributable_to.name,categories.name',+ customType: 'name,asana_created_type_identifier,status_options.name,status_options.color,status_options.enabled,status_options.completion_state',+ userInWorkspace: 'name,email,custom_fields.name,custom_fields.display_value',};export type AsanaAuth = {@@ -486,6 +601,7 @@ export type AsanaRequestParams = {operation: string;query?: AsanaQuery;data?: Record<string, unknown>;+ form?: FormData;};export type AsanaListParams = {diff --git a/packages/pieces/community/asana/src/lib/output-schemas.ts b/packages/pieces/community/asana/src/lib/output-schemas.tsindex d4da252dff2..2d0f773b042 100644--- a/packages/pieces/community/asana/src/lib/output-schemas.ts+++ b/packages/pieces/community/asana/src/lib/output-schemas.ts@@ -250,6 +250,20 @@ const currentUserFields: OutputSchema['fields'] = [{ key: 'workspaces', label: 'Workspaces', labelKey: 'name', listItems: workspaceRefFields },];+const workspaceUserFields: OutputSchema['fields'] = [+ ...userFields,+ {+ key: 'custom_fields',+ label: 'Profile Custom Fields',+ labelKey: 'name',+ listItems: [+ { key: 'gid', label: 'Custom Field GID' },+ { key: 'name', label: 'Name' },+ { key: 'display_value', label: 'Value' },+ ],+ },+];+const workspaceFields: OutputSchema['fields'] = [{ key: 'gid', label: 'Workspace GID' },{ key: 'name', label: 'Name' },@@ -266,6 +280,77 @@ const teamListItemFields: OutputSchema['fields'] = [{ key: 'permalink_url', label: 'Team URL', format: 'url' },];+const teamFields: OutputSchema['fields'] = [+ ...teamListItemFields,+ { key: 'html_description', label: 'Rich Description', format: 'html' },+ { key: 'endorsed', label: 'Endorsed', format: 'boolean' },+];++const workspaceMembershipFields: OutputSchema['fields'] = [+ { key: 'gid', label: 'Workspace Membership GID' },+ { key: 'user', label: 'User', children: userRefFields },+ { key: 'workspace', label: 'Workspace', children: workspaceRefFields },+ { key: 'is_active', label: 'Active', format: 'boolean' },+ { key: 'is_admin', label: 'Admin', format: 'boolean' },+ { key: 'is_guest', label: 'Guest', format: 'boolean' },+ { key: 'is_view_only', label: 'View Only', format: 'boolean' },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+];++const teamMembershipFields: OutputSchema['fields'] = [+ { key: 'gid', label: 'Team Membership GID' },+ { key: 'user', label: 'User', children: userRefFields },+ { key: 'team', label: 'Team', children: namedRefFields },+ { key: 'is_admin', label: 'Admin', format: 'boolean' },+ { key: 'is_guest', label: 'Guest', format: 'boolean' },+ { key: 'is_limited_access', label: 'Limited Access', format: 'boolean' },+];++const attachmentFields: OutputSchema['fields'] = [+ { key: 'gid', label: 'Attachment GID' },+ { key: 'name', label: 'Name' },+ { key: 'resource_subtype', label: 'Attachment Type' },+ { key: 'host', label: 'Host' },+ { key: 'size', label: 'Size (bytes)', format: 'number' },+ { key: 'view_url', label: 'View URL', format: 'url' },+ { key: 'download_url', label: 'Download URL', format: 'url' },+ { key: 'permanent_url', label: 'Permanent URL', format: 'url' },+ { key: 'connected_to_app', label: 'Connected to App', format: 'boolean' },+ { key: 'parent', label: 'Parent', children: namedRefFields },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+];++const accessRequestFields: OutputSchema['fields'] = [+ { key: 'gid', label: 'Access Request GID' },+ { key: 'approval_status', label: 'Approval Status' },+ { key: 'message', label: 'Message' },+ {+ key: 'target',+ label: 'Target',+ children: [+ { key: 'gid', label: 'Target GID' },+ { key: 'resource_type', label: 'Target Type' },+ ],+ },+ { key: 'requester', label: 'Requester', children: userRefFields },+];++const timePeriodFields: OutputSchema['fields'] = [+ { key: 'gid', label: 'Time Period GID' },+ { key: 'display_name', label: 'Name' },+ { key: 'period', label: 'Period' },+ { key: 'start_on', label: 'Start On', format: 'date' },+ { key: 'end_on', label: 'End On', format: 'date' },+ {+ key: 'parent',+ label: 'Parent Period',+ children: [+ { key: 'gid', label: 'Parent GID' },+ { key: 'display_name', label: 'Parent Name' },+ ],+ },+];+const searchResultFields: OutputSchema['fields'] = [{ key: 'gid', label: 'GID' },{ key: 'name', label: 'Name' },@@ -327,6 +412,10 @@ export const asanaTaskListOutputSchema = listPage({itemFields: taskListItemFields,});+export const asanaTaskSearchOutputSchema: OutputSchema = {+ fields: [{ key: 'data', label: 'Tasks', labelKey: 'name', listItems: taskListItemFields }],+};+export const asanaProjectOutputSchema: OutputSchema = { fields: projectFields };export const asanaProjectListOutputSchema = listPage({@@ -399,6 +488,19 @@ export const asanaMembershipListOutputSchema = listPage({export const asanaCurrentUserOutputSchema: OutputSchema = { fields: currentUserFields };+export const asanaUserOutputSchema: OutputSchema = { fields: userFields };++export const asanaWorkspaceUserOutputSchema: OutputSchema = { fields: workspaceUserFields };++export const asanaUserListOutputSchema = listPage({+ key: 'users',+ label: 'Users',+ labelKey: 'name',+ itemFields: userFields,+});++export const asanaWorkspaceOutputSchema: OutputSchema = { fields: workspaceFields };+export const asanaWorkspaceListOutputSchema = listPage({key: 'workspaces',label: 'Workspaces',@@ -406,6 +508,8 @@ export const asanaWorkspaceListOutputSchema = listPage({itemFields: workspaceFields,});+export const asanaTeamOutputSchema: OutputSchema = { fields: teamFields };+export const asanaTeamListOutputSchema = listPage({key: 'teams',label: 'Teams',@@ -413,6 +517,55 @@ export const asanaTeamListOutputSchema = listPage({itemFields: teamListItemFields,});+export const asanaWorkspaceMembershipOutputSchema: OutputSchema = { fields: workspaceMembershipFields };++export const asanaWorkspaceMembershipListOutputSchema = listPage({+ key: 'workspace memberships',+ label: 'Workspace Memberships',+ labelKey: 'gid',+ itemFields: workspaceMembershipFields,+});++export const asanaTeamMembershipOutputSchema: OutputSchema = { fields: teamMembershipFields };++export const asanaTeamMembershipListOutputSchema = listPage({+ key: 'team memberships',+ label: 'Team Memberships',+ labelKey: 'gid',+ itemFields: teamMembershipFields,+});++export const asanaAttachmentOutputSchema: OutputSchema = { fields: attachmentFields };++export const asanaAttachmentListOutputSchema = listPage({+ key: 'attachments',+ label: 'Attachments',+ labelKey: 'name',+ itemFields: attachmentFields,+});++export const asanaAccessRequestOutputSchema: OutputSchema = { fields: accessRequestFields };++export const asanaAccessRequestListOutputSchema: OutputSchema = {+ fields: [{ key: 'data', label: 'Access Requests', labelKey: 'approval_status', listItems: accessRequestFields }],+};++export const asanaAccessRequestDecisionOutputSchema = confirmation({+ fields: [+ { key: 'access_request_gid', label: 'Access Request GID' },+ { key: 'approval_status', label: 'Approval Status' },+ ],+});++export const asanaTimePeriodOutputSchema: OutputSchema = { fields: timePeriodFields };++export const asanaTimePeriodListOutputSchema = listPage({+ key: 'time periods',+ label: 'Time Periods',+ labelKey: 'display_name',+ itemFields: timePeriodFields,+});+export const asanaSearchWorkspaceObjectsOutputSchema: OutputSchema = {fields: [{ key: 'data', label: 'Results', labelKey: 'name', listItems: searchResultFields }],};@@ -469,6 +622,60 @@ export const asanaDeleteProjectBriefOutputSchema = confirmation({fields: [{ key: 'project_brief_gid', label: 'Deleted Project Brief GID' }],});+export const asanaDeleteAttachmentOutputSchema = confirmation({+ fields: [{ key: 'attachment_gid', label: 'Deleted Attachment GID' }],+});++export const asanaFavoriteListOutputSchema = listPage({+ key: 'favorites',+ label: 'Favorites',+ labelKey: 'name',+ itemFields: namedRefFields,+});++export const asanaAddTaskDependenciesOutputSchema = confirmation({+ fields: [+ { key: 'task_gid', label: 'Task GID' },+ { key: 'dependency_gids', label: 'Added Dependency GIDs' },+ ],+});++export const asanaRemoveTaskDependenciesOutputSchema = confirmation({+ fields: [+ { key: 'task_gid', label: 'Task GID' },+ { key: 'removed_dependency_gids', label: 'Removed Dependency GIDs' },+ ],+});++export const asanaPortfolioItemChangeOutputSchema = confirmation({+ fields: [+ { key: 'portfolio_gid', label: 'Portfolio GID' },+ { key: 'item_gid', label: 'Item GID' },+ ],+});++export const asanaRemoveUserFromTeamOutputSchema = confirmation({+ fields: [+ { key: 'team_gid', label: 'Team GID' },+ { key: 'user', label: 'Removed User' },+ ],+});++export const asanaRemoveUserFromWorkspaceOutputSchema = confirmation({+ fields: [+ { key: 'workspace_gid', label: 'Workspace GID' },+ { key: 'user', label: 'Removed User' },+ ],+});+export const asanaDeleteMembershipOutputSchema = confirmation({fields: [{ key: 'membership_gid', label: 'Deleted Membership GID' }],});++export const asanaDeleteAllocationOutputSchema = confirmation({+ fields: [{ key: 'allocation_gid', label: 'Deleted Allocation GID' }],+});++export const asanaDeleteCustomFieldOutputSchema = confirmation({+ fields: [{ key: 'custom_field_gid', label: 'Deleted Custom Field GID' }],+});