Skip to content

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

feat(confluence): add AI actions and output schemas (#16649)

Kishan Parmar37f16f0247d5
diff --git a/bun.lock b/bun.lock
index 076864b26d4..f52360309ea 100644
--- a/bun.lock
+++ b/bun.lock
@@ -2183,7 +2183,7 @@
},
"packages/pieces/community/confluence": {
"name": "@activepieces/piece-confluence",
- "version": "0.3.2",
+ "version": "0.4.0",
"dependencies": {
"@activepieces/core-piece-types": "workspace:*",
"@activepieces/core-utils": "workspace:*",
diff --git a/packages/pieces/community/confluence/package.json b/packages/pieces/community/confluence/package.json
index 53b6d2db52d..6eb234cdb55 100644
--- a/packages/pieces/community/confluence/package.json
+++ b/packages/pieces/community/confluence/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-confluence",
- "version": "0.3.2",
+ "version": "0.4.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"dependencies": {
diff --git a/packages/pieces/community/confluence/src/i18n/translation.json b/packages/pieces/community/confluence/src/i18n/translation.json
index 4a80c176edd..3b59d17206f 100644
--- a/packages/pieces/community/confluence/src/i18n/translation.json
+++ b/packages/pieces/community/confluence/src/i18n/translation.json
@@ -26,6 +26,102 @@
"Remove Label from Page": "Remove Label from Page",
"Find User": "Find User",
"List Spaces": "List Spaces",
+ "Add Labels": "Add Labels",
+ "Add Space Labels": "Add Space Labels",
+ "Archive Pages": "Archive Pages",
+ "Copy Page": "Copy Page",
+ "Create Blog Post Property": "Create Blog Post Property",
+ "Create Blog Post": "Create Blog Post",
+ "Create Folder": "Create Folder",
+ "Create Footer Comment": "Create Footer Comment",
+ "Create Inline Comment": "Create Inline Comment",
+ "Create Page Property": "Create Page Property",
+ "Create Space Property": "Create Space Property",
+ "Create Space": "Create Space",
+ "Create Whiteboard Property": "Create Whiteboard Property",
+ "Create Whiteboard": "Create Whiteboard",
+ "Delete Attachment": "Delete Attachment",
+ "Delete Blog Post Property": "Delete Blog Post Property",
+ "Delete Blog Post": "Delete Blog Post",
+ "Delete Folder": "Delete Folder",
+ "Delete Footer Comment": "Delete Footer Comment",
+ "Delete Inline Comment": "Delete Inline Comment",
+ "Delete Page Property": "Delete Page Property",
+ "Delete Space Property": "Delete Space Property",
+ "Delete Space": "Delete Space",
+ "Delete Whiteboard Property": "Delete Whiteboard Property",
+ "Delete Whiteboard": "Delete Whiteboard",
+ "Get Attachment": "Get Attachment",
+ "Get Blog Post Like Count": "Get Blog Post Like Count",
+ "Get Blog Post Version": "Get Blog Post Version",
+ "Get Blog Post": "Get Blog Post",
+ "Get Content Restrictions": "Get Content Restrictions",
+ "Get Current User": "Get Current User",
+ "Get Folder": "Get Folder",
+ "Get Footer Comment": "Get Footer Comment",
+ "Get Inline Comment": "Get Inline Comment",
+ "Get Label": "Get Label",
+ "Get Long Task Status": "Get Long Task Status",
+ "Get Page Like Count": "Get Page Like Count",
+ "Get Page Version": "Get Page Version",
+ "Get Page Viewers": "Get Page Viewers",
+ "Get Page Views": "Get Page Views",
+ "Get Page": "Get Page",
+ "Get Space": "Get Space",
+ "Get Task": "Get Task",
+ "Get Template": "Get Template",
+ "Get User": "Get User",
+ "Get Whiteboard": "Get Whiteboard",
+ "List Attachment Comments": "List Attachment Comments",
+ "List Attachment Labels": "List Attachment Labels",
+ "List Audit Records": "List Audit Records",
+ "List Blog Post Attachments": "List Blog Post Attachments",
+ "List Blog Post Footer Comments": "List Blog Post Footer Comments",
+ "List Blog Post Inline Comments": "List Blog Post Inline Comments",
+ "List Blog Post Labels": "List Blog Post Labels",
+ "List Blog Post Permitted Operations": "List Blog Post Permitted Operations",
+ "List Blog Post Properties": "List Blog Post Properties",
+ "List Blog Post Versions": "List Blog Post Versions",
+ "List Blog Posts for Label": "List Blog Posts for Label",
+ "List Blog Posts": "List Blog Posts",
+ "List Child Content": "List Child Content",
+ "List Folder Children": "List Folder Children",
+ "List Footer Comment Replies": "List Footer Comment Replies",
+ "List Group Members": "List Group Members",
+ "List Groups": "List Groups",
+ "List Inline Comment Replies": "List Inline Comment Replies",
+ "List Labels": "List Labels",
+ "List Page Ancestors": "List Page Ancestors",
+ "List Page Attachments": "List Page Attachments",
+ "List Page Descendants": "List Page Descendants",
+ "List Page Footer Comments": "List Page Footer Comments",
+ "List Page Inline Comments": "List Page Inline Comments",
+ "List Page Labels": "List Page Labels",
+ "List Page Permitted Operations": "List Page Permitted Operations",
+ "List Page Properties": "List Page Properties",
+ "List Page Versions": "List Page Versions",
+ "List Pages for Label": "List Pages for Label",
+ "List Pages": "List Pages",
+ "List Space Content Labels": "List Space Content Labels",
+ "List Space Labels": "List Space Labels",
+ "List Space Properties": "List Space Properties",
+ "List Tasks": "List Tasks",
+ "List Templates": "List Templates",
+ "List Whiteboard Properties": "List Whiteboard Properties",
+ "Remove Label": "Remove Label",
+ "Remove Space Label": "Remove Space Label",
+ "Restore Page Version": "Restore Page Version",
+ "Search Content": "Search Content",
+ "Update Blog Post Property": "Update Blog Post Property",
+ "Update Blog Post": "Update Blog Post",
+ "Update Footer Comment": "Update Footer Comment",
+ "Update Inline Comment": "Update Inline Comment",
+ "Update Page Property": "Update Page Property",
+ "Update Page Title": "Update Page Title",
+ "Update Space Property": "Update Space Property",
+ "Update Space": "Update Space",
+ "Update Task": "Update Task",
+ "Update Whiteboard Property": "Update Whiteboard Property",
"Custom API Call": "Custom API Call",
"Get page content and optionally all its descendants": "Get page content and optionally all its descendants",
"Fetches a page by its Confluence web URL (extracts the page ID automatically).": "Fetches a page by its Confluence web URL (extracts the page ID automatically).",
@@ -47,6 +143,108 @@
"Removes a label from a page.": "Removes a label from a page.",
"Looks up Confluence users by name, email, or keyword.": "Looks up Confluence users by name, email, or keyword.",
"Lists all spaces the authenticated user can access.": "Lists all spaces the authenticated user can access.",
+ "Adds labels to a page, blog post or attachment.": "Adds labels to a page, blog post or attachment.",
+ "Adds labels to a space.": "Adds labels to a space.",
+ "Archives one or more pages.": "Archives one or more pages.",
+ "Copies a page to a space, under a parent page, or over an existing page.": "Copies a page to a space, under a parent page, or over an existing page.",
+ "Stores a new content property on a blog post.": "Stores a new content property on a blog post.",
+ "Creates a blog post in a space.": "Creates a blog post in a space.",
+ "Creates a folder in a space.": "Creates a folder in a space.",
+ "Adds a footer comment to a page, blog post or attachment.": "Adds a footer comment to a page, blog post or attachment.",
+ "Adds an inline comment on highlighted text, or replies to one.": "Adds an inline comment on highlighted text, or replies to one.",
+ "Stores a new content property on a page.": "Stores a new content property on a page.",
+ "Creates a page in a space.": "Creates a page in a space.",
+ "Stores a new content property on a space.": "Stores a new content property on a space.",
+ "Creates a space, public or private.": "Creates a space, public or private.",
+ "Stores a new content property on a whiteboard.": "Stores a new content property on a whiteboard.",
+ "Creates a whiteboard in a space.": "Creates a whiteboard in a space.",
+ "Moves an attachment to the trash, or purges it.": "Moves an attachment to the trash, or purges it.",
+ "Deletes a content property from a blog post.": "Deletes a content property from a blog post.",
+ "Moves a blog post to the trash, or purges it.": "Moves a blog post to the trash, or purges it.",
+ "Moves a folder to the trash.": "Moves a folder to the trash.",
+ "Permanently deletes a footer comment.": "Permanently deletes a footer comment.",
+ "Permanently deletes a inline comment.": "Permanently deletes a inline comment.",
+ "Deletes a content property from a page.": "Deletes a content property from a page.",
+ "Moves a page to the trash, or purges it.": "Moves a page to the trash, or purges it.",
+ "Deletes a content property from a space.": "Deletes a content property from a space.",
+ "Starts deleting a space and everything in it.": "Starts deleting a space and everything in it.",
+ "Deletes a content property from a whiteboard.": "Deletes a content property from a whiteboard.",
+ "Moves a whiteboard to the trash.": "Moves a whiteboard to the trash.",
+ "Gets the details of an attachment.": "Gets the details of an attachment.",
+ "Gets how many likes a blog post has.": "Gets how many likes a blog post has.",
+ "Gets the details of one version of a blog post.": "Gets the details of one version of a blog post.",
+ "Gets a blog post by ID, with its body.": "Gets a blog post by ID, with its body.",
+ "Gets who may view or edit a page or blog post.": "Gets who may view or edit a page or blog post.",
+ "Gets the connected user.": "Gets the connected user.",
+ "Gets a folder by ID.": "Gets a folder by ID.",
+ "Gets a footer comment by ID.": "Gets a footer comment by ID.",
+ "Gets a inline comment by ID.": "Gets a inline comment by ID.",
+ "Looks up a label by name, with the content that uses it.": "Looks up a label by name, with the content that uses it.",
+ "Gets the status of a long-running task.": "Gets the status of a long-running task.",
+ "Gets how many likes a page has.": "Gets how many likes a page has.",
+ "Gets the details of one version of a page.": "Gets the details of one version of a page.",
+ "Gets the number of distinct viewers of a page or blog post.": "Gets the number of distinct viewers of a page or blog post.",
+ "Gets the number of total views of a page or blog post.": "Gets the number of total views of a page or blog post.",
+ "Gets a page by ID, with its body.": "Gets a page by ID, with its body.",
+ "Gets a space by its numeric ID.": "Gets a space by its numeric ID.",
+ "Gets an inline task by ID.": "Gets an inline task by ID.",
+ "Gets a page template, with its body.": "Gets a page template, with its body.",
+ "Gets a user by account ID.": "Gets a user by account ID.",
+ "Gets a whiteboard by ID.": "Gets a whiteboard by ID.",
+ "Lists the comments on an attachment.": "Lists the comments on an attachment.",
+ "Lists the labels on an attachment.": "Lists the labels on an attachment.",
+ "Lists site audit records, optionally by date range or text.": "Lists site audit records, optionally by date range or text.",
+ "Lists the attachments of a blog post.": "Lists the attachments of a blog post.",
+ "Lists the footer on a blog post.": "Lists the footer on a blog post.",
+ "Lists the inline comments on a blog post.": "Lists the inline comments on a blog post.",
+ "Lists the labels on a blog post.": "Lists the labels on a blog post.",
+ "Lists what the connected user may do on a blog post.": "Lists what the connected user may do on a blog post.",
+ "Lists the content properties stored on a blog post.": "Lists the content properties stored on a blog post.",
+ "Lists the version history of a blog post.": "Lists the version history of a blog post.",
+ "Lists the blog posts that carry a label.": "Lists the blog posts that carry a label.",
+ "Lists blog posts, optionally filtered by space, title or status.": "Lists blog posts, optionally filtered by space, title or status.",
+ "Lists the direct children of a page.": "Lists the direct children of a page.",
+ "Lists the direct children of a folder.": "Lists the direct children of a folder.",
+ "Lists the replies to a footer comment.": "Lists the replies to a footer comment.",
+ "Lists the members of a group.": "Lists the members of a group.",
+ "Lists the user groups on the site.": "Lists the user groups on the site.",
+ "Lists the replies to a inline comment.": "Lists the replies to a inline comment.",
+ "Lists the labels used on the site.": "Lists the labels used on the site.",
+ "Lists the ancestors of a page, from the top of the tree down.": "Lists the ancestors of a page, from the top of the tree down.",
+ "Lists the attachments of a page.": "Lists the attachments of a page.",
+ "Lists all content below a page, up to a depth.": "Lists all content below a page, up to a depth.",
+ "Lists the footer comments on a page.": "Lists the footer comments on a page.",
+ "Lists the inline comments on a page.": "Lists the inline comments on a page.",
+ "Lists the labels on a page.": "Lists the labels on a page.",
+ "Lists what the connected user may do on a page.": "Lists what the connected user may do on a page.",
+ "Lists the content properties stored on a page.": "Lists the content properties stored on a page.",
+ "Lists the version history of a page.": "Lists the version history of a page.",
+ "Lists the pages that carry a label.": "Lists the pages that carry a label.",
+ "Lists pages, optionally filtered by space, title or status.": "Lists pages, optionally filtered by space, title or status.",
+ "Lists the labels used on content in a space.": "Lists the labels used on content in a space.",
+ "Lists the labels on a space.": "Lists the labels on a space.",
+ "Lists the content properties stored on a space.": "Lists the content properties stored on a space.",
+ "Lists spaces, optionally filtered by key, type, status or label.": "Lists spaces, optionally filtered by key, type, status or label.",
+ "Lists inline tasks, filtered by status, space, page or assignee.": "Lists inline tasks, filtered by status, space, page or assignee.",
+ "Lists page templates, globally or in a space.": "Lists page templates, globally or in a space.",
+ "Lists the content properties stored on a whiteboard.": "Lists the content properties stored on a whiteboard.",
+ "Moves a page relative to a target page.": "Moves a page relative to a target page.",
+ "Removes a label from a page, blog post or attachment.": "Removes a label from a page, blog post or attachment.",
+ "Removes a label from a space.": "Removes a label from a space.",
+ "Restores an earlier version of a page as a new version.": "Restores an earlier version of a page as a new version.",
+ "Searches content with CQL and returns matches with excerpts.": "Searches content with CQL and returns matches with excerpts.",
+ "Replaces the value of a content property on a blog post.": "Replaces the value of a content property on a blog post.",
+ "Updates the title, body or status of a blog post.": "Updates the title, body or status of a blog post.",
+ "Replaces the body of a footer comment.": "Replaces the body of a footer comment.",
+ "Changes the body of an inline comment, or resolves or reopens it.": "Changes the body of an inline comment, or resolves or reopens it.",
+ "Replaces the value of a content property on a page.": "Replaces the value of a content property on a page.",
+ "Renames a page.": "Renames a page.",
+ "Updates the title, body, status or parent of a page.": "Updates the title, body, status or parent of a page.",
+ "Replaces the value of a content property on a space.": "Replaces the value of a content property on a space.",
+ "Updates the name, description, homepage or status of a space.": "Updates the name, description, homepage or status of a space.",
+ "Marks an inline task complete or incomplete.": "Marks an inline task complete or incomplete.",
+ "Replaces the value of a content property on a whiteboard.": "Replaces the value of a content property on a whiteboard.",
+ "Uploads a file as an attachment to a page or blog post.": "Uploads a file as an attachment to a page or blog post.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Page ID": "Page ID",
"Include Descendants ?": "Include Descendants ?",
@@ -83,6 +281,70 @@
"Keyword": "Keyword",
"Limit": "Limit",
"Type": "Type",
+ "Content ID": "Content ID",
+ "Space Key": "Space Key",
+ "Page IDs": "Page IDs",
+ "Destination Type": "Destination Type",
+ "Destination": "Destination",
+ "New Title": "New Title",
+ "Copy Attachments": "Copy Attachments",
+ "Copy Labels": "Copy Labels",
+ "Copy Permissions": "Copy Permissions",
+ "Copy Properties": "Copy Properties",
+ "Blog Post ID": "Blog Post ID",
+ "Property Key": "Property Key",
+ "Property Value": "Property Value",
+ "Space ID": "Space ID",
+ "Private": "Private",
+ "Parent ID": "Parent ID",
+ "Text Selection": "Text Selection",
+ "Match Count": "Match Count",
+ "Match Index": "Match Index",
+ "Parent Page ID": "Parent Page ID",
+ "Name": "Name",
+ "Key": "Key",
+ "Description": "Description",
+ "Whiteboard ID": "Whiteboard ID",
+ "Template Key": "Template Key",
+ "Purge": "Purge",
+ "Property ID": "Property ID",
+ "Draft": "Draft",
+ "Folder ID": "Folder ID",
+ "Comment ID": "Comment ID",
+ "Include Labels": "Include Labels",
+ "Include Versions": "Include Versions",
+ "Version Number": "Version Number",
+ "Get Draft": "Get Draft",
+ "Version": "Version",
+ "Include Properties": "Include Properties",
+ "Content Type": "Content Type",
+ "Start": "Start",
+ "Task ID": "Task ID",
+ "From Date": "From Date",
+ "Template ID": "Template ID",
+ "Account ID": "Account ID",
+ "Sort": "Sort",
+ "Cursor": "Cursor",
+ "Start Date": "Start Date",
+ "End Date": "End Date",
+ "Search": "Search",
+ "Filename": "Filename",
+ "Media Type": "Media Type",
+ "Resolution Status": "Resolution Status",
+ "Label ID": "Label ID",
+ "Group ID": "Group ID",
+ "Depth": "Depth",
+ "Space Keys": "Space Keys",
+ "Assigned To": "Assigned To",
+ "Created By": "Created By",
+ "Position": "Position",
+ "Message": "Message",
+ "Restore Title": "Restore Title",
+ "Include Archived Spaces": "Include Archived Spaces",
+ "Version Message": "Version Message",
+ "Resolved": "Resolved",
+ "Homepage ID": "Homepage ID",
+ "Page or Blog Post ID": "Page or Blog Post ID",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
@@ -112,6 +374,119 @@
"Label names to add (one per row).": "Label names to add (one per row).",
"Label name to remove.": "Label name to remove.",
"Username, email, or display name to search for.": "Username, email, or display name to search for.",
+ "ID of the page, blog post or attachment, from List Pages, List Blog Posts or List Page Attachments.": "ID of the page, blog post or attachment, from List Pages, List Blog Posts or List Page Attachments.",
+ "Label names to add, lowercase without spaces, e.g. \"release-notes\".": "Label names to add, lowercase without spaces, e.g. \"release-notes\".",
+ "Label prefix. Defaults to global.": "Label prefix. Defaults to global.",
+ "Space key such as \"DOCS\" (not the numeric ID), from List Spaces or Get Space.": "Space key such as \"DOCS\" (not the numeric ID), from List Spaces or Get Space.",
+ "Numeric IDs of the pages to archive, from List Pages.": "Numeric IDs of the pages to archive, from List Pages.",
+ "Numeric page ID, from List Pages, Search Content or the page URL.": "Numeric page ID, from List Pages, Search Content or the page URL.",
+ "Parent or existing page ID for page destinations; space key (e.g. \"DOCS\") for a space.": "Parent or existing page ID for page destinations; space key (e.g. \"DOCS\") for a space.",
+ "Title of the copy. Needed when copying into the same space, where titles must be unique.": "Title of the copy. Needed when copying into the same space, where titles must be unique.",
+ "Numeric blog post ID, from List Blog Posts or Search Content.": "Numeric blog post ID, from List Blog Posts or Search Content.",
+ "Key of the content property.": "Key of the content property.",
+ "JSON object or array to store under the key.": "JSON object or array to store under the key.",
+ "Numeric space ID (not the space key), from List Spaces or Get Space.": "Numeric space ID (not the space key), from List Spaces or Get Space.",
+ "Content in the selected body format. Storage format is Confluence XHTML, e.g. \"<p>Hello</p>\".": "Content in the selected body format. Storage format is Confluence XHTML, e.g. \"<p>Hello</p>\".",
+ "Format of Body. Defaults to storage (XHTML).": "Format of Body. Defaults to storage (XHTML).",
+ "Published (current) or draft. Defaults to published.": "Published (current) or draft. Defaults to published.",
+ "Restrict the blog post so only you can view and edit it.": "Restrict the blog post so only you can view and edit it.",
+ "ID of the page, folder or whiteboard to create it under. Leave empty for the space root.": "ID of the page, folder or whiteboard to create it under. Leave empty for the space root.",
+ "Page to comment on, from List Pages.": "Page to comment on, from List Pages.",
+ "Blog post to comment on, from List Blog Posts.": "Blog post to comment on, from List Blog Posts.",
+ "Attachment to comment on.": "Attachment to comment on.",
+ "Inline comment to reply to, from List Page Inline Comments. Set only this for a reply.": "Inline comment to reply to, from List Page Inline Comments. Set only this for a reply.",
+ "Exact text in the page body to highlight. Required for a new (non-reply) comment.": "Exact text in the page body to highlight. Required for a new (non-reply) comment.",
+ "How many times Text Selection appears in the body. Defaults to 1.": "How many times Text Selection appears in the body. Defaults to 1.",
+ "Zero-based occurrence of Text Selection to highlight. Defaults to 0 (the first).": "Zero-based occurrence of Text Selection to highlight. Defaults to 0 (the first).",
+ "Page title. Must be unique within the space for published pages.": "Page title. Must be unique within the space for published pages.",
+ "Page to nest the new page under. Leave empty to create it under the space homepage.": "Page to nest the new page under. Leave empty to create it under the space homepage.",
+ "Restrict the page so only you can view and edit it.": "Restrict the page so only you can view and edit it.",
+ "Unique space key, uppercase letters and digits, e.g. \"ENG\". Generated from the name if empty.": "Unique space key, uppercase letters and digits, e.g. \"ENG\". Generated from the name if empty.",
+ "Plain-text description.": "Plain-text description.",
+ "Create a private space visible only to you.": "Create a private space visible only to you.",
+ "Numeric whiteboard ID, from Create Whiteboard or List Child Content.": "Numeric whiteboard ID, from Create Whiteboard or List Child Content.",
+ "Built-in whiteboard template, e.g. \"4ls-retro\", \"daily-sync\" or \"concept-map\". Leave empty for a blank board.": "Built-in whiteboard template, e.g. \"4ls-retro\", \"daily-sync\" or \"concept-map\". Leave empty for a blank board.",
+ "Restrict the whiteboard so only you can view and edit it.": "Restrict the whiteboard so only you can view and edit it.",
+ "Attachment ID starting with \"att\", from List Page Attachments or Upload Attachment.": "Attachment ID starting with \"att\", from List Page Attachments or Upload Attachment.",
+ "Permanently delete an attachment that is already in the trash. Cannot be undone.": "Permanently delete an attachment that is already in the trash. Cannot be undone.",
+ "Numeric content property ID, from the matching list or create property action.": "Numeric content property ID, from the matching list or create property action.",
+ "Permanently delete a blog post that is already in the trash. Cannot be undone.": "Permanently delete a blog post that is already in the trash. Cannot be undone.",
+ "Delete the unpublished draft of the blog post.": "Delete the unpublished draft of the blog post.",
+ "Numeric folder ID, from Create Folder or List Child Content.": "Numeric folder ID, from Create Folder or List Child Content.",
+ "Numeric comment ID, from a comment list or create action.": "Numeric comment ID, from a comment list or create action.",
+ "Permanently delete a page that is already in the trash. Cannot be undone.": "Permanently delete a page that is already in the trash. Cannot be undone.",
+ "Delete the unpublished draft of the page.": "Delete the unpublished draft of the page.",
+ "Version number, from the matching list versions action.": "Version number, from the matching list versions action.",
+ "Body representation to return. Defaults to storage (XHTML).": "Body representation to return. Defaults to storage (XHTML).",
+ "Return the unpublished draft instead of the published version.": "Return the unpublished draft instead of the published version.",
+ "Return this historical version number instead of the latest.": "Return this historical version number instead of the latest.",
+ "Numeric ID of the page or blog post, from List Pages or List Blog Posts.": "Numeric ID of the page or blog post, from List Pages or List Blog Posts.",
+ "Label name, e.g. \"release-notes\".": "Label name, e.g. \"release-notes\".",
+ "Only return content of this type.": "Only return content of this type.",
+ "Offset into the associated content. Defaults to 0.": "Offset into the associated content. Defaults to 0.",
+ "Maximum associated content items to return (1-200). Defaults to 25.": "Maximum associated content items to return (1-200). Defaults to 25.",
+ "Long task ID returned by Archive Pages or Delete Space.": "Long task ID returned by Archive Pages or Delete Space.",
+ "Count from this date, in ISO 8601 format (e.g. 2026-01-01). Leave empty for all time.": "Count from this date, in ISO 8601 format (e.g. 2026-01-01). Leave empty for all time.",
+ "Return the unpublished draft of the page instead of the published version.": "Return the unpublished draft of the page instead of the published version.",
+ "Numeric task ID, from List Tasks.": "Numeric task ID, from List Tasks.",
+ "Template ID, from List Templates.": "Template ID, from List Templates.",
+ "Atlassian account ID, e.g. from a page authorId or Find User.": "Atlassian account ID, e.g. from a page authorId or Find User.",
+ "Body representation to include in the response. Leave empty to omit the body.": "Body representation to include in the response. Leave empty to omit the body.",
+ "Maximum number of items to return (1-250). Defaults to 25.": "Maximum number of items to return (1-250). Defaults to 25.",
+ "nextCursor from the previous call with the same filters, to get the next page.": "nextCursor from the previous call with the same filters, to get the next page.",
+ "Earliest record, as epoch milliseconds or ISO 8601 (e.g. 2026-01-01T00:00:00Z).": "Earliest record, as epoch milliseconds or ISO 8601 (e.g. 2026-01-01T00:00:00Z).",
+ "Latest record, as epoch milliseconds or ISO 8601.": "Latest record, as epoch milliseconds or ISO 8601.",
+ "Only records whose summary, author or affected object contains this text.": "Only records whose summary, author or affected object contains this text.",
+ "Offset of the first item (0-based). Defaults to 0.": "Offset of the first item (0-based). Defaults to 0.",
+ "Maximum number of items to return. Defaults to 25.": "Maximum number of items to return. Defaults to 25.",
+ "Only attachments with this filename.": "Only attachments with this filename.",
+ "Only attachments of this media type, e.g. image/png.": "Only attachments of this media type, e.g. image/png.",
+ "Only comments with this resolution status.": "Only comments with this resolution status.",
+ "Only labels with this prefix.": "Only labels with this prefix.",
+ "Only the property with this key.": "Only the property with this key.",
+ "Numeric label ID, from Get Label or List Labels.": "Numeric label ID, from Get Label or List Labels.",
+ "Only content in this space. Numeric space ID from List Spaces.": "Only content in this space. Numeric space ID from List Spaces.",
+ "Only blog posts in this space. Numeric space ID from List Spaces; several IDs may be comma-separated.": "Only blog posts in this space. Numeric space ID from List Spaces; several IDs may be comma-separated.",
+ "Only blog posts with exactly this title.": "Only blog posts with exactly this title.",
+ "Only blog posts with this status. Defaults to current.": "Only blog posts with this status. Defaults to current.",
+ "Group ID, from List Groups.": "Group ID, from List Groups.",
+ "How many levels below the page to include (1-5). Defaults to 5.": "How many levels below the page to include (1-5). Defaults to 5.",
+ "Only pages in this space. Numeric space ID from List Spaces; several IDs may be comma-separated.": "Only pages in this space. Numeric space ID from List Spaces; several IDs may be comma-separated.",
+ "Only pages with exactly this title.": "Only pages with exactly this title.",
+ "Only pages with this status. Defaults to current and archived.": "Only pages with this status. Defaults to current and archived.",
+ "Only these space keys, comma-separated, e.g. \"DOCS,ENG\".": "Only these space keys, comma-separated, e.g. \"DOCS,ENG\".",
+ "Only spaces with these labels, comma-separated.": "Only spaces with these labels, comma-separated.",
+ "Only tasks in this space. Numeric space ID from List Spaces.": "Only tasks in this space. Numeric space ID from List Spaces.",
+ "Only tasks on this page.": "Only tasks on this page.",
+ "Only tasks assigned to this account ID, from Get Current User or Find User.": "Only tasks assigned to this account ID, from Get Current User or Find User.",
+ "Only tasks created by this account ID.": "Only tasks created by this account ID.",
+ "Space key (not ID) whose templates to list, from Get Space. Leave empty for global templates.": "Space key (not ID) whose templates to list, from Get Space. Leave empty for global templates.",
+ "Where to put the page relative to the target page.": "Where to put the page relative to the target page.",
+ "Page to move relative to, from List Pages.": "Page to move relative to, from List Pages.",
+ "Name of the label to remove.": "Name of the label to remove.",
+ "Prefix of the label to remove.": "Prefix of the label to remove.",
+ "Note saved with the new version, e.g. \"Reverted to version 3\".": "Note saved with the new version, e.g. \"Reverted to version 3\".",
+ "Also restore the title from that version.": "Also restore the title from that version.",
+ "Confluence Query Language query, e.g. type = page AND space = \"DOCS\" AND text ~ \"release\".": "Confluence Query Language query, e.g. type = page AND space = \"DOCS\" AND text ~ \"release\".",
+ "New JSON object or array; replaces the current value.": "New JSON object or array; replaces the current value.",
+ "New key. Leave empty to keep the current key.": "New key. Leave empty to keep the current key.",
+ "New title. Leave empty to keep the current one.": "New title. Leave empty to keep the current one.",
+ "New body in the selected format; replaces the whole body. Leave empty to keep the current one.": "New body in the selected format; replaces the whole body. Leave empty to keep the current one.",
+ "Published (current) or draft. Leave empty to keep the current status.": "Published (current) or draft. Leave empty to keep the current status.",
+ "Optional note describing this change.": "Optional note describing this change.",
+ "New comment body; replaces the whole body.": "New comment body; replaces the whole body.",
+ "New comment body; replaces the whole body. Leave empty to keep the current one.": "New comment body; replaces the whole body. Leave empty to keep the current one.",
+ "Resolve or reopen the comment. Leave empty to keep its state.": "Resolve or reopen the comment. Leave empty to keep its state.",
+ "New page title.": "New page title.",
+ "Whether the page is published (current) or a draft. Defaults to current.": "Whether the page is published (current) or a draft. Defaults to current.",
+ "Move the page under this parent page. Leave empty to keep the current parent.": "Move the page under this parent page. Leave empty to keep the current parent.",
+ "New name. Leave empty to keep it.": "New name. Leave empty to keep it.",
+ "New plain-text description. Leave empty to keep it.": "New plain-text description. Leave empty to keep it.",
+ "Page to make the space homepage. Leave empty to keep it.": "Page to make the space homepage. Leave empty to keep it.",
+ "Archive or restore the space. Leave empty to keep it.": "Archive or restore the space. Leave empty to keep it.",
+ "Numeric ID of the page or blog post to attach to, from List Pages or List Blog Posts.": "Numeric ID of the page or blog post to attach to, from List Pages or List Blog Posts.",
+ "Optional comment for this attachment version.": "Optional comment for this attachment version.",
+ "Do not notify watchers about the upload. Defaults to true.": "Do not notify watchers about the upload. Defaults to true.",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.",
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
@@ -124,7 +499,6 @@
"None": "None",
"Wiki Markup": "Wiki Markup",
"Published": "Published",
- "Draft": "Draft",
"Published ": "Published ",
"Append as last child of target": "Append as last child of target",
"Insert as first child of target": "Insert as first child of target",
@@ -140,6 +514,36 @@
"Knowledge Base": "Knowledge Base",
"Current": "Current",
"Archived": "Archived",
+ "Under a parent page": "Under a parent page",
+ "Root of a space": "Root of a space",
+ "Replace an existing page": "Replace an existing page",
+ "Atlas Document Format (JSON string)": "Atlas Document Format (JSON string)",
+ "View (rendered HTML)": "View (rendered HTML)",
+ "Export view": "Export view",
+ "Styled view": "Styled view",
+ "Blog post": "Blog post",
+ "Attachment": "Attachment",
+ "Page template": "Page template",
+ "Newest first": "Newest first",
+ "Oldest first": "Oldest first",
+ "Recently modified first": "Recently modified first",
+ "Open": "Open",
+ "Reopened": "Reopened",
+ "Dangling (highlighted text removed)": "Dangling (highlighted text removed)",
+ "System": "System",
+ "Trashed": "Trashed",
+ "Deleted": "Deleted",
+ "Title A-Z": "Title A-Z",
+ "Knowledge base": "Knowledge base",
+ "Name A-Z": "Name A-Z",
+ "Name Z-A": "Name Z-A",
+ "Key A-Z": "Key A-Z",
+ "Incomplete": "Incomplete",
+ "Complete": "Complete",
+ "Before target (sibling)": "Before target (sibling)",
+ "After target (sibling)": "After target (sibling)",
+ "Resolve": "Resolve",
+ "Reopen": "Reopen",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
diff --git a/packages/pieces/community/confluence/src/index.ts b/packages/pieces/community/confluence/src/index.ts
index 2999f2b374e..5c099952bac 100644
--- a/packages/pieces/community/confluence/src/index.ts
+++ b/packages/pieces/community/confluence/src/index.ts
@@ -3,6 +3,7 @@ import { PieceCategory } from '@activepieces/pieces-framework';
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { confluenceAuth } from './lib/auth';
+import { confluenceClient } from './lib/common/client';
import { getPageContent } from './lib/actions/get-page-content';
import { createPageFromTemplateAction } from './lib/actions/create-page-from-template';
@@ -25,6 +26,8 @@ import { removeLabelAction } from './lib/actions/remove-label';
import { findUserAction } from './lib/actions/find-user';
import { listSpacesAction } from './lib/actions/list-spaces';
+import { confluenceAiActions } from './lib/actions/ai';
+
import { newPageTrigger } from './lib/triggers/new-page';
import { updatedPageTrigger } from './lib/triggers/updated-page';
import { newCommentTrigger } from './lib/triggers/new-comment';
@@ -34,7 +37,7 @@ import { newBlogPostTrigger } from './lib/triggers/new-blog-post';
export const confluence = createPiece({
displayName: 'Confluence',
auth: confluenceAuth,
- minimumSupportedRelease: '0.30.0',
+ minimumSupportedRelease: '0.88.2',
logoUrl: 'https://cdn.activepieces.com/pieces/confluence.png',
authors: ['geekyme', 'sanket-a11y'],
categories: [PieceCategory.CONTENT_AND_FILES],
@@ -59,11 +62,9 @@ export const confluence = createPiece({
removeLabelAction,
findUserAction,
listSpacesAction,
+ ...confluenceAiActions,
createCustomApiCallAction({
- baseUrl: (auth) => {
- const domain = auth?.props?.confluenceDomain ?? '';
- return `${domain.replace(/\/+$/, '')}/wiki`;
- },
+ baseUrl: (auth) => (auth ? confluenceClient.baseUrl({ auth }) : ''),
auth: confluenceAuth,
authMapping: async (auth) => {
const authValue = auth.props;
diff --git a/packages/pieces/community/confluence/src/lib/actions/add-comment.ts b/packages/pieces/community/confluence/src/lib/actions/add-comment.ts
index 13a7efddf37..c421cc32ee3 100644
--- a/packages/pieces/community/confluence/src/lib/actions/add-comment.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/add-comment.ts
@@ -1,20 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { addCommentOutputSchema } from '../output-schemas';
export const addCommentAction = createAction({
auth: confluenceAuth,
name: 'add-comment',
+ outputSchema: addCommentOutputSchema,
classification: 'WRITE',
displayName: 'Add Comment to Page',
description: 'Adds a footer comment to a page.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Posts a new footer comment on a Confluence page, with the comment body given in storage (XHTML) format (plain text is accepted). Use to leave a top-level comment on a page; to respond to an existing comment use Reply to Comment instead. Not idempotent: each call adds another comment.', idempotent: false },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
body: Property.LongText({
displayName: 'Comment',
description: 'Comment body in storage (XHTML) format. Plain text works too.',
@@ -24,20 +25,10 @@ export const addCommentAction = createAction({
async run(context) {
const { pageId, body } = context.propsValue;
- return await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.POST,
- version: 'v2',
- resourceUri: '/footer-comments',
- body: {
- pageId,
- body: {
- representation: 'storage',
- value: body,
- },
- },
+ return await confluenceApi.createFooterComment({
+ auth: context.auth,
+ pageId,
+ value: body,
});
},
});
diff --git a/packages/pieces/community/confluence/src/lib/actions/add-label.ts b/packages/pieces/community/confluence/src/lib/actions/add-label.ts
index 9445e50fec5..f1bbeec6e66 100644
--- a/packages/pieces/community/confluence/src/lib/actions/add-label.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/add-label.ts
@@ -1,20 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { confluenceAddLabelsOutputSchema } from '../output-schemas';
export const addLabelAction = createAction({
auth: confluenceAuth,
name: 'add-label',
+ outputSchema: confluenceAddLabelsOutputSchema,
classification: 'WRITE',
displayName: 'Add Label to Page',
description: 'Adds one or more labels to a page.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Adds one or more labels to a Confluence page, with a selectable prefix (global, personal/my, or team) applied to all labels in the call. Use to tag or categorize a page. Requires the page ID and at least one label name. Effectively idempotent — re-adding an existing label leaves the page\'s label set unchanged.', idempotent: true },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
labels: Property.Array({
displayName: 'Labels',
description: 'Label names to add (one per row).',
@@ -36,16 +37,12 @@ export const addLabelAction = createAction({
},
async run(context) {
const { pageId, labels, prefix } = context.propsValue;
- const labelList = (labels as string[]).map((name) => ({ prefix, name }));
- return await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.POST,
- version: 'v1',
- resourceUri: `/content/${pageId}/label`,
- body: labelList,
+ return await confluenceApi.addLabels({
+ auth: context.auth,
+ pageId,
+ prefix,
+ names: labels,
});
},
});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/add-labels.ts b/packages/pieces/community/confluence/src/lib/actions/ai/add-labels.ts
new file mode 100644
index 00000000000..9590d5c811f
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/add-labels.ts
@@ -0,0 +1,61 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceAddLabelsOutputSchema } from '../../output-schemas';
+
+export const addLabelsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_add_labels',
+ outputSchema: confluenceAddLabelsOutputSchema,
+ displayName: 'Add Labels',
+ description: 'Adds labels to a page, blog post or attachment.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Adds one or more labels, all with the same prefix, to a Confluence page, blog post or attachment. Idempotent: adding a label that is already there leaves the labels unchanged.',
+ idempotent: true,
+ },
+ props: {
+ contentId: Property.ShortText({
+ displayName: 'Content ID',
+ description:
+ 'ID of the page, blog post or attachment, from List Pages, List Blog Posts or List Page Attachments.',
+ required: true,
+ }),
+ labels: Property.Array({
+ displayName: 'Labels',
+ description: 'Label names to add, lowercase without spaces, e.g. "release-notes".',
+ required: true,
+ }),
+ prefix: Property.StaticDropdown({
+ displayName: 'Prefix',
+ description: 'Label prefix. Defaults to global.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Global', value: 'global' },
+ { label: 'My (personal)', value: 'my' },
+ { label: 'Team', value: 'team' },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { contentId, labels, prefix } = context.propsValue;
+ if (
+ labels.length === 0 ||
+ !labels.every((label): label is string => typeof label === 'string' && label !== '')
+ ) {
+ throw new Error('Labels must be a non-empty list of label names.');
+ }
+ return await confluenceApi.addLabels({
+ auth: context.auth,
+ pageId: contentId,
+ prefix: prefix ?? 'global',
+ names: labels,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/add-space-labels.ts b/packages/pieces/community/confluence/src/lib/actions/ai/add-space-labels.ts
new file mode 100644
index 00000000000..ee68e678e8d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/add-space-labels.ts
@@ -0,0 +1,57 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceAddSpaceLabelsOutputSchema } from '../../output-schemas';
+
+export const addSpaceLabelsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_add_space_labels',
+ outputSchema: confluenceAddSpaceLabelsOutputSchema,
+ displayName: 'Add Space Labels',
+ description: 'Adds labels to a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Adds one or more labels (space categories), all with the same prefix, to a Confluence space identified by its key. Idempotent: adding a label that is already there leaves the labels unchanged.',
+ idempotent: true,
+ },
+ props: {
+ spaceKey: confluenceAiProps.spaceKey({ required: true }),
+ labels: Property.Array({
+ displayName: 'Labels',
+ description: 'Label names to add, lowercase without spaces, e.g. "release-notes".',
+ required: true,
+ }),
+ prefix: Property.StaticDropdown({
+ displayName: 'Prefix',
+ description: 'Label prefix. Defaults to global.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Global', value: 'global' },
+ { label: 'My (personal)', value: 'my' },
+ { label: 'Team', value: 'team' },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { spaceKey, labels, prefix } = context.propsValue;
+ if (
+ labels.length === 0 ||
+ !labels.every((label): label is string => typeof label === 'string' && label !== '')
+ ) {
+ throw new Error('Labels must be a non-empty list of label names.');
+ }
+ return await confluenceApi.addSpaceLabels({
+ auth: context.auth,
+ spaceKey,
+ prefix: prefix ?? 'global',
+ names: labels,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/archive-pages.ts b/packages/pieces/community/confluence/src/lib/actions/ai/archive-pages.ts
new file mode 100644
index 00000000000..4574b2d36b7
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/archive-pages.ts
@@ -0,0 +1,37 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceArchivePagesOutputSchema } from '../../output-schemas';
+
+export const archivePagesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_archive_pages',
+ outputSchema: confluenceArchivePagesOutputSchema,
+ displayName: 'Archive Pages',
+ description: 'Archives one or more pages.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Starts archiving one or more Confluence pages (recoverable from the space archive) and returns a long task ID; poll it with Get Long Task Status. Needs the Archive permission and a paid plan. Idempotent in effect, but archiving an already archived page fails.',
+ idempotent: true,
+ },
+ props: {
+ pageIds: Property.Array({
+ displayName: 'Page IDs',
+ description: 'Numeric IDs of the pages to archive, from List Pages.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { pageIds } = context.propsValue;
+ if (
+ pageIds.length === 0 ||
+ !pageIds.every((id): id is string => typeof id === 'string' && id !== '')
+ ) {
+ throw new Error('Page IDs must be a non-empty list of page ID strings.');
+ }
+ return await confluenceApi.archivePages({ auth: context.auth, pageIds });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/copy-page.ts b/packages/pieces/community/confluence/src/lib/actions/ai/copy-page.ts
new file mode 100644
index 00000000000..60831aac646
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/copy-page.ts
@@ -0,0 +1,74 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCopyPageOutputSchema } from '../../output-schemas';
+
+export const copyPageAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_copy_page',
+ outputSchema: confluenceCopyPageOutputSchema,
+ displayName: 'Copy Page',
+ description: 'Copies a page to a space, under a parent page, or over an existing page.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Copies a single Confluence page (not its children) to the root of a space (by space key), under a parent page, or over an existing page (replacing its content). Optionally copies attachments, labels, permissions and properties. Not idempotent: each call creates another copy.',
+ idempotent: false,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ destinationType: Property.StaticDropdown({
+ displayName: 'Destination Type',
+ required: true,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Under a parent page', value: 'parent_page' },
+ { label: 'Root of a space', value: 'space' },
+ { label: 'Replace an existing page', value: 'existing_page' },
+ ],
+ },
+ }),
+ destinationValue: Property.ShortText({
+ displayName: 'Destination',
+ description:
+ 'Parent or existing page ID for page destinations; space key (e.g. "DOCS") for a space.',
+ required: true,
+ }),
+ pageTitle: Property.ShortText({
+ displayName: 'New Title',
+ description:
+ 'Title of the copy. Needed when copying into the same space, where titles must be unique.',
+ required: false,
+ }),
+ copyAttachments: Property.Checkbox({ displayName: 'Copy Attachments', required: false }),
+ copyLabels: Property.Checkbox({ displayName: 'Copy Labels', required: false }),
+ copyPermissions: Property.Checkbox({ displayName: 'Copy Permissions', required: false }),
+ copyProperties: Property.Checkbox({ displayName: 'Copy Properties', required: false }),
+ },
+ async run(context) {
+ const {
+ pageId,
+ destinationType,
+ destinationValue,
+ pageTitle,
+ copyAttachments,
+ copyLabels,
+ copyPermissions,
+ copyProperties,
+ } = context.propsValue;
+ return await confluenceApi.copyPage({
+ auth: context.auth,
+ pageId,
+ destination: { type: destinationType, value: destinationValue },
+ pageTitle,
+ copyAttachments,
+ copyLabels,
+ copyPermissions,
+ copyProperties,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-blog-post-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-blog-post-property.ts
new file mode 100644
index 00000000000..affc4560254
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-blog-post-property.ts
@@ -0,0 +1,36 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateBlogPostPropertyOutputSchema } from '../../output-schemas';
+
+export const createBlogPostPropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_blog_post_property',
+ outputSchema: confluenceCreateBlogPostPropertyOutputSchema,
+ displayName: 'Create Blog Post Property',
+ description: 'Stores a new content property on a blog post.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Stores a new content property (a key with a JSON value) on a Confluence blog post. Fails if the key already exists there; use Update Blog Post Property to change it. Not idempotent.',
+ idempotent: false,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ key: confluenceAiProps.propertyKey({ required: true }),
+ value: confluenceAiProps.propertyValue({ required: true }),
+ },
+ async run(context) {
+ const { blogPostId, key, value } = context.propsValue;
+ return await confluenceApi.createContentProperty({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ key,
+ value,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-blog-post.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-blog-post.ts
new file mode 100644
index 00000000000..cec064135a4
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-blog-post.ts
@@ -0,0 +1,48 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateBlogPostOutputSchema } from '../../output-schemas';
+
+export const createBlogPostAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_blog_post',
+ outputSchema: confluenceCreateBlogPostOutputSchema,
+ displayName: 'Create Blog Post',
+ description: 'Creates a blog post in a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a Confluence blog post in a space, published or as a draft. Get the space ID from List Spaces. Not idempotent: each call creates another blog post.',
+ idempotent: false,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ title: Property.ShortText({ displayName: 'Title', required: true }),
+ body: confluenceAiProps.body({ required: false }),
+ bodyFormat: confluenceAiProps.bodyFormat({ required: false }),
+ status: confluenceAiProps.contentStatus({
+ required: false,
+ description: 'Published (current) or draft. Defaults to published.',
+ }),
+ isPrivate: Property.Checkbox({
+ displayName: 'Private',
+ description: 'Restrict the blog post so only you can view and edit it.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { spaceId, title, body, bodyFormat, status, isPrivate } = context.propsValue;
+ return await confluenceApi.createBlogPost({
+ auth: context.auth,
+ spaceId,
+ title,
+ status: status ?? 'current',
+ representation: bodyFormat ?? 'storage',
+ value: body ?? '',
+ isPrivate,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-folder.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-folder.ts
new file mode 100644
index 00000000000..c719980f1c2
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-folder.ts
@@ -0,0 +1,35 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateFolderOutputSchema } from '../../output-schemas';
+
+export const createFolderAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_folder',
+ outputSchema: confluenceCreateFolderOutputSchema,
+ displayName: 'Create Folder',
+ description: 'Creates a folder in a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a Confluence folder in a space, optionally under a parent page or folder, to group pages. Not idempotent: each call creates another folder.',
+ idempotent: false,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ title: Property.ShortText({ displayName: 'Title', required: false }),
+ parentId: Property.ShortText({
+ displayName: 'Parent ID',
+ description:
+ 'ID of the page, folder or whiteboard to create it under. Leave empty for the space root.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { spaceId, title, parentId } = context.propsValue;
+ return await confluenceApi.createFolder({ auth: context.auth, spaceId, title, parentId });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-footer-comment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-footer-comment.ts
new file mode 100644
index 00000000000..f0f5f889b4d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-footer-comment.ts
@@ -0,0 +1,51 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateFooterCommentOutputSchema } from '../../output-schemas';
+
+export const createFooterCommentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_footer_comment',
+ outputSchema: confluenceCreateFooterCommentOutputSchema,
+ displayName: 'Create Footer Comment',
+ description: 'Adds a footer comment to a page, blog post or attachment.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Adds a top-level footer comment to a Confluence page, blog post or attachment; set exactly one of their IDs. To reply to an existing footer comment use Reply to Comment, and for comments on highlighted text use Create Inline Comment. Not idempotent: each call adds another comment.',
+ idempotent: false,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({
+ required: false,
+ description: 'Page to comment on, from List Pages.',
+ }),
+ blogPostId: confluenceAiProps.blogPostId({
+ required: false,
+ description: 'Blog post to comment on, from List Blog Posts.',
+ }),
+ attachmentId: confluenceAiProps.attachmentId({
+ required: false,
+ description: 'Attachment to comment on.',
+ }),
+ body: confluenceAiProps.body({ required: true }),
+ bodyFormat: confluenceAiProps.bodyFormat({ required: false }),
+ },
+ async run(context) {
+ const { pageId, blogPostId, attachmentId, body, bodyFormat } = context.propsValue;
+ if ([pageId, blogPostId, attachmentId].filter((id) => id !== undefined).length !== 1) {
+ throw new Error('Set exactly one of Page ID, Blog Post ID or Attachment ID.');
+ }
+ return await confluenceApi.createFooterCommentOn({
+ auth: context.auth,
+ pageId,
+ blogPostId,
+ attachmentId,
+ representation: bodyFormat ?? 'storage',
+ value: body,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-inline-comment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-inline-comment.ts
new file mode 100644
index 00000000000..3997a9d5b23
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-inline-comment.ts
@@ -0,0 +1,84 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateInlineCommentOutputSchema } from '../../output-schemas';
+
+export const createInlineCommentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_inline_comment',
+ outputSchema: confluenceCreateInlineCommentOutputSchema,
+ displayName: 'Create Inline Comment',
+ description: 'Adds an inline comment on highlighted text, or replies to one.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Adds an inline comment that highlights text on a Confluence page or blog post, or replies to an existing inline comment. For a new comment set Page ID or Blog Post ID plus Text Selection (text that appears in the body); for a reply set only Parent Comment ID. Not idempotent: each call adds another comment.',
+ idempotent: false,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({
+ required: false,
+ description: 'Page to comment on, from List Pages.',
+ }),
+ blogPostId: confluenceAiProps.blogPostId({
+ required: false,
+ description: 'Blog post to comment on, from List Blog Posts.',
+ }),
+ parentCommentId: confluenceAiProps.commentId({
+ required: false,
+ displayName: 'Parent Comment ID',
+ description:
+ 'Inline comment to reply to, from List Page Inline Comments. Set only this for a reply.',
+ }),
+ body: confluenceAiProps.body({ required: true }),
+ bodyFormat: confluenceAiProps.bodyFormat({ required: false }),
+ textSelection: Property.ShortText({
+ displayName: 'Text Selection',
+ description:
+ 'Exact text in the page body to highlight. Required for a new (non-reply) comment.',
+ required: false,
+ }),
+ textSelectionMatchCount: Property.Number({
+ displayName: 'Match Count',
+ description: 'How many times Text Selection appears in the body. Defaults to 1.',
+ required: false,
+ }),
+ textSelectionMatchIndex: Property.Number({
+ displayName: 'Match Index',
+ description:
+ 'Zero-based occurrence of Text Selection to highlight. Defaults to 0 (the first).',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const {
+ pageId,
+ blogPostId,
+ parentCommentId,
+ body,
+ bodyFormat,
+ textSelection,
+ textSelectionMatchCount,
+ textSelectionMatchIndex,
+ } = context.propsValue;
+ if ([pageId, blogPostId, parentCommentId].filter((id) => id !== undefined).length !== 1) {
+ throw new Error('Set exactly one of Page ID, Blog Post ID or Parent Comment ID.');
+ }
+ return await confluenceApi.createInlineComment({
+ auth: context.auth,
+ pageId,
+ blogPostId,
+ parentCommentId,
+ representation: bodyFormat ?? 'storage',
+ value: body,
+ textSelection,
+ textSelectionMatchCount:
+ textSelection === undefined ? undefined : textSelectionMatchCount ?? 1,
+ textSelectionMatchIndex:
+ textSelection === undefined ? undefined : textSelectionMatchIndex ?? 0,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-page-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-page-property.ts
new file mode 100644
index 00000000000..ebb780ced21
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-page-property.ts
@@ -0,0 +1,36 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreatePagePropertyOutputSchema } from '../../output-schemas';
+
+export const createPagePropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_page_property',
+ outputSchema: confluenceCreatePagePropertyOutputSchema,
+ displayName: 'Create Page Property',
+ description: 'Stores a new content property on a page.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Stores a new content property (a key with a JSON value) on a Confluence page. Fails if the key already exists there; use Update Page Property to change it. Not idempotent.',
+ idempotent: false,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ key: confluenceAiProps.propertyKey({ required: true }),
+ value: confluenceAiProps.propertyValue({ required: true }),
+ },
+ async run(context) {
+ const { pageId, key, value } = context.propsValue;
+ return await confluenceApi.createContentProperty({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ key,
+ value,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-page.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-page.ts
new file mode 100644
index 00000000000..9c3d3767ea4
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-page.ts
@@ -0,0 +1,59 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreatePageOutputSchema } from '../../output-schemas';
+
+export const createPageAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_page',
+ outputSchema: confluenceCreatePageOutputSchema,
+ displayName: 'Create Page',
+ description: 'Creates a page in a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a Confluence page in a space, optionally under a parent page, published or as a draft. Get the space ID from List Spaces and a parent page ID from List Pages. Not idempotent: each call creates another page.',
+ idempotent: false,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ title: Property.ShortText({
+ displayName: 'Title',
+ description: 'Page title. Must be unique within the space for published pages.',
+ required: true,
+ }),
+ body: confluenceAiProps.body({ required: false }),
+ bodyFormat: confluenceAiProps.bodyFormat({ required: false }),
+ parentId: confluenceAiProps.pageId({
+ required: false,
+ displayName: 'Parent Page ID',
+ description:
+ 'Page to nest the new page under. Leave empty to create it under the space homepage.',
+ }),
+ status: confluenceAiProps.contentStatus({
+ required: false,
+ description: 'Published (current) or draft. Defaults to published.',
+ }),
+ isPrivate: Property.Checkbox({
+ displayName: 'Private',
+ description: 'Restrict the page so only you can view and edit it.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { spaceId, title, body, bodyFormat, parentId, status, isPrivate } = context.propsValue;
+ return await confluenceApi.createPage({
+ auth: context.auth,
+ spaceId,
+ parentId,
+ title,
+ status: status ?? 'current',
+ representation: bodyFormat ?? 'storage',
+ value: body ?? '',
+ isPrivate,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-space-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-space-property.ts
new file mode 100644
index 00000000000..a569fd5dac5
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-space-property.ts
@@ -0,0 +1,36 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateSpacePropertyOutputSchema } from '../../output-schemas';
+
+export const createSpacePropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_space_property',
+ outputSchema: confluenceCreateSpacePropertyOutputSchema,
+ displayName: 'Create Space Property',
+ description: 'Stores a new content property on a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Stores a new content property (a key with a JSON value) on a Confluence space. Fails if the key already exists there; use Update Space Property to change it. Not idempotent.',
+ idempotent: false,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ key: confluenceAiProps.propertyKey({ required: true }),
+ value: confluenceAiProps.propertyValue({ required: true }),
+ },
+ async run(context) {
+ const { spaceId, key, value } = context.propsValue;
+ return await confluenceApi.createContentProperty({
+ auth: context.auth,
+ contentType: 'spaces',
+ contentId: spaceId,
+ key,
+ value,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-space.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-space.ts
new file mode 100644
index 00000000000..20e7184a583
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-space.ts
@@ -0,0 +1,49 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateSpaceOutputSchema } from '../../output-schemas';
+
+export const createSpaceAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_space',
+ outputSchema: confluenceCreateSpaceOutputSchema,
+ displayName: 'Create Space',
+ description: 'Creates a space, public or private.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a Confluence space with a name and optional key and description; Private makes it visible only to you. Needs the create-space permission. Not idempotent: a second call with the same key fails because keys are unique.',
+ idempotent: false,
+ },
+ props: {
+ name: Property.ShortText({ displayName: 'Name', required: true }),
+ key: Property.ShortText({
+ displayName: 'Key',
+ description:
+ 'Unique space key, uppercase letters and digits, e.g. "ENG". Generated from the name if empty.',
+ required: false,
+ }),
+ description: Property.LongText({
+ displayName: 'Description',
+ description: 'Plain-text description.',
+ required: false,
+ }),
+ isPrivate: Property.Checkbox({
+ displayName: 'Private',
+ description: 'Create a private space visible only to you.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { name, key, description, isPrivate } = context.propsValue;
+ return await confluenceApi.createSpace({
+ auth: context.auth,
+ name,
+ key,
+ description,
+ isPrivate,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-whiteboard-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-whiteboard-property.ts
new file mode 100644
index 00000000000..1aa6de75bcd
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-whiteboard-property.ts
@@ -0,0 +1,40 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateWhiteboardPropertyOutputSchema } from '../../output-schemas';
+
+export const createWhiteboardPropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_whiteboard_property',
+ outputSchema: confluenceCreateWhiteboardPropertyOutputSchema,
+ displayName: 'Create Whiteboard Property',
+ description: 'Stores a new content property on a whiteboard.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Stores a new content property (a key with a JSON value) on a Confluence whiteboard. Fails if the key already exists there; use Update Whiteboard Property to change it. Not idempotent.',
+ idempotent: false,
+ },
+ props: {
+ whiteboardId: Property.ShortText({
+ displayName: 'Whiteboard ID',
+ description: 'Numeric whiteboard ID, from Create Whiteboard or List Child Content.',
+ required: true,
+ }),
+ key: confluenceAiProps.propertyKey({ required: true }),
+ value: confluenceAiProps.propertyValue({ required: true }),
+ },
+ async run(context) {
+ const { whiteboardId, key, value } = context.propsValue;
+ return await confluenceApi.createContentProperty({
+ auth: context.auth,
+ contentType: 'whiteboards',
+ contentId: whiteboardId,
+ key,
+ value,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/create-whiteboard.ts b/packages/pieces/community/confluence/src/lib/actions/ai/create-whiteboard.ts
new file mode 100644
index 00000000000..1aaa9e508b0
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/create-whiteboard.ts
@@ -0,0 +1,53 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateFolderOutputSchema } from '../../output-schemas';
+
+export const createWhiteboardAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_create_whiteboard',
+ outputSchema: confluenceCreateFolderOutputSchema,
+ displayName: 'Create Whiteboard',
+ description: 'Creates a whiteboard in a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a Confluence whiteboard in a space, optionally under a parent page or folder and from a built-in template key. Not idempotent: each call creates another whiteboard.',
+ idempotent: false,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ title: Property.ShortText({ displayName: 'Title', required: false }),
+ parentId: Property.ShortText({
+ displayName: 'Parent ID',
+ description:
+ 'ID of the page, folder or whiteboard to create it under. Leave empty for the space root.',
+ required: false,
+ }),
+ templateKey: Property.ShortText({
+ displayName: 'Template Key',
+ description:
+ 'Built-in whiteboard template, e.g. "4ls-retro", "daily-sync" or "concept-map". Leave empty for a blank board.',
+ required: false,
+ }),
+ isPrivate: Property.Checkbox({
+ displayName: 'Private',
+ description: 'Restrict the whiteboard so only you can view and edit it.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { spaceId, title, parentId, templateKey, isPrivate } = context.propsValue;
+ return await confluenceApi.createWhiteboard({
+ auth: context.auth,
+ spaceId,
+ title,
+ parentId,
+ templateKey,
+ isPrivate,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-attachment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-attachment.ts
new file mode 100644
index 00000000000..df1825038b4
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-attachment.ts
@@ -0,0 +1,40 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteAttachmentOutputSchema } from '../../output-schemas';
+
+export const deleteAttachmentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_attachment',
+ outputSchema: confluenceDeleteAttachmentOutputSchema,
+ displayName: 'Delete Attachment',
+ description: 'Moves an attachment to the trash, or purges it.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a Confluence attachment by ID. By default it moves it to the trash (recoverable); Purge permanently removes an attachment that is already in the trash. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ attachmentId: confluenceAiProps.attachmentId({ required: true }),
+ purge: Property.Checkbox({
+ displayName: 'Purge',
+ description:
+ 'Permanently delete an attachment that is already in the trash. Cannot be undone.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { attachmentId, purge } = context.propsValue;
+ await confluenceApi.deleteContent({
+ auth: context.auth,
+ contentType: 'attachments',
+ contentId: attachmentId,
+ query: { purge: purge || undefined },
+ });
+ return { deleted: true, attachmentId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-blog-post-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-blog-post-property.ts
new file mode 100644
index 00000000000..2c5337464f1
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-blog-post-property.ts
@@ -0,0 +1,35 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteBlogPostPropertyOutputSchema } from '../../output-schemas';
+
+export const deleteBlogPostPropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_blog_post_property',
+ outputSchema: confluenceDeleteBlogPostPropertyOutputSchema,
+ displayName: 'Delete Blog Post Property',
+ description: 'Deletes a content property from a blog post.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Permanently deletes a content property from a Confluence blog post. Get the property ID from List Blog Post Properties. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ propertyId: confluenceAiProps.propertyId({ required: true }),
+ },
+ async run(context) {
+ const { blogPostId, propertyId } = context.propsValue;
+ await confluenceApi.deleteContentProperty({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ propertyId,
+ });
+ return { deleted: true, propertyId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-blog-post.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-blog-post.ts
new file mode 100644
index 00000000000..3fa4ae1681e
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-blog-post.ts
@@ -0,0 +1,44 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteBlogPostOutputSchema } from '../../output-schemas';
+
+export const deleteBlogPostAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_blog_post',
+ outputSchema: confluenceDeleteBlogPostOutputSchema,
+ displayName: 'Delete Blog Post',
+ description: 'Moves a blog post to the trash, or purges it.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a Confluence blog post by ID. By default it moves it to the trash (recoverable); Purge permanently removes a blog post that is already in the trash, and Draft deletes an unpublished draft. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ purge: Property.Checkbox({
+ displayName: 'Purge',
+ description: 'Permanently delete a blog post that is already in the trash. Cannot be undone.',
+ required: false,
+ }),
+ draft: Property.Checkbox({
+ displayName: 'Draft',
+ description: 'Delete the unpublished draft of the blog post.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { blogPostId, purge, draft } = context.propsValue;
+ await confluenceApi.deleteContent({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ query: { purge: purge || undefined, draft: draft || undefined },
+ });
+ return { deleted: true, blogPostId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-folder.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-folder.ts
new file mode 100644
index 00000000000..47060917782
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-folder.ts
@@ -0,0 +1,36 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteFolderOutputSchema } from '../../output-schemas';
+
+export const deleteFolderAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_folder',
+ outputSchema: confluenceDeleteFolderOutputSchema,
+ displayName: 'Delete Folder',
+ description: 'Moves a folder to the trash.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a Confluence folder by ID, moving it to the trash. Content inside the folder moves up to its parent. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ folderId: Property.ShortText({
+ displayName: 'Folder ID',
+ description: 'Numeric folder ID, from Create Folder or List Child Content.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { folderId } = context.propsValue;
+ await confluenceApi.deleteContent({
+ auth: context.auth,
+ contentType: 'folders',
+ contentId: folderId,
+ });
+ return { deleted: true, folderId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-footer-comment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-footer-comment.ts
new file mode 100644
index 00000000000..d3093b903dd
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-footer-comment.ts
@@ -0,0 +1,33 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteFooterCommentOutputSchema } from '../../output-schemas';
+
+export const deleteFooterCommentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_footer_comment',
+ outputSchema: confluenceDeleteFooterCommentOutputSchema,
+ displayName: 'Delete Footer Comment',
+ description: 'Permanently deletes a footer comment.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Permanently deletes a Confluence footer comment by ID. Cannot be undone. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ commentId: confluenceAiProps.commentId({ required: true }),
+ },
+ async run(context) {
+ const { commentId } = context.propsValue;
+ await confluenceApi.deleteContent({
+ auth: context.auth,
+ contentType: 'footer-comments',
+ contentId: commentId,
+ });
+ return { deleted: true, commentId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-inline-comment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-inline-comment.ts
new file mode 100644
index 00000000000..7c75feb3cfd
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-inline-comment.ts
@@ -0,0 +1,33 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteFooterCommentOutputSchema } from '../../output-schemas';
+
+export const deleteInlineCommentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_inline_comment',
+ outputSchema: confluenceDeleteFooterCommentOutputSchema,
+ displayName: 'Delete Inline Comment',
+ description: 'Permanently deletes a inline comment.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Permanently deletes a Confluence inline comment by ID. Cannot be undone. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ commentId: confluenceAiProps.commentId({ required: true }),
+ },
+ async run(context) {
+ const { commentId } = context.propsValue;
+ await confluenceApi.deleteContent({
+ auth: context.auth,
+ contentType: 'inline-comments',
+ contentId: commentId,
+ });
+ return { deleted: true, commentId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-page-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-page-property.ts
new file mode 100644
index 00000000000..e66d379b111
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-page-property.ts
@@ -0,0 +1,35 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteBlogPostPropertyOutputSchema } from '../../output-schemas';
+
+export const deletePagePropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_page_property',
+ outputSchema: confluenceDeleteBlogPostPropertyOutputSchema,
+ displayName: 'Delete Page Property',
+ description: 'Deletes a content property from a page.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Permanently deletes a content property from a Confluence page. Get the property ID from List Page Properties. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ propertyId: confluenceAiProps.propertyId({ required: true }),
+ },
+ async run(context) {
+ const { pageId, propertyId } = context.propsValue;
+ await confluenceApi.deleteContentProperty({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ propertyId,
+ });
+ return { deleted: true, propertyId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-page.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-page.ts
new file mode 100644
index 00000000000..bedf3e4af68
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-page.ts
@@ -0,0 +1,44 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeletePageOutputSchema } from '../../output-schemas';
+
+export const deletePageAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_page',
+ outputSchema: confluenceDeletePageOutputSchema,
+ displayName: 'Delete Page',
+ description: 'Moves a page to the trash, or purges it.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a Confluence page by ID. By default it moves the page to the trash (recoverable); Purge permanently removes a page that is already in the trash, and Draft deletes an unpublished draft. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ purge: Property.Checkbox({
+ displayName: 'Purge',
+ description: 'Permanently delete a page that is already in the trash. Cannot be undone.',
+ required: false,
+ }),
+ draft: Property.Checkbox({
+ displayName: 'Draft',
+ description: 'Delete the unpublished draft of the page.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { pageId, purge, draft } = context.propsValue;
+ await confluenceApi.deleteContent({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ query: { purge: purge || undefined, draft: draft || undefined },
+ });
+ return { deleted: true, pageId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-space-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-space-property.ts
new file mode 100644
index 00000000000..5b02a3e8f76
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-space-property.ts
@@ -0,0 +1,35 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteBlogPostPropertyOutputSchema } from '../../output-schemas';
+
+export const deleteSpacePropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_space_property',
+ outputSchema: confluenceDeleteBlogPostPropertyOutputSchema,
+ displayName: 'Delete Space Property',
+ description: 'Deletes a content property from a space.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Permanently deletes a content property from a Confluence space. Get the property ID from List Space Properties. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ propertyId: confluenceAiProps.propertyId({ required: true }),
+ },
+ async run(context) {
+ const { spaceId, propertyId } = context.propsValue;
+ await confluenceApi.deleteContentProperty({
+ auth: context.auth,
+ contentType: 'spaces',
+ contentId: spaceId,
+ propertyId,
+ });
+ return { deleted: true, propertyId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-space.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-space.ts
new file mode 100644
index 00000000000..35b54b33ff0
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-space.ts
@@ -0,0 +1,30 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteSpaceOutputSchema } from '../../output-schemas';
+
+export const deleteSpaceAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_space',
+ outputSchema: confluenceDeleteSpaceOutputSchema,
+ displayName: 'Delete Space',
+ description: 'Starts deleting a space and everything in it.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Starts permanently deleting a Confluence space, identified by its key, with all its content; this cannot be undone. Returns a long task ID; poll it with Get Long Task Status. Needs space admin. Not idempotent.',
+ idempotent: false,
+ },
+ props: {
+ spaceKey: confluenceAiProps.spaceKey({ required: true }),
+ },
+ async run(context) {
+ return await confluenceApi.deleteSpace({
+ auth: context.auth,
+ spaceKey: context.propsValue.spaceKey,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-whiteboard-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-whiteboard-property.ts
new file mode 100644
index 00000000000..a4bf8ecc4f7
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-whiteboard-property.ts
@@ -0,0 +1,39 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteBlogPostPropertyOutputSchema } from '../../output-schemas';
+
+export const deleteWhiteboardPropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_whiteboard_property',
+ outputSchema: confluenceDeleteBlogPostPropertyOutputSchema,
+ displayName: 'Delete Whiteboard Property',
+ description: 'Deletes a content property from a whiteboard.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Permanently deletes a content property from a Confluence whiteboard. Get the property ID from List Whiteboard Properties. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ whiteboardId: Property.ShortText({
+ displayName: 'Whiteboard ID',
+ description: 'Numeric whiteboard ID, from Create Whiteboard or List Child Content.',
+ required: true,
+ }),
+ propertyId: confluenceAiProps.propertyId({ required: true }),
+ },
+ async run(context) {
+ const { whiteboardId, propertyId } = context.propsValue;
+ await confluenceApi.deleteContentProperty({
+ auth: context.auth,
+ contentType: 'whiteboards',
+ contentId: whiteboardId,
+ propertyId,
+ });
+ return { deleted: true, propertyId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/delete-whiteboard.ts b/packages/pieces/community/confluence/src/lib/actions/ai/delete-whiteboard.ts
new file mode 100644
index 00000000000..8f1f0f2f65d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/delete-whiteboard.ts
@@ -0,0 +1,36 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceDeleteWhiteboardOutputSchema } from '../../output-schemas';
+
+export const deleteWhiteboardAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_delete_whiteboard',
+ outputSchema: confluenceDeleteWhiteboardOutputSchema,
+ displayName: 'Delete Whiteboard',
+ description: 'Moves a whiteboard to the trash.',
+ audience: 'ai',
+ classification: 'DESTRUCTIVE',
+ aiMetadata: {
+ description:
+ 'Deletes a Confluence whiteboard by ID, moving it to the trash. Not idempotent: deleting again returns an error.',
+ idempotent: false,
+ },
+ props: {
+ whiteboardId: Property.ShortText({
+ displayName: 'Whiteboard ID',
+ description: 'Numeric whiteboard ID, from Create Whiteboard or List Child Content.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { whiteboardId } = context.propsValue;
+ await confluenceApi.deleteContent({
+ auth: context.auth,
+ contentType: 'whiteboards',
+ contentId: whiteboardId,
+ });
+ return { deleted: true, whiteboardId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-attachment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-attachment.ts
new file mode 100644
index 00000000000..8a696caa740
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-attachment.ts
@@ -0,0 +1,38 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetAttachmentOutputSchema } from '../../output-schemas';
+
+export const getAttachmentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_attachment',
+ outputSchema: confluenceGetAttachmentOutputSchema,
+ displayName: 'Get Attachment',
+ description: 'Gets the details of an attachment.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets the metadata of one Confluence attachment: title, media type, size, version, the page or blog post it belongs to, and its download link. Use Download Attachment to get the file itself.',
+ idempotent: true,
+ },
+ props: {
+ attachmentId: confluenceAiProps.attachmentId({ required: true }),
+ includeLabels: Property.Checkbox({ displayName: 'Include Labels', required: false }),
+ includeVersions: Property.Checkbox({ displayName: 'Include Versions', required: false }),
+ },
+ async run(context) {
+ const { attachmentId, includeLabels, includeVersions } = context.propsValue;
+ return await confluenceApi.getContent({
+ auth: context.auth,
+ contentType: 'attachments',
+ contentId: attachmentId,
+ query: {
+ 'include-labels': includeLabels || undefined,
+ 'include-versions': includeVersions || undefined,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post-like-count.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post-like-count.ts
new file mode 100644
index 00000000000..b7786634808
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post-like-count.ts
@@ -0,0 +1,30 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetBlogPostLikeCountOutputSchema } from '../../output-schemas';
+
+export const getBlogPostLikeCountAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_blog_post_like_count',
+ outputSchema: confluenceGetBlogPostLikeCountOutputSchema,
+ displayName: 'Get Blog Post Like Count',
+ description: 'Gets how many likes a blog post has.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description: 'Returns the number of likes on a Confluence blog post.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ },
+ async run(context) {
+ return await confluenceApi.getContentLikeCount({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: context.propsValue.blogPostId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post-version.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post-version.ts
new file mode 100644
index 00000000000..fdbcc57a3a8
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post-version.ts
@@ -0,0 +1,34 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetBlogPostVersionOutputSchema } from '../../output-schemas';
+
+export const getBlogPostVersionAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_blog_post_version',
+ outputSchema: confluenceGetBlogPostVersionOutputSchema,
+ displayName: 'Get Blog Post Version',
+ description: 'Gets the details of one version of a blog post.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets the details of one version of a Confluence blog post: author, date, message, minor-edit flag and the neighbouring versions. Get version numbers from List Blog Post Versions.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ versionNumber: confluenceAiProps.versionNumber({ required: true }),
+ },
+ async run(context) {
+ const { blogPostId, versionNumber } = context.propsValue;
+ return await confluenceApi.getContentVersion({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ versionNumber,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post.ts
new file mode 100644
index 00000000000..3db1be55b24
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-blog-post.ts
@@ -0,0 +1,77 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetBlogPostOutputSchema } from '../../output-schemas';
+
+export const getBlogPostAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_blog_post',
+ outputSchema: confluenceGetBlogPostOutputSchema,
+ displayName: 'Get Blog Post',
+ description: 'Gets a blog post by ID, with its body.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence blog post by its numeric ID, including the body in the chosen format and optionally its labels, properties and versions.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ bodyFormat: Property.StaticDropdown({
+ displayName: 'Body Format',
+ description: 'Body representation to return. Defaults to storage (XHTML).',
+ required: false,
+ defaultValue: 'storage',
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Storage (XHTML)', value: 'storage' },
+ { label: 'Atlas Document Format', value: 'atlas_doc_format' },
+ { label: 'View (rendered HTML)', value: 'view' },
+ { label: 'Export view', value: 'export_view' },
+ { label: 'Styled view', value: 'styled_view' },
+ ],
+ },
+ }),
+ getDraft: Property.Checkbox({
+ displayName: 'Get Draft',
+ description: 'Return the unpublished draft instead of the published version.',
+ required: false,
+ }),
+ version: Property.Number({
+ displayName: 'Version',
+ description: 'Return this historical version number instead of the latest.',
+ required: false,
+ }),
+ includeLabels: Property.Checkbox({ displayName: 'Include Labels', required: false }),
+ includeProperties: Property.Checkbox({ displayName: 'Include Properties', required: false }),
+ includeVersions: Property.Checkbox({ displayName: 'Include Versions', required: false }),
+ },
+ async run(context) {
+ const {
+ blogPostId,
+ bodyFormat,
+ getDraft,
+ version,
+ includeLabels,
+ includeProperties,
+ includeVersions,
+ } = context.propsValue;
+ return await confluenceApi.getContent({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ query: {
+ 'body-format': bodyFormat ?? 'storage',
+ 'get-draft': getDraft || undefined,
+ version,
+ 'include-labels': includeLabels || undefined,
+ 'include-properties': includeProperties || undefined,
+ 'include-versions': includeVersions || undefined,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-content-restrictions.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-content-restrictions.ts
new file mode 100644
index 00000000000..67c8527699b
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-content-restrictions.ts
@@ -0,0 +1,35 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetContentRestrictionsOutputSchema } from '../../output-schemas';
+
+export const getContentRestrictionsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_content_restrictions',
+ outputSchema: confluenceGetContentRestrictionsOutputSchema,
+ displayName: 'Get Content Restrictions',
+ description: 'Gets who may view or edit a page or blog post.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Returns the read and update restrictions on a Confluence page or blog post, including the users and groups each one allows. Empty restrictions mean the space permissions apply.',
+ idempotent: true,
+ },
+ props: {
+ contentId: confluenceAiProps.pageId({
+ required: true,
+ displayName: 'Content ID',
+ description: 'Numeric ID of the page or blog post, from List Pages or List Blog Posts.',
+ }),
+ },
+ async run(context) {
+ return await confluenceApi.getContentRestrictions({
+ auth: context.auth,
+ contentId: context.propsValue.contentId,
+ query: { expand: 'restrictions.user,restrictions.group' },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-current-user.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-current-user.ts
new file mode 100644
index 00000000000..4332730b59d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-current-user.ts
@@ -0,0 +1,24 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetCurrentUserOutputSchema } from '../../output-schemas';
+
+export const getCurrentUserAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_current_user',
+ outputSchema: confluenceGetCurrentUserOutputSchema,
+ displayName: 'Get Current User',
+ description: 'Gets the connected user.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Returns the Confluence user the connection is signed in as, including their account ID, display name and email.',
+ idempotent: true,
+ },
+ props: {},
+ async run(context) {
+ return await confluenceApi.getCurrentUser({ auth: context.auth });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-folder.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-folder.ts
new file mode 100644
index 00000000000..b305edde4f6
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-folder.ts
@@ -0,0 +1,34 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateFolderOutputSchema } from '../../output-schemas';
+
+export const getFolderAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_folder',
+ outputSchema: confluenceCreateFolderOutputSchema,
+ displayName: 'Get Folder',
+ description: 'Gets a folder by ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence folder by ID, with its title, space, parent, owner and version.',
+ idempotent: true,
+ },
+ props: {
+ folderId: Property.ShortText({
+ displayName: 'Folder ID',
+ description: 'Numeric folder ID, from Create Folder or List Child Content.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await confluenceApi.getContent({
+ auth: context.auth,
+ contentType: 'folders',
+ contentId: context.propsValue.folderId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-footer-comment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-footer-comment.ts
new file mode 100644
index 00000000000..a9b3b716944
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-footer-comment.ts
@@ -0,0 +1,47 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetFooterCommentOutputSchema } from '../../output-schemas';
+
+export const getFooterCommentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_footer_comment',
+ outputSchema: confluenceGetFooterCommentOutputSchema,
+ displayName: 'Get Footer Comment',
+ description: 'Gets a footer comment by ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence footer comment by ID, with its body, version and the page, blog post or parent comment it belongs to.',
+ idempotent: true,
+ },
+ props: {
+ commentId: confluenceAiProps.commentId({ required: true }),
+ bodyFormat: Property.StaticDropdown({
+ displayName: 'Body Format',
+ description: 'Body representation to return. Defaults to storage (XHTML).',
+ required: false,
+ defaultValue: 'storage',
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Storage (XHTML)', value: 'storage' },
+ { label: 'Atlas Document Format', value: 'atlas_doc_format' },
+ { label: 'View (rendered HTML)', value: 'view' },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { commentId, bodyFormat } = context.propsValue;
+ return await confluenceApi.getContent({
+ auth: context.auth,
+ contentType: 'footer-comments',
+ contentId: commentId,
+ query: { 'body-format': bodyFormat ?? 'storage' },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-inline-comment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-inline-comment.ts
new file mode 100644
index 00000000000..5f22860f18e
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-inline-comment.ts
@@ -0,0 +1,47 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetInlineCommentOutputSchema } from '../../output-schemas';
+
+export const getInlineCommentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_inline_comment',
+ outputSchema: confluenceGetInlineCommentOutputSchema,
+ displayName: 'Get Inline Comment',
+ description: 'Gets a inline comment by ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence inline comment by ID, with its body, version and the page, blog post or parent comment it belongs to.',
+ idempotent: true,
+ },
+ props: {
+ commentId: confluenceAiProps.commentId({ required: true }),
+ bodyFormat: Property.StaticDropdown({
+ displayName: 'Body Format',
+ description: 'Body representation to return. Defaults to storage (XHTML).',
+ required: false,
+ defaultValue: 'storage',
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Storage (XHTML)', value: 'storage' },
+ { label: 'Atlas Document Format', value: 'atlas_doc_format' },
+ { label: 'View (rendered HTML)', value: 'view' },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { commentId, bodyFormat } = context.propsValue;
+ return await confluenceApi.getContent({
+ auth: context.auth,
+ contentType: 'inline-comments',
+ contentId: commentId,
+ query: { 'body-format': bodyFormat ?? 'storage' },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-label.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-label.ts
new file mode 100644
index 00000000000..739cb939f05
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-label.ts
@@ -0,0 +1,61 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetLabelOutputSchema } from '../../output-schemas';
+
+export const getLabelAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_label',
+ outputSchema: confluenceGetLabelOutputSchema,
+ displayName: 'Get Label',
+ description: 'Looks up a label by name, with the content that uses it.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Looks up a Confluence label by name and returns its ID plus a page of the content carrying it. Use the label ID with List Pages for Label or List Blog Posts for Label.',
+ idempotent: true,
+ },
+ props: {
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'Label name, e.g. "release-notes".',
+ required: true,
+ }),
+ type: Property.StaticDropdown({
+ displayName: 'Content Type',
+ description: 'Only return content of this type.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Page', value: 'page' },
+ { label: 'Blog post', value: 'blogpost' },
+ { label: 'Attachment', value: 'attachment' },
+ { label: 'Page template', value: 'page_template' },
+ ],
+ },
+ }),
+ start: Property.Number({
+ displayName: 'Start',
+ description: 'Offset into the associated content. Defaults to 0.',
+ required: false,
+ }),
+ limit: Property.Number({
+ displayName: 'Limit',
+ description: 'Maximum associated content items to return (1-200). Defaults to 25.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { name, type, start, limit } = context.propsValue;
+ return await confluenceApi.getLabel({
+ auth: context.auth,
+ name,
+ type,
+ start,
+ limit: limit ?? 25,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-long-task.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-long-task.ts
new file mode 100644
index 00000000000..6a226ade42e
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-long-task.ts
@@ -0,0 +1,33 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetLongTaskOutputSchema } from '../../output-schemas';
+
+export const getLongTaskAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_long_task',
+ outputSchema: confluenceGetLongTaskOutputSchema,
+ displayName: 'Get Long Task Status',
+ description: 'Gets the status of a long-running task.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Reads the status of a long-running Confluence task once: percent complete, finished and successful flags, and any messages or errors. Use it with the task ID returned by Archive Pages or Delete Space; call it again until finished is true.',
+ idempotent: true,
+ },
+ props: {
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ description: 'Long task ID returned by Archive Pages or Delete Space.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await confluenceApi.getLongTask({
+ auth: context.auth,
+ taskId: context.propsValue.taskId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-page-like-count.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-page-like-count.ts
new file mode 100644
index 00000000000..5d12972cc84
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-page-like-count.ts
@@ -0,0 +1,30 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetBlogPostLikeCountOutputSchema } from '../../output-schemas';
+
+export const getPageLikeCountAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_page_like_count',
+ outputSchema: confluenceGetBlogPostLikeCountOutputSchema,
+ displayName: 'Get Page Like Count',
+ description: 'Gets how many likes a page has.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description: 'Returns the number of likes on a Confluence page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ },
+ async run(context) {
+ return await confluenceApi.getContentLikeCount({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: context.propsValue.pageId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-page-version.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-page-version.ts
new file mode 100644
index 00000000000..ce9cd5c7361
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-page-version.ts
@@ -0,0 +1,34 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetBlogPostVersionOutputSchema } from '../../output-schemas';
+
+export const getPageVersionAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_page_version',
+ outputSchema: confluenceGetBlogPostVersionOutputSchema,
+ displayName: 'Get Page Version',
+ description: 'Gets the details of one version of a page.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets the details of one version of a Confluence page: author, date, message, minor-edit flag and the neighbouring versions. Get version numbers from List Page Versions; use Get Page with Version to read that version body.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ versionNumber: confluenceAiProps.versionNumber({ required: true }),
+ },
+ async run(context) {
+ const { pageId, versionNumber } = context.propsValue;
+ return await confluenceApi.getContentVersion({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ versionNumber,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-page-viewers.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-page-viewers.ts
new file mode 100644
index 00000000000..b21967e9367
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-page-viewers.ts
@@ -0,0 +1,38 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetPageViewersOutputSchema } from '../../output-schemas';
+
+export const getPageViewersAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_page_viewers',
+ outputSchema: confluenceGetPageViewersOutputSchema,
+ displayName: 'Get Page Viewers',
+ description: 'Gets the number of distinct viewers of a page or blog post.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Returns the number of distinct viewers of a Confluence page or blog post, optionally counted from a start date. Needs a paid plan with analytics.',
+ idempotent: true,
+ },
+ props: {
+ contentId: confluenceAiProps.pageId({
+ required: true,
+ displayName: 'Content ID',
+ description: 'Numeric ID of the page or blog post, from List Pages or List Blog Posts.',
+ }),
+ fromDate: Property.ShortText({
+ displayName: 'From Date',
+ description:
+ 'Count from this date, in ISO 8601 format (e.g. 2026-01-01). Leave empty for all time.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { contentId, fromDate } = context.propsValue;
+ return await confluenceApi.getContentViewers({ auth: context.auth, contentId, fromDate });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-page-views.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-page-views.ts
new file mode 100644
index 00000000000..d4ab3750485
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-page-views.ts
@@ -0,0 +1,38 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetPageViewersOutputSchema } from '../../output-schemas';
+
+export const getPageViewsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_page_views',
+ outputSchema: confluenceGetPageViewersOutputSchema,
+ displayName: 'Get Page Views',
+ description: 'Gets the number of total views of a page or blog post.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Returns the number of total views of a Confluence page or blog post, optionally counted from a start date. Needs a paid plan with analytics.',
+ idempotent: true,
+ },
+ props: {
+ contentId: confluenceAiProps.pageId({
+ required: true,
+ displayName: 'Content ID',
+ description: 'Numeric ID of the page or blog post, from List Pages or List Blog Posts.',
+ }),
+ fromDate: Property.ShortText({
+ displayName: 'From Date',
+ description:
+ 'Count from this date, in ISO 8601 format (e.g. 2026-01-01). Leave empty for all time.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { contentId, fromDate } = context.propsValue;
+ return await confluenceApi.getContentViews({ auth: context.auth, contentId, fromDate });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-page.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-page.ts
new file mode 100644
index 00000000000..53a9511bbdf
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-page.ts
@@ -0,0 +1,77 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetPageOutputSchema } from '../../output-schemas';
+
+export const getPageAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_page',
+ outputSchema: confluenceGetPageOutputSchema,
+ displayName: 'Get Page',
+ description: 'Gets a page by ID, with its body.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence page by its numeric ID, including the body in the chosen format and optionally its labels, properties and versions. Use Get Page by URL when you only have a link, and List Page Descendants to read its sub-pages.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ bodyFormat: Property.StaticDropdown({
+ displayName: 'Body Format',
+ description: 'Body representation to return. Defaults to storage (XHTML).',
+ required: false,
+ defaultValue: 'storage',
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Storage (XHTML)', value: 'storage' },
+ { label: 'Atlas Document Format', value: 'atlas_doc_format' },
+ { label: 'View (rendered HTML)', value: 'view' },
+ { label: 'Export view', value: 'export_view' },
+ { label: 'Styled view', value: 'styled_view' },
+ ],
+ },
+ }),
+ getDraft: Property.Checkbox({
+ displayName: 'Get Draft',
+ description: 'Return the unpublished draft of the page instead of the published version.',
+ required: false,
+ }),
+ version: Property.Number({
+ displayName: 'Version',
+ description: 'Return this historical version number instead of the latest.',
+ required: false,
+ }),
+ includeLabels: Property.Checkbox({ displayName: 'Include Labels', required: false }),
+ includeProperties: Property.Checkbox({ displayName: 'Include Properties', required: false }),
+ includeVersions: Property.Checkbox({ displayName: 'Include Versions', required: false }),
+ },
+ async run(context) {
+ const {
+ pageId,
+ bodyFormat,
+ getDraft,
+ version,
+ includeLabels,
+ includeProperties,
+ includeVersions,
+ } = context.propsValue;
+ return await confluenceApi.getContent({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ query: {
+ 'body-format': bodyFormat ?? 'storage',
+ 'get-draft': getDraft || undefined,
+ version,
+ 'include-labels': includeLabels || undefined,
+ 'include-properties': includeProperties || undefined,
+ 'include-versions': includeVersions || undefined,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-space.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-space.ts
new file mode 100644
index 00000000000..10e405b092f
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-space.ts
@@ -0,0 +1,39 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetSpaceOutputSchema } from '../../output-schemas';
+
+export const getSpaceAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_space',
+ outputSchema: confluenceGetSpaceOutputSchema,
+ displayName: 'Get Space',
+ description: 'Gets a space by its numeric ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence space by its numeric ID, with its key, name, type, status, homepage ID and plain-text description. Use List Spaces with Space Keys to find a space by key.',
+ idempotent: true,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ includeLabels: Property.Checkbox({ displayName: 'Include Labels', required: false }),
+ includeProperties: Property.Checkbox({ displayName: 'Include Properties', required: false }),
+ },
+ async run(context) {
+ const { spaceId, includeLabels, includeProperties } = context.propsValue;
+ return await confluenceApi.getContent({
+ auth: context.auth,
+ contentType: 'spaces',
+ contentId: spaceId,
+ query: {
+ 'description-format': 'plain',
+ 'include-labels': includeLabels || undefined,
+ 'include-properties': includeProperties || undefined,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-task.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-task.ts
new file mode 100644
index 00000000000..a929ac4583c
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-task.ts
@@ -0,0 +1,34 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetTaskOutputSchema } from '../../output-schemas';
+
+export const getTaskAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_task',
+ outputSchema: confluenceGetTaskOutputSchema,
+ displayName: 'Get Task',
+ description: 'Gets an inline task by ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence inline task by ID: its status, body, page or blog post, assignee and dates.',
+ idempotent: true,
+ },
+ props: {
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ description: 'Numeric task ID, from List Tasks.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await confluenceApi.getTask({
+ auth: context.auth,
+ taskId: context.propsValue.taskId,
+ bodyFormat: 'storage',
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-template.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-template.ts
new file mode 100644
index 00000000000..b2eb3c54c6d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-template.ts
@@ -0,0 +1,33 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetTemplateOutputSchema } from '../../output-schemas';
+
+export const getTemplateAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_template',
+ outputSchema: confluenceGetTemplateOutputSchema,
+ displayName: 'Get Template',
+ description: 'Gets a page template, with its body.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence page template by ID, including its storage-format body with any template variables. Get template IDs from List Templates.',
+ idempotent: true,
+ },
+ props: {
+ templateId: Property.ShortText({
+ displayName: 'Template ID',
+ description: 'Template ID, from List Templates.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await confluenceApi.getTemplateDetails({
+ auth: context.auth,
+ templateId: context.propsValue.templateId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-user.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-user.ts
new file mode 100644
index 00000000000..23b44347979
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-user.ts
@@ -0,0 +1,33 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceGetCurrentUserOutputSchema } from '../../output-schemas';
+
+export const getUserAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_user',
+ outputSchema: confluenceGetCurrentUserOutputSchema,
+ displayName: 'Get User',
+ description: 'Gets a user by account ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence user by Atlassian account ID: display name, public name, email (when visible), time zone and account status. Use Find User to search by name or email.',
+ idempotent: true,
+ },
+ props: {
+ accountId: Property.ShortText({
+ displayName: 'Account ID',
+ description: 'Atlassian account ID, e.g. from a page authorId or Find User.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await confluenceApi.getUser({
+ auth: context.auth,
+ accountId: context.propsValue.accountId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/get-whiteboard.ts b/packages/pieces/community/confluence/src/lib/actions/ai/get-whiteboard.ts
new file mode 100644
index 00000000000..9f45a38b31a
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/get-whiteboard.ts
@@ -0,0 +1,34 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateFolderOutputSchema } from '../../output-schemas';
+
+export const getWhiteboardAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_get_whiteboard',
+ outputSchema: confluenceCreateFolderOutputSchema,
+ displayName: 'Get Whiteboard',
+ description: 'Gets a whiteboard by ID.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one Confluence whiteboard by ID, with its title, space, parent, owner and version.',
+ idempotent: true,
+ },
+ props: {
+ whiteboardId: Property.ShortText({
+ displayName: 'Whiteboard ID',
+ description: 'Numeric whiteboard ID, from Create Whiteboard or List Child Content.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ return await confluenceApi.getContent({
+ auth: context.auth,
+ contentType: 'whiteboards',
+ contentId: context.propsValue.whiteboardId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/index.ts b/packages/pieces/community/confluence/src/lib/actions/ai/index.ts
new file mode 100644
index 00000000000..4d5b79698eb
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/index.ts
@@ -0,0 +1,207 @@
+import { addLabelsAction } from './add-labels';
+import { addSpaceLabelsAction } from './add-space-labels';
+import { archivePagesAction } from './archive-pages';
+import { copyPageAction } from './copy-page';
+import { createBlogPostAction } from './create-blog-post';
+import { createBlogPostPropertyAction } from './create-blog-post-property';
+import { createFolderAction } from './create-folder';
+import { createFooterCommentAction } from './create-footer-comment';
+import { createInlineCommentAction } from './create-inline-comment';
+import { createPageAction } from './create-page';
+import { createPagePropertyAction } from './create-page-property';
+import { createSpaceAction } from './create-space';
+import { createSpacePropertyAction } from './create-space-property';
+import { createWhiteboardAction } from './create-whiteboard';
+import { createWhiteboardPropertyAction } from './create-whiteboard-property';
+import { deleteAttachmentAction } from './delete-attachment';
+import { deleteBlogPostAction } from './delete-blog-post';
+import { deleteBlogPostPropertyAction } from './delete-blog-post-property';
+import { deleteFolderAction } from './delete-folder';
+import { deleteFooterCommentAction } from './delete-footer-comment';
+import { deleteInlineCommentAction } from './delete-inline-comment';
+import { deletePageAction } from './delete-page';
+import { deletePagePropertyAction } from './delete-page-property';
+import { deleteSpaceAction } from './delete-space';
+import { deleteSpacePropertyAction } from './delete-space-property';
+import { deleteWhiteboardAction } from './delete-whiteboard';
+import { deleteWhiteboardPropertyAction } from './delete-whiteboard-property';
+import { getAttachmentAction } from './get-attachment';
+import { getBlogPostAction } from './get-blog-post';
+import { getBlogPostLikeCountAction } from './get-blog-post-like-count';
+import { getBlogPostVersionAction } from './get-blog-post-version';
+import { getContentRestrictionsAction } from './get-content-restrictions';
+import { getCurrentUserAction } from './get-current-user';
+import { getFolderAction } from './get-folder';
+import { getFooterCommentAction } from './get-footer-comment';
+import { getInlineCommentAction } from './get-inline-comment';
+import { getLabelAction } from './get-label';
+import { getLongTaskAction } from './get-long-task';
+import { getPageAction } from './get-page';
+import { getPageLikeCountAction } from './get-page-like-count';
+import { getPageVersionAction } from './get-page-version';
+import { getPageViewersAction } from './get-page-viewers';
+import { getPageViewsAction } from './get-page-views';
+import { getSpaceAction } from './get-space';
+import { getTaskAction } from './get-task';
+import { getTemplateAction } from './get-template';
+import { getUserAction } from './get-user';
+import { getWhiteboardAction } from './get-whiteboard';
+import { listAttachmentCommentsAction } from './list-attachment-comments';
+import { listAttachmentLabelsAction } from './list-attachment-labels';
+import { listAuditRecordsAction } from './list-audit-records';
+import { listBlogPostAttachmentsAction } from './list-blog-post-attachments';
+import { listBlogPostFooterCommentsAction } from './list-blog-post-footer-comments';
+import { listBlogPostInlineCommentsAction } from './list-blog-post-inline-comments';
+import { listBlogPostLabelsAction } from './list-blog-post-labels';
+import { listBlogPostOperationsAction } from './list-blog-post-operations';
+import { listBlogPostPropertiesAction } from './list-blog-post-properties';
+import { listBlogPostVersionsAction } from './list-blog-post-versions';
+import { listBlogPostsAction } from './list-blog-posts';
+import { listBlogPostsForLabelAction } from './list-blog-posts-for-label';
+import { listChildPagesAction } from './list-child-pages';
+import { listFolderChildrenAction } from './list-folder-children';
+import { listFooterCommentRepliesAction } from './list-footer-comment-replies';
+import { listGroupMembersAction } from './list-group-members';
+import { listGroupsAction } from './list-groups';
+import { listInlineCommentRepliesAction } from './list-inline-comment-replies';
+import { listLabelsAction } from './list-labels';
+import { listPageAncestorsAction } from './list-page-ancestors';
+import { listPageAttachmentsAction } from './list-page-attachments';
+import { listPageDescendantsAction } from './list-page-descendants';
+import { listPageFooterCommentsAction } from './list-page-footer-comments';
+import { listPageInlineCommentsAction } from './list-page-inline-comments';
+import { listPageLabelsAction } from './list-page-labels';
+import { listPageOperationsAction } from './list-page-operations';
+import { listPagePropertiesAction } from './list-page-properties';
+import { listPageVersionsAction } from './list-page-versions';
+import { listPagesAction } from './list-pages';
+import { listPagesForLabelAction } from './list-pages-for-label';
+import { listSpaceContentLabelsAction } from './list-space-content-labels';
+import { listSpaceLabelsAction } from './list-space-labels';
+import { listSpacePropertiesAction } from './list-space-properties';
+import { listSpacesAction } from './list-spaces';
+import { listTasksAction } from './list-tasks';
+import { listTemplatesAction } from './list-templates';
+import { listWhiteboardPropertiesAction } from './list-whiteboard-properties';
+import { movePageAction } from './move-page';
+import { removeLabelAction } from './remove-label';
+import { removeSpaceLabelAction } from './remove-space-label';
+import { restorePageVersionAction } from './restore-page-version';
+import { searchContentAction } from './search-content';
+import { updateBlogPostAction } from './update-blog-post';
+import { updateBlogPostPropertyAction } from './update-blog-post-property';
+import { updateFooterCommentAction } from './update-footer-comment';
+import { updateInlineCommentAction } from './update-inline-comment';
+import { updatePageAction } from './update-page';
+import { updatePagePropertyAction } from './update-page-property';
+import { updatePageTitleAction } from './update-page-title';
+import { updateSpaceAction } from './update-space';
+import { updateSpacePropertyAction } from './update-space-property';
+import { updateTaskAction } from './update-task';
+import { updateWhiteboardPropertyAction } from './update-whiteboard-property';
+import { uploadAttachmentAction } from './upload-attachment';
+
+export const confluenceAiActions = [
+ addLabelsAction,
+ addSpaceLabelsAction,
+ archivePagesAction,
+ copyPageAction,
+ createBlogPostPropertyAction,
+ createBlogPostAction,
+ createFolderAction,
+ createFooterCommentAction,
+ createInlineCommentAction,
+ createPagePropertyAction,
+ createPageAction,
+ createSpacePropertyAction,
+ createSpaceAction,
+ createWhiteboardPropertyAction,
+ createWhiteboardAction,
+ deleteAttachmentAction,
+ deleteBlogPostPropertyAction,
+ deleteBlogPostAction,
+ deleteFolderAction,
+ deleteFooterCommentAction,
+ deleteInlineCommentAction,
+ deletePagePropertyAction,
+ deletePageAction,
+ deleteSpacePropertyAction,
+ deleteSpaceAction,
+ deleteWhiteboardPropertyAction,
+ deleteWhiteboardAction,
+ getAttachmentAction,
+ getBlogPostLikeCountAction,
+ getBlogPostVersionAction,
+ getBlogPostAction,
+ getContentRestrictionsAction,
+ getCurrentUserAction,
+ getFolderAction,
+ getFooterCommentAction,
+ getInlineCommentAction,
+ getLabelAction,
+ getLongTaskAction,
+ getPageLikeCountAction,
+ getPageVersionAction,
+ getPageViewersAction,
+ getPageViewsAction,
+ getPageAction,
+ getSpaceAction,
+ getTaskAction,
+ getTemplateAction,
+ getUserAction,
+ getWhiteboardAction,
+ listAttachmentCommentsAction,
+ listAttachmentLabelsAction,
+ listAuditRecordsAction,
+ listBlogPostAttachmentsAction,
+ listBlogPostFooterCommentsAction,
+ listBlogPostInlineCommentsAction,
+ listBlogPostLabelsAction,
+ listBlogPostOperationsAction,
+ listBlogPostPropertiesAction,
+ listBlogPostVersionsAction,
+ listBlogPostsForLabelAction,
+ listBlogPostsAction,
+ listChildPagesAction,
+ listFolderChildrenAction,
+ listFooterCommentRepliesAction,
+ listGroupMembersAction,
+ listGroupsAction,
+ listInlineCommentRepliesAction,
+ listLabelsAction,
+ listPageAncestorsAction,
+ listPageAttachmentsAction,
+ listPageDescendantsAction,
+ listPageFooterCommentsAction,
+ listPageInlineCommentsAction,
+ listPageLabelsAction,
+ listPageOperationsAction,
+ listPagePropertiesAction,
+ listPageVersionsAction,
+ listPagesForLabelAction,
+ listPagesAction,
+ listSpaceContentLabelsAction,
+ listSpaceLabelsAction,
+ listSpacePropertiesAction,
+ listSpacesAction,
+ listTasksAction,
+ listTemplatesAction,
+ listWhiteboardPropertiesAction,
+ movePageAction,
+ removeLabelAction,
+ removeSpaceLabelAction,
+ restorePageVersionAction,
+ searchContentAction,
+ updateBlogPostPropertyAction,
+ updateBlogPostAction,
+ updateFooterCommentAction,
+ updateInlineCommentAction,
+ updatePagePropertyAction,
+ updatePageTitleAction,
+ updatePageAction,
+ updateSpacePropertyAction,
+ updateSpaceAction,
+ updateTaskAction,
+ updateWhiteboardPropertyAction,
+ uploadAttachmentAction,
+];
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-attachment-comments.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-attachment-comments.ts
new file mode 100644
index 00000000000..0a968d88f2c
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-attachment-comments.ts
@@ -0,0 +1,49 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListAttachmentCommentsOutputSchema } from '../../output-schemas';
+
+export const listAttachmentCommentsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_attachment_comments',
+ outputSchema: confluenceListAttachmentCommentsOutputSchema,
+ displayName: 'List Attachment Comments',
+ description: 'Lists the comments on an attachment.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the footer comments on a Confluence attachment, with their bodies. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ attachmentId: confluenceAiProps.attachmentId({ required: true }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { attachmentId, bodyFormat, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'attachments',
+ contentId: attachmentId,
+ relation: 'footer-comments',
+ query: { 'body-format': bodyFormat ?? 'storage', sort, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-attachment-labels.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-attachment-labels.ts
new file mode 100644
index 00000000000..ce03507e4f2
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-attachment-labels.ts
@@ -0,0 +1,36 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListAttachmentLabelsOutputSchema } from '../../output-schemas';
+
+export const listAttachmentLabelsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_attachment_labels',
+ outputSchema: confluenceListAttachmentLabelsOutputSchema,
+ displayName: 'List Attachment Labels',
+ description: 'Lists the labels on an attachment.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the labels on a Confluence attachment. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ attachmentId: confluenceAiProps.attachmentId({ required: true }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { attachmentId, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'attachments',
+ contentId: attachmentId,
+ relation: 'labels',
+ query: { limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-audit-records.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-audit-records.ts
new file mode 100644
index 00000000000..834c84cdc8e
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-audit-records.ts
@@ -0,0 +1,55 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceListAuditRecordsOutputSchema } from '../../output-schemas';
+
+export const listAuditRecordsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_audit_records',
+ outputSchema: confluenceListAuditRecordsOutputSchema,
+ displayName: 'List Audit Records',
+ description: 'Lists site audit records, optionally by date range or text.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists Confluence audit log records (who changed what, and when), optionally within a date range or matching a search string. Needs Confluence admin and a paid plan. Page with Start and Limit.',
+ idempotent: true,
+ },
+ props: {
+ startDate: Property.ShortText({
+ displayName: 'Start Date',
+ description:
+ 'Earliest record, as epoch milliseconds or ISO 8601 (e.g. 2026-01-01T00:00:00Z).',
+ required: false,
+ }),
+ endDate: Property.ShortText({
+ displayName: 'End Date',
+ description: 'Latest record, as epoch milliseconds or ISO 8601.',
+ required: false,
+ }),
+ searchString: Property.ShortText({
+ displayName: 'Search',
+ description: 'Only records whose summary, author or affected object contains this text.',
+ required: false,
+ }),
+ start: Property.Number({
+ displayName: 'Start',
+ description: 'Offset of the first item (0-based). Defaults to 0.',
+ required: false,
+ }),
+ limit: Property.Number({
+ displayName: 'Limit',
+ description: 'Maximum number of items to return. Defaults to 25.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { startDate, endDate, searchString, start, limit } = context.propsValue;
+ return await confluenceApi.listAuditRecords({
+ auth: context.auth,
+ query: { startDate, endDate, searchString, start, limit: limit ?? 25 },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-attachments.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-attachments.ts
new file mode 100644
index 00000000000..a42bba501ec
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-attachments.ts
@@ -0,0 +1,46 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostAttachmentsOutputSchema } from '../../output-schemas';
+
+export const listBlogPostAttachmentsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_post_attachments',
+ outputSchema: confluenceListBlogPostAttachmentsOutputSchema,
+ displayName: 'List Blog Post Attachments',
+ description: 'Lists the attachments of a blog post.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the attachments of a Confluence blog post, optionally filtered by filename or media type. Use the attachment ID with Get Attachment or Download Attachment. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ filename: Property.ShortText({
+ displayName: 'Filename',
+ description: 'Only attachments with this filename.',
+ required: false,
+ }),
+ mediaType: Property.ShortText({
+ displayName: 'Media Type',
+ description: 'Only attachments of this media type, e.g. image/png.',
+ required: false,
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { blogPostId, filename, mediaType, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ relation: 'attachments',
+ query: { filename, mediaType, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-footer-comments.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-footer-comments.ts
new file mode 100644
index 00000000000..4059e956dd4
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-footer-comments.ts
@@ -0,0 +1,49 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostFooterCommentsOutputSchema } from '../../output-schemas';
+
+export const listBlogPostFooterCommentsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_post_footer_comments',
+ outputSchema: confluenceListBlogPostFooterCommentsOutputSchema,
+ displayName: 'List Blog Post Footer Comments',
+ description: 'Lists the footer on a blog post.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the top-level footer (bottom-of-page) comments on a Confluence blog post with their bodies. Use the comment IDs to reply, update or delete. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { blogPostId, bodyFormat, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ relation: 'footer-comments',
+ query: { 'body-format': bodyFormat ?? 'storage', sort, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-inline-comments.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-inline-comments.ts
new file mode 100644
index 00000000000..fbf0a5f56c1
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-inline-comments.ts
@@ -0,0 +1,69 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostInlineCommentsOutputSchema } from '../../output-schemas';
+
+export const listBlogPostInlineCommentsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_post_inline_comments',
+ outputSchema: confluenceListBlogPostInlineCommentsOutputSchema,
+ displayName: 'List Blog Post Inline Comments',
+ description: 'Lists the inline comments on a blog post.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the top-level inline comments (attached to highlighted text) on a Confluence blog post with their bodies. Use the comment IDs to reply, update or delete. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ resolutionStatus: Property.StaticDropdown({
+ displayName: 'Resolution Status',
+ description: 'Only comments with this resolution status.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Open', value: 'open' },
+ { label: 'Resolved', value: 'resolved' },
+ { label: 'Reopened', value: 'reopened' },
+ { label: 'Dangling (highlighted text removed)', value: 'dangling' },
+ ],
+ },
+ }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { blogPostId, bodyFormat, sort, limit, cursor, resolutionStatus } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ relation: 'inline-comments',
+ query: {
+ 'body-format': bodyFormat ?? 'storage',
+ sort,
+ 'resolution-status': resolutionStatus,
+ limit,
+ cursor,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-labels.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-labels.ts
new file mode 100644
index 00000000000..966470cc637
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-labels.ts
@@ -0,0 +1,50 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListAttachmentLabelsOutputSchema } from '../../output-schemas';
+
+export const listBlogPostLabelsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_post_labels',
+ outputSchema: confluenceListAttachmentLabelsOutputSchema,
+ displayName: 'List Blog Post Labels',
+ description: 'Lists the labels on a blog post.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the labels on a Confluence blog post, optionally filtered by prefix. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ prefix: Property.StaticDropdown({
+ displayName: 'Prefix',
+ description: 'Only labels with this prefix.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Global', value: 'global' },
+ { label: 'My (personal)', value: 'my' },
+ { label: 'Team', value: 'team' },
+ { label: 'System', value: 'system' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { blogPostId, prefix, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ relation: 'labels',
+ query: { prefix, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-operations.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-operations.ts
new file mode 100644
index 00000000000..bd312c3e3cf
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-operations.ts
@@ -0,0 +1,31 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostOperationsOutputSchema } from '../../output-schemas';
+
+export const listBlogPostOperationsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_post_operations',
+ outputSchema: confluenceListBlogPostOperationsOutputSchema,
+ displayName: 'List Blog Post Permitted Operations',
+ description: 'Lists what the connected user may do on a blog post.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Lists the operations (read, update, delete and so on) the connected user is permitted to perform on a Confluence blog post. Use it to check access before trying a write.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ },
+ async run(context) {
+ return await confluenceApi.listContentOperations({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: context.propsValue.blogPostId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-properties.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-properties.ts
new file mode 100644
index 00000000000..d9a0ab6552d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-properties.ts
@@ -0,0 +1,40 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostPropertiesOutputSchema } from '../../output-schemas';
+
+export const listBlogPostPropertiesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_post_properties',
+ outputSchema: confluenceListBlogPostPropertiesOutputSchema,
+ displayName: 'List Blog Post Properties',
+ description: 'Lists the content properties stored on a blog post.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the content properties (key/value JSON metadata) stored on a Confluence blog post, optionally filtered by key. Each result has the property ID and version that Update Blog Post Property needs. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ key: confluenceAiProps.propertyKey({
+ required: false,
+ description: 'Only the property with this key.',
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { blogPostId, key, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ relation: 'properties',
+ query: { key, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-versions.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-versions.ts
new file mode 100644
index 00000000000..7d3acf18d86
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-post-versions.ts
@@ -0,0 +1,48 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostVersionsOutputSchema } from '../../output-schemas';
+
+export const listBlogPostVersionsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_post_versions',
+ outputSchema: confluenceListBlogPostVersionsOutputSchema,
+ displayName: 'List Blog Post Versions',
+ description: 'Lists the version history of a blog post.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the versions of a Confluence blog post with their number, author, date and message. Use the version number with Get Blog Post Version or Restore Page Version. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-modified-date' },
+ { label: 'Oldest first', value: 'modified-date' },
+ ],
+ },
+ }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { blogPostId, sort, bodyFormat, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ relation: 'versions',
+ query: { sort, 'body-format': bodyFormat, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-posts-for-label.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-posts-for-label.ts
new file mode 100644
index 00000000000..4108b692f3d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-posts-for-label.ts
@@ -0,0 +1,57 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostsForLabelOutputSchema } from '../../output-schemas';
+
+export const listBlogPostsForLabelAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_posts_for_label',
+ outputSchema: confluenceListBlogPostsForLabelOutputSchema,
+ displayName: 'List Blog Posts for Label',
+ description: 'Lists the blog posts that carry a label.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the Confluence blog posts that carry a label, optionally limited to a space. Get the numeric label ID from Get Label or List Labels. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ labelId: Property.ShortText({
+ displayName: 'Label ID',
+ description: 'Numeric label ID, from Get Label or List Labels.',
+ required: true,
+ }),
+ spaceId: confluenceAiProps.spaceId({
+ required: false,
+ description: 'Only content in this space. Numeric space ID from List Spaces.',
+ }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { labelId, spaceId, bodyFormat, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'labels',
+ contentId: labelId,
+ relation: 'blogposts',
+ query: { 'space-id': spaceId, 'body-format': bodyFormat, sort, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-posts.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-posts.ts
new file mode 100644
index 00000000000..faa2fd9195c
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-blog-posts.ts
@@ -0,0 +1,68 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostsOutputSchema } from '../../output-schemas';
+
+export const listBlogPostsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_blog_posts',
+ outputSchema: confluenceListBlogPostsOutputSchema,
+ displayName: 'List Blog Posts',
+ description: 'Lists blog posts, optionally filtered by space, title or status.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists Confluence blog posts one page of results at a time, filtered by space ID, exact title and status. Use Search Content for full-text queries. Pass nextCursor back as Cursor, with the same filters, to get the next page.',
+ idempotent: true,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({
+ required: false,
+ description:
+ 'Only blog posts in this space. Numeric space ID from List Spaces; several IDs may be comma-separated.',
+ }),
+ title: Property.ShortText({
+ displayName: 'Title',
+ description: 'Only blog posts with exactly this title.',
+ required: false,
+ }),
+ status: Property.StaticDropdown({
+ displayName: 'Status',
+ description: 'Only blog posts with this status. Defaults to current.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Current', value: 'current' },
+ { label: 'Trashed', value: 'trashed' },
+ { label: 'Deleted', value: 'deleted' },
+ ],
+ },
+ }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { spaceId, title, status, sort, bodyFormat, limit, cursor } = context.propsValue;
+ return await confluenceApi.listBlogPostsPage({
+ auth: context.auth,
+ query: { 'space-id': spaceId, title, status, sort, 'body-format': bodyFormat, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-child-pages.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-child-pages.ts
new file mode 100644
index 00000000000..68a939eb60e
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-child-pages.ts
@@ -0,0 +1,36 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListChildPagesOutputSchema } from '../../output-schemas';
+
+export const listChildPagesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_child_pages',
+ outputSchema: confluenceListChildPagesOutputSchema,
+ displayName: 'List Child Content',
+ description: 'Lists the direct children of a page.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the direct children of a Confluence page: child pages, folders, whiteboards and other content, each with its type. Use List Page Descendants for the whole sub-tree. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { pageId, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'direct-children',
+ query: { limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-folder-children.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-folder-children.ts
new file mode 100644
index 00000000000..ddcaa979123
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-folder-children.ts
@@ -0,0 +1,40 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListChildPagesOutputSchema } from '../../output-schemas';
+
+export const listFolderChildrenAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_folder_children',
+ outputSchema: confluenceListChildPagesOutputSchema,
+ displayName: 'List Folder Children',
+ description: 'Lists the direct children of a folder.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the direct children of a Confluence folder: pages, folders, whiteboards and other content, each with its type. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ folderId: Property.ShortText({
+ displayName: 'Folder ID',
+ description: 'Numeric folder ID, from Create Folder or List Child Content.',
+ required: true,
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { folderId, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'folders',
+ contentId: folderId,
+ relation: 'direct-children',
+ query: { limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-footer-comment-replies.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-footer-comment-replies.ts
new file mode 100644
index 00000000000..649063e10f6
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-footer-comment-replies.ts
@@ -0,0 +1,49 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListFooterCommentRepliesOutputSchema } from '../../output-schemas';
+
+export const listFooterCommentRepliesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_footer_comment_replies',
+ outputSchema: confluenceListFooterCommentRepliesOutputSchema,
+ displayName: 'List Footer Comment Replies',
+ description: 'Lists the replies to a footer comment.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the direct replies to a Confluence footer comment, with their bodies. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ commentId: confluenceAiProps.commentId({ required: true }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { commentId, bodyFormat, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'footer-comments',
+ contentId: commentId,
+ relation: 'children',
+ query: { 'body-format': bodyFormat ?? 'storage', sort, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-group-members.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-group-members.ts
new file mode 100644
index 00000000000..994ffd2f0fd
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-group-members.ts
@@ -0,0 +1,45 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceListGroupMembersOutputSchema } from '../../output-schemas';
+
+export const listGroupMembersAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_group_members',
+ outputSchema: confluenceListGroupMembersOutputSchema,
+ displayName: 'List Group Members',
+ description: 'Lists the members of a group.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the users in a Confluence group with their account IDs and names. Get the group ID from List Groups. Page with Start and Limit.',
+ idempotent: true,
+ },
+ props: {
+ groupId: Property.ShortText({
+ displayName: 'Group ID',
+ description: 'Group ID, from List Groups.',
+ required: true,
+ }),
+ start: Property.Number({
+ displayName: 'Start',
+ description: 'Offset of the first item (0-based). Defaults to 0.',
+ required: false,
+ }),
+ limit: Property.Number({
+ displayName: 'Limit',
+ description: 'Maximum number of items to return. Defaults to 25.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { groupId, start, limit } = context.propsValue;
+ return await confluenceApi.listGroupMembers({
+ auth: context.auth,
+ groupId,
+ query: { start, limit: limit ?? 25 },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-groups.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-groups.ts
new file mode 100644
index 00000000000..3d401717866
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-groups.ts
@@ -0,0 +1,39 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceListGroupsOutputSchema } from '../../output-schemas';
+
+export const listGroupsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_groups',
+ outputSchema: confluenceListGroupsOutputSchema,
+ displayName: 'List Groups',
+ description: 'Lists the user groups on the site.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the user groups on the Confluence site with their IDs and names. Use the group ID with List Group Members. Page with Start and Limit.',
+ idempotent: true,
+ },
+ props: {
+ start: Property.Number({
+ displayName: 'Start',
+ description: 'Offset of the first item (0-based). Defaults to 0.',
+ required: false,
+ }),
+ limit: Property.Number({
+ displayName: 'Limit',
+ description: 'Maximum number of items to return. Defaults to 25.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { start, limit } = context.propsValue;
+ return await confluenceApi.listGroups({
+ auth: context.auth,
+ query: { start, limit: limit ?? 25 },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-inline-comment-replies.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-inline-comment-replies.ts
new file mode 100644
index 00000000000..60739f6421e
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-inline-comment-replies.ts
@@ -0,0 +1,49 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListInlineCommentRepliesOutputSchema } from '../../output-schemas';
+
+export const listInlineCommentRepliesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_inline_comment_replies',
+ outputSchema: confluenceListInlineCommentRepliesOutputSchema,
+ displayName: 'List Inline Comment Replies',
+ description: 'Lists the replies to a inline comment.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the direct replies to a Confluence inline comment, with their bodies. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ commentId: confluenceAiProps.commentId({ required: true }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { commentId, bodyFormat, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'inline-comments',
+ contentId: commentId,
+ relation: 'children',
+ query: { 'body-format': bodyFormat ?? 'storage', sort, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-labels.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-labels.ts
new file mode 100644
index 00000000000..cd04bcf1aab
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-labels.ts
@@ -0,0 +1,46 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListAttachmentLabelsOutputSchema } from '../../output-schemas';
+
+export const listLabelsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_labels',
+ outputSchema: confluenceListAttachmentLabelsOutputSchema,
+ displayName: 'List Labels',
+ description: 'Lists the labels used on the site.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists labels on the Confluence site with their IDs, optionally filtered by prefix. Use Get Label to look one up by name, and the label ID with List Pages for Label. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ prefix: Property.StaticDropdown({
+ displayName: 'Prefix',
+ description: 'Only labels with this prefix.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Global', value: 'global' },
+ { label: 'My (personal)', value: 'my' },
+ { label: 'Team', value: 'team' },
+ { label: 'System', value: 'system' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { prefix, limit, cursor } = context.propsValue;
+ return await confluenceApi.listLabelsPage({
+ auth: context.auth,
+ query: { prefix, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-ancestors.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-ancestors.ts
new file mode 100644
index 00000000000..d346696fa4d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-ancestors.ts
@@ -0,0 +1,35 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPageAncestorsOutputSchema } from '../../output-schemas';
+
+export const listPageAncestorsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_ancestors',
+ outputSchema: confluenceListPageAncestorsOutputSchema,
+ displayName: 'List Page Ancestors',
+ description: 'Lists the ancestors of a page, from the top of the tree down.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the ancestors (parent, grandparent and up) of a Confluence page, ordered from the top of the tree down to the direct parent. Use it to show where a page sits in its space.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ limit: confluenceAiProps.limit({ required: false }),
+ },
+ async run(context) {
+ const { pageId, limit } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'ancestors',
+ query: { limit },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-attachments.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-attachments.ts
new file mode 100644
index 00000000000..00202a6d141
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-attachments.ts
@@ -0,0 +1,58 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPageAttachmentsOutputSchema } from '../../output-schemas';
+
+export const listPageAttachmentsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_attachments',
+ outputSchema: confluenceListPageAttachmentsOutputSchema,
+ displayName: 'List Page Attachments',
+ description: 'Lists the attachments of a page.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the attachments of a Confluence page, optionally filtered by filename or media type. Use the attachment ID with Get Attachment, Download Attachment or Delete Attachment. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ filename: Property.ShortText({
+ displayName: 'Filename',
+ description: 'Only attachments with this filename.',
+ required: false,
+ }),
+ mediaType: Property.ShortText({
+ displayName: 'Media Type',
+ description: 'Only attachments of this media type, e.g. image/png.',
+ required: false,
+ }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { pageId, filename, mediaType, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'attachments',
+ query: { filename, mediaType, sort, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-descendants.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-descendants.ts
new file mode 100644
index 00000000000..f3f5ee9ac77
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-descendants.ts
@@ -0,0 +1,41 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPageDescendantsOutputSchema } from '../../output-schemas';
+
+export const listPageDescendantsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_descendants',
+ outputSchema: confluenceListPageDescendantsOutputSchema,
+ displayName: 'List Page Descendants',
+ description: 'Lists all content below a page, up to a depth.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists every piece of content below a Confluence page (children, grandchildren and so on) up to the given depth, each with its type, depth and parent ID. Use List Child Content for direct children only. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ depth: Property.Number({
+ displayName: 'Depth',
+ description: 'How many levels below the page to include (1-5). Defaults to 5.',
+ required: false,
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { pageId, depth, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'descendants',
+ query: { depth, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-footer-comments.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-footer-comments.ts
new file mode 100644
index 00000000000..8d2a930d453
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-footer-comments.ts
@@ -0,0 +1,49 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPageFooterCommentsOutputSchema } from '../../output-schemas';
+
+export const listPageFooterCommentsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_footer_comments',
+ outputSchema: confluenceListPageFooterCommentsOutputSchema,
+ displayName: 'List Page Footer Comments',
+ description: 'Lists the footer comments on a page.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the top-level footer comments on a Confluence page, with their bodies. Use List Footer Comment Replies for the replies under a comment. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { pageId, bodyFormat, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'footer-comments',
+ query: { 'body-format': bodyFormat ?? 'storage', sort, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-inline-comments.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-inline-comments.ts
new file mode 100644
index 00000000000..a866c203622
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-inline-comments.ts
@@ -0,0 +1,69 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPageInlineCommentsOutputSchema } from '../../output-schemas';
+
+export const listPageInlineCommentsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_inline_comments',
+ outputSchema: confluenceListPageInlineCommentsOutputSchema,
+ displayName: 'List Page Inline Comments',
+ description: 'Lists the inline comments on a page.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the top-level inline comments on a Confluence page, with their bodies. Use List Inline Comment Replies for the replies under a comment. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ resolutionStatus: Property.StaticDropdown({
+ displayName: 'Resolution Status',
+ description: 'Only comments with this resolution status.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Open', value: 'open' },
+ { label: 'Resolved', value: 'resolved' },
+ { label: 'Reopened', value: 'reopened' },
+ { label: 'Dangling (highlighted text removed)', value: 'dangling' },
+ ],
+ },
+ }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { pageId, bodyFormat, sort, limit, cursor, resolutionStatus } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'inline-comments',
+ query: {
+ 'body-format': bodyFormat ?? 'storage',
+ sort,
+ 'resolution-status': resolutionStatus,
+ limit,
+ cursor,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-labels.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-labels.ts
new file mode 100644
index 00000000000..e5bb082e957
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-labels.ts
@@ -0,0 +1,50 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListAttachmentLabelsOutputSchema } from '../../output-schemas';
+
+export const listPageLabelsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_labels',
+ outputSchema: confluenceListAttachmentLabelsOutputSchema,
+ displayName: 'List Page Labels',
+ description: 'Lists the labels on a page.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the labels on a Confluence page, optionally filtered by prefix. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ prefix: Property.StaticDropdown({
+ displayName: 'Prefix',
+ description: 'Only labels with this prefix.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Global', value: 'global' },
+ { label: 'My (personal)', value: 'my' },
+ { label: 'Team', value: 'team' },
+ { label: 'System', value: 'system' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { pageId, prefix, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'labels',
+ query: { prefix, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-operations.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-operations.ts
new file mode 100644
index 00000000000..11318f4fafb
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-operations.ts
@@ -0,0 +1,31 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListBlogPostOperationsOutputSchema } from '../../output-schemas';
+
+export const listPageOperationsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_operations',
+ outputSchema: confluenceListBlogPostOperationsOutputSchema,
+ displayName: 'List Page Permitted Operations',
+ description: 'Lists what the connected user may do on a page.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Lists the operations (read, update, delete and so on) the connected user is permitted to perform on a Confluence page. Use it to check access before trying a write.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ },
+ async run(context) {
+ return await confluenceApi.listContentOperations({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: context.propsValue.pageId,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-properties.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-properties.ts
new file mode 100644
index 00000000000..e77308a5b49
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-properties.ts
@@ -0,0 +1,40 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPagePropertiesOutputSchema } from '../../output-schemas';
+
+export const listPagePropertiesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_properties',
+ outputSchema: confluenceListPagePropertiesOutputSchema,
+ displayName: 'List Page Properties',
+ description: 'Lists the content properties stored on a page.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the content properties (key/value JSON metadata) stored on a Confluence page, optionally filtered by key. Each result has the property ID and version that Update Page Property needs. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ key: confluenceAiProps.propertyKey({
+ required: false,
+ description: 'Only the property with this key.',
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { pageId, key, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'properties',
+ query: { key, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-page-versions.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-versions.ts
new file mode 100644
index 00000000000..8177f8c4911
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-page-versions.ts
@@ -0,0 +1,48 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPageVersionsOutputSchema } from '../../output-schemas';
+
+export const listPageVersionsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_page_versions',
+ outputSchema: confluenceListPageVersionsOutputSchema,
+ displayName: 'List Page Versions',
+ description: 'Lists the version history of a page.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the versions of a Confluence page with their number, author, date and message. Use the version number with Get Page Version or Restore Page Version. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-modified-date' },
+ { label: 'Oldest first', value: 'modified-date' },
+ ],
+ },
+ }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { pageId, sort, bodyFormat, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ relation: 'versions',
+ query: { sort, 'body-format': bodyFormat, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-pages-for-label.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-pages-for-label.ts
new file mode 100644
index 00000000000..b3f0d9608d0
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-pages-for-label.ts
@@ -0,0 +1,57 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPagesForLabelOutputSchema } from '../../output-schemas';
+
+export const listPagesForLabelAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_pages_for_label',
+ outputSchema: confluenceListPagesForLabelOutputSchema,
+ displayName: 'List Pages for Label',
+ description: 'Lists the pages that carry a label.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the Confluence pages that carry a label, optionally limited to a space. Get the numeric label ID from Get Label or List Labels. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ labelId: Property.ShortText({
+ displayName: 'Label ID',
+ description: 'Numeric label ID, from Get Label or List Labels.',
+ required: true,
+ }),
+ spaceId: confluenceAiProps.spaceId({
+ required: false,
+ description: 'Only content in this space. Numeric space ID from List Spaces.',
+ }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { labelId, spaceId, bodyFormat, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'labels',
+ contentId: labelId,
+ relation: 'pages',
+ query: { 'space-id': spaceId, 'body-format': bodyFormat, sort, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-pages.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-pages.ts
new file mode 100644
index 00000000000..612560797f1
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-pages.ts
@@ -0,0 +1,70 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListPagesOutputSchema } from '../../output-schemas';
+
+export const listPagesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_pages',
+ outputSchema: confluenceListPagesOutputSchema,
+ displayName: 'List Pages',
+ description: 'Lists pages, optionally filtered by space, title or status.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists Confluence pages one page of results at a time, filtered by space ID, exact title and status. Use it to find a page ID by title or to browse a space; use Search Content for full-text or CQL queries. Pass nextCursor back as Cursor, with the same filters, to get the next page.',
+ idempotent: true,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({
+ required: false,
+ description:
+ 'Only pages in this space. Numeric space ID from List Spaces; several IDs may be comma-separated.',
+ }),
+ title: Property.ShortText({
+ displayName: 'Title',
+ description: 'Only pages with exactly this title.',
+ required: false,
+ }),
+ status: Property.StaticDropdown({
+ displayName: 'Status',
+ description: 'Only pages with this status. Defaults to current and archived.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Current', value: 'current' },
+ { label: 'Archived', value: 'archived' },
+ { label: 'Trashed', value: 'trashed' },
+ { label: 'Deleted', value: 'deleted' },
+ ],
+ },
+ }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Newest first', value: '-created-date' },
+ { label: 'Oldest first', value: 'created-date' },
+ { label: 'Recently modified first', value: '-modified-date' },
+ { label: 'Title A-Z', value: 'title' },
+ ],
+ },
+ }),
+ bodyFormat: confluenceAiProps.readBodyFormat({ required: false }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { spaceId, title, status, sort, bodyFormat, limit, cursor } = context.propsValue;
+ return await confluenceApi.listPagesPage({
+ auth: context.auth,
+ query: { 'space-id': spaceId, title, status, sort, 'body-format': bodyFormat, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-space-content-labels.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-space-content-labels.ts
new file mode 100644
index 00000000000..cd4dce5a1a8
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-space-content-labels.ts
@@ -0,0 +1,48 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListAttachmentLabelsOutputSchema } from '../../output-schemas';
+
+export const listSpaceContentLabelsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_space_content_labels',
+ outputSchema: confluenceListAttachmentLabelsOutputSchema,
+ displayName: 'List Space Content Labels',
+ description: 'Lists the labels used on content in a space.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the labels used on pages, blog posts and other content inside a Confluence space. Use List Space Labels for labels on the space itself. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ prefix: Property.StaticDropdown({
+ displayName: 'Prefix',
+ description: 'Only labels with this prefix.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'My (personal)', value: 'my' },
+ { label: 'Team', value: 'team' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { spaceId, prefix, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'spaces',
+ contentId: spaceId,
+ relation: 'content/labels',
+ query: { prefix, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-space-labels.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-space-labels.ts
new file mode 100644
index 00000000000..0ca95af88e4
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-space-labels.ts
@@ -0,0 +1,48 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListAttachmentLabelsOutputSchema } from '../../output-schemas';
+
+export const listSpaceLabelsAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_space_labels',
+ outputSchema: confluenceListAttachmentLabelsOutputSchema,
+ displayName: 'List Space Labels',
+ description: 'Lists the labels on a space.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the labels applied to a Confluence space itself (space categories). Use List Space Content Labels for labels on the pages inside it. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ prefix: Property.StaticDropdown({
+ displayName: 'Prefix',
+ description: 'Only labels with this prefix.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'My (personal)', value: 'my' },
+ { label: 'Team', value: 'team' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { spaceId, prefix, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'spaces',
+ contentId: spaceId,
+ relation: 'labels',
+ query: { prefix, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-space-properties.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-space-properties.ts
new file mode 100644
index 00000000000..0de984f6f74
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-space-properties.ts
@@ -0,0 +1,40 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListSpacePropertiesOutputSchema } from '../../output-schemas';
+
+export const listSpacePropertiesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_space_properties',
+ outputSchema: confluenceListSpacePropertiesOutputSchema,
+ displayName: 'List Space Properties',
+ description: 'Lists the content properties stored on a space.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the content properties (key/value JSON metadata) stored on a Confluence space, optionally filtered by key. Each result has the property ID and version that Update Space Property needs. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ key: confluenceAiProps.propertyKey({
+ required: false,
+ description: 'Only the property with this key.',
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { spaceId, key, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'spaces',
+ contentId: spaceId,
+ relation: 'properties',
+ query: { key, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-spaces.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-spaces.ts
new file mode 100644
index 00000000000..b8821c1296d
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-spaces.ts
@@ -0,0 +1,78 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListSpacesOutputSchema } from '../../output-schemas';
+
+export const listSpacesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_spaces',
+ outputSchema: confluenceListSpacesOutputSchema,
+ displayName: 'List Spaces',
+ description: 'Lists spaces, optionally filtered by key, type, status or label.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the Confluence spaces the connected user can see, one page of results at a time, filtered by space keys, type, status or labels. Each result has the numeric space ID other actions need and the space key. Pass nextCursor back as Cursor, with the same filters, to get the next page.',
+ idempotent: true,
+ },
+ props: {
+ keys: Property.ShortText({
+ displayName: 'Space Keys',
+ description: 'Only these space keys, comma-separated, e.g. "DOCS,ENG".',
+ required: false,
+ }),
+ type: Property.StaticDropdown({
+ displayName: 'Type',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Global', value: 'global' },
+ { label: 'Collaboration', value: 'collaboration' },
+ { label: 'Knowledge base', value: 'knowledge_base' },
+ { label: 'Personal', value: 'personal' },
+ ],
+ },
+ }),
+ status: Property.StaticDropdown({
+ displayName: 'Status',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Current', value: 'current' },
+ { label: 'Archived', value: 'archived' },
+ ],
+ },
+ }),
+ labels: Property.ShortText({
+ displayName: 'Labels',
+ description: 'Only spaces with these labels, comma-separated.',
+ required: false,
+ }),
+ sort: Property.StaticDropdown({
+ displayName: 'Sort',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Name A-Z', value: 'name' },
+ { label: 'Name Z-A', value: '-name' },
+ { label: 'Key A-Z', value: 'key' },
+ ],
+ },
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { keys, type, status, labels, sort, limit, cursor } = context.propsValue;
+ return await confluenceApi.listSpacesPage({
+ auth: context.auth,
+ query: { keys, type, status, labels, sort, 'description-format': 'plain', limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-tasks.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-tasks.ts
new file mode 100644
index 00000000000..32b34287251
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-tasks.ts
@@ -0,0 +1,67 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListTasksOutputSchema } from '../../output-schemas';
+
+export const listTasksAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_tasks',
+ outputSchema: confluenceListTasksOutputSchema,
+ displayName: 'List Tasks',
+ description: 'Lists inline tasks, filtered by status, space, page or assignee.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists Confluence inline tasks (checklist items on pages and blog posts), filtered by status, space, page, assignee or creator account ID. Use Update Task to complete or reopen one. Pass nextCursor back as Cursor, with the same filters, to get the next page.',
+ idempotent: true,
+ },
+ props: {
+ status: Property.StaticDropdown({
+ displayName: 'Status',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Incomplete', value: 'incomplete' },
+ { label: 'Complete', value: 'complete' },
+ ],
+ },
+ }),
+ spaceId: confluenceAiProps.spaceId({
+ required: false,
+ description: 'Only tasks in this space. Numeric space ID from List Spaces.',
+ }),
+ pageId: confluenceAiProps.pageId({ required: false, description: 'Only tasks on this page.' }),
+ assignedTo: Property.ShortText({
+ displayName: 'Assigned To',
+ description: 'Only tasks assigned to this account ID, from Get Current User or Find User.',
+ required: false,
+ }),
+ createdBy: Property.ShortText({
+ displayName: 'Created By',
+ description: 'Only tasks created by this account ID.',
+ required: false,
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { status, spaceId, pageId, assignedTo, createdBy, limit, cursor } = context.propsValue;
+ return await confluenceApi.listTasksPage({
+ auth: context.auth,
+ query: {
+ status,
+ 'space-id': spaceId,
+ 'page-id': pageId,
+ 'assigned-to': assignedTo,
+ 'created-by': createdBy,
+ 'body-format': 'storage',
+ limit,
+ cursor,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-templates.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-templates.ts
new file mode 100644
index 00000000000..14d1294094c
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-templates.ts
@@ -0,0 +1,45 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListTemplatesOutputSchema } from '../../output-schemas';
+
+export const listTemplatesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_templates',
+ outputSchema: confluenceListTemplatesOutputSchema,
+ displayName: 'List Templates',
+ description: 'Lists page templates, globally or in a space.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists Confluence page templates with their IDs and names; set a space key for that space templates, or leave it empty for global ones. Use the ID with Get Template or Create Page from Template. Page with Start and Limit.',
+ idempotent: true,
+ },
+ props: {
+ spaceKey: confluenceAiProps.spaceKey({
+ required: false,
+ description:
+ 'Space key (not ID) whose templates to list, from Get Space. Leave empty for global templates.',
+ }),
+ start: Property.Number({
+ displayName: 'Start',
+ description: 'Offset of the first item (0-based). Defaults to 0.',
+ required: false,
+ }),
+ limit: Property.Number({
+ displayName: 'Limit',
+ description: 'Maximum number of items to return. Defaults to 25.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { spaceKey, start, limit } = context.propsValue;
+ return await confluenceApi.listPageTemplatesPage({
+ auth: context.auth,
+ query: { spaceKey, start, limit: limit ?? 25 },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/list-whiteboard-properties.ts b/packages/pieces/community/confluence/src/lib/actions/ai/list-whiteboard-properties.ts
new file mode 100644
index 00000000000..5dcd3f23f22
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/list-whiteboard-properties.ts
@@ -0,0 +1,44 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceListWhiteboardPropertiesOutputSchema } from '../../output-schemas';
+
+export const listWhiteboardPropertiesAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_list_whiteboard_properties',
+ outputSchema: confluenceListWhiteboardPropertiesOutputSchema,
+ displayName: 'List Whiteboard Properties',
+ description: 'Lists the content properties stored on a whiteboard.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the content properties (key/value JSON metadata) stored on a Confluence whiteboard, optionally filtered by key. Each result has the property ID and version that Update Whiteboard Property needs. Pass nextCursor back as Cursor for the next page.',
+ idempotent: true,
+ },
+ props: {
+ whiteboardId: Property.ShortText({
+ displayName: 'Whiteboard ID',
+ description: 'Numeric whiteboard ID, from Create Whiteboard or List Child Content.',
+ required: true,
+ }),
+ key: confluenceAiProps.propertyKey({
+ required: false,
+ description: 'Only the property with this key.',
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ },
+ async run(context) {
+ const { whiteboardId, key, limit, cursor } = context.propsValue;
+ return await confluenceApi.listContentChildren({
+ auth: context.auth,
+ contentType: 'whiteboards',
+ contentId: whiteboardId,
+ relation: 'properties',
+ query: { key, limit, cursor },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/move-page.ts b/packages/pieces/community/confluence/src/lib/actions/ai/move-page.ts
new file mode 100644
index 00000000000..91caa532992
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/move-page.ts
@@ -0,0 +1,47 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceMovePageOutputSchema } from '../../output-schemas';
+
+export const movePageAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_move_page',
+ outputSchema: confluenceMovePageOutputSchema,
+ displayName: 'Move Page',
+ description: 'Moves a page relative to a target page.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Moves a Confluence page relative to a target page: append makes it the last child of the target, before and after place it as a sibling. Both IDs come from List Pages. Idempotent: repeating the same move leaves the page where it is.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ position: Property.StaticDropdown({
+ displayName: 'Position',
+ description: 'Where to put the page relative to the target page.',
+ required: true,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Append as last child of target', value: 'append' },
+ { label: 'Before target (sibling)', value: 'before' },
+ { label: 'After target (sibling)', value: 'after' },
+ ],
+ },
+ }),
+ targetId: confluenceAiProps.pageId({
+ required: true,
+ displayName: 'Target Page ID',
+ description: 'Page to move relative to, from List Pages.',
+ }),
+ },
+ async run(context) {
+ const { pageId, position, targetId } = context.propsValue;
+ await confluenceApi.movePage({ auth: context.auth, pageId, position, targetPageId: targetId });
+ return { pageId, position, targetId };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/remove-label.ts b/packages/pieces/community/confluence/src/lib/actions/ai/remove-label.ts
new file mode 100644
index 00000000000..62f60d99130
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/remove-label.ts
@@ -0,0 +1,38 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceRemoveLabelOutputSchema } from '../../output-schemas';
+
+export const removeLabelAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_remove_label',
+ outputSchema: confluenceRemoveLabelOutputSchema,
+ displayName: 'Remove Label',
+ description: 'Removes a label from a page, blog post or attachment.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Removes one label by name from a Confluence page, blog post or attachment. Fails if the label is not on that content.',
+ idempotent: false,
+ },
+ props: {
+ contentId: Property.ShortText({
+ displayName: 'Content ID',
+ description:
+ 'ID of the page, blog post or attachment, from List Pages, List Blog Posts or List Page Attachments.',
+ required: true,
+ }),
+ label: Property.ShortText({
+ displayName: 'Label',
+ description: 'Name of the label to remove.',
+ required: true,
+ }),
+ },
+ async run(context) {
+ const { contentId, label } = context.propsValue;
+ await confluenceApi.removeLabel({ auth: context.auth, pageId: contentId, label });
+ return { removed: true, contentId, label };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/remove-space-label.ts b/packages/pieces/community/confluence/src/lib/actions/ai/remove-space-label.ts
new file mode 100644
index 00000000000..773da0c261a
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/remove-space-label.ts
@@ -0,0 +1,47 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceRemoveSpaceLabelOutputSchema } from '../../output-schemas';
+
+export const removeSpaceLabelAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_remove_space_label',
+ outputSchema: confluenceRemoveSpaceLabelOutputSchema,
+ displayName: 'Remove Space Label',
+ description: 'Removes a label from a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Removes one label by name from a Confluence space identified by its key. Fails if the label is not on the space.',
+ idempotent: false,
+ },
+ props: {
+ spaceKey: confluenceAiProps.spaceKey({ required: true }),
+ label: Property.ShortText({
+ displayName: 'Label',
+ description: 'Name of the label to remove.',
+ required: true,
+ }),
+ prefix: Property.StaticDropdown({
+ displayName: 'Prefix',
+ description: 'Prefix of the label to remove.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Global', value: 'global' },
+ { label: 'My (personal)', value: 'my' },
+ { label: 'Team', value: 'team' },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { spaceKey, label, prefix } = context.propsValue;
+ await confluenceApi.removeSpaceLabel({ auth: context.auth, spaceKey, name: label, prefix });
+ return { removed: true, spaceKey, label };
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/restore-page-version.ts b/packages/pieces/community/confluence/src/lib/actions/ai/restore-page-version.ts
new file mode 100644
index 00000000000..d476ce4728c
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/restore-page-version.ts
@@ -0,0 +1,48 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceRestorePageVersionOutputSchema } from '../../output-schemas';
+
+export const restorePageVersionAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_restore_page_version',
+ outputSchema: confluenceRestorePageVersionOutputSchema,
+ displayName: 'Restore Page Version',
+ description: 'Restores an earlier version of a page as a new version.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Restores an earlier version of a Confluence page or blog post by publishing its content as a new version; history is kept. Get version numbers from List Page Versions. Not idempotent: each call adds another version.',
+ idempotent: false,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({
+ required: true,
+ description: 'Numeric ID of the page or blog post, from List Pages or List Blog Posts.',
+ }),
+ versionNumber: confluenceAiProps.versionNumber({ required: true }),
+ message: Property.ShortText({
+ displayName: 'Message',
+ description: 'Note saved with the new version, e.g. "Reverted to version 3".',
+ required: true,
+ }),
+ restoreTitle: Property.Checkbox({
+ displayName: 'Restore Title',
+ description: 'Also restore the title from that version.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { pageId, versionNumber, message, restoreTitle } = context.propsValue;
+ return await confluenceApi.restoreContentVersion({
+ auth: context.auth,
+ contentId: pageId,
+ versionNumber,
+ message,
+ restoreTitle,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/search-content.ts b/packages/pieces/community/confluence/src/lib/actions/ai/search-content.ts
new file mode 100644
index 00000000000..f7f8e02d3d6
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/search-content.ts
@@ -0,0 +1,48 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceSearchContentOutputSchema } from '../../output-schemas';
+
+export const searchContentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_search_content',
+ outputSchema: confluenceSearchContentOutputSchema,
+ displayName: 'Search Content',
+ description: 'Searches content with CQL and returns matches with excerpts.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Searches Confluence pages, blog posts, attachments, comments and spaces with a CQL query, returning each match with a highlighted excerpt and its content ID. Use List Pages for a simple title or space filter. For the next page, pass nextCursor from the previous call with the same query as Cursor.',
+ idempotent: true,
+ },
+ props: {
+ cql: Property.LongText({
+ displayName: 'CQL',
+ description:
+ 'Confluence Query Language query, e.g. type = page AND space = "DOCS" AND text ~ "release".',
+ required: true,
+ }),
+ limit: confluenceAiProps.limit({ required: false }),
+ cursor: confluenceAiProps.cursor({ required: false }),
+ includeArchivedSpaces: Property.Checkbox({
+ displayName: 'Include Archived Spaces',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { cql, limit, cursor, includeArchivedSpaces } = context.propsValue;
+ return await confluenceApi.searchByCql({
+ auth: context.auth,
+ query: {
+ cql,
+ limit: limit ?? 25,
+ cursor,
+ includeArchivedSpaces: includeArchivedSpaces || undefined,
+ excerpt: 'highlight',
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-blog-post-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-blog-post-property.ts
new file mode 100644
index 00000000000..1142155e0d7
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-blog-post-property.ts
@@ -0,0 +1,51 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceCreateBlogPostPropertyOutputSchema } from '../../output-schemas';
+
+export const updateBlogPostPropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_blog_post_property',
+ outputSchema: confluenceCreateBlogPostPropertyOutputSchema,
+ displayName: 'Update Blog Post Property',
+ description: 'Replaces the value of a content property on a blog post.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Replaces the JSON value of an existing content property on a Confluence blog post, saving it as the next version; the key is kept unless you set a new one. Get the property ID from List Blog Post Properties. Idempotent: setting the same value again leaves it unchanged.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ propertyId: confluenceAiProps.propertyId({ required: true }),
+ value: confluenceAiProps.propertyValue({
+ required: true,
+ description: 'New JSON object or array; replaces the current value.',
+ }),
+ key: confluenceAiProps.propertyKey({
+ required: false,
+ description: 'New key. Leave empty to keep the current key.',
+ }),
+ },
+ async run(context) {
+ const { blogPostId, propertyId, value, key } = context.propsValue;
+ const current = await confluenceApi.getContentProperty({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ propertyId,
+ });
+ return await confluenceApi.updateContentProperty({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ propertyId,
+ key: key ?? current.key,
+ value,
+ versionNumber: current.version.number + 1,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-blog-post.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-blog-post.ts
new file mode 100644
index 00000000000..331da861338
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-blog-post.ts
@@ -0,0 +1,65 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdateBlogPostOutputSchema } from '../../output-schemas';
+
+export const updateBlogPostAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_blog_post',
+ outputSchema: confluenceUpdateBlogPostOutputSchema,
+ displayName: 'Update Blog Post',
+ description: 'Updates the title, body or status of a blog post.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Updates a Confluence blog post by ID, changing only the title, body or status you set; everything else is kept. It reads the current version and saves the next one, so a concurrent edit between the read and the save is overwritten.',
+ idempotent: true,
+ },
+ props: {
+ blogPostId: confluenceAiProps.blogPostId({ required: true }),
+ title: Property.ShortText({
+ displayName: 'Title',
+ description: 'New title. Leave empty to keep the current one.',
+ required: false,
+ }),
+ body: confluenceAiProps.body({
+ required: false,
+ description:
+ 'New body in the selected format; replaces the whole body. Leave empty to keep the current one.',
+ }),
+ bodyFormat: confluenceAiProps.bodyFormat({ required: false }),
+ status: confluenceAiProps.contentStatus({
+ required: false,
+ description: 'Published (current) or draft. Leave empty to keep the current status.',
+ }),
+ versionMessage: Property.ShortText({
+ displayName: 'Version Message',
+ description: 'Optional note describing this change.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { blogPostId, title, body, bodyFormat, status, versionMessage } = context.propsValue;
+ if (title === undefined && body === undefined && status === undefined) {
+ throw new Error('Set at least one of Title, Body or Status.');
+ }
+ const current = await confluenceApi.getVersionedContent({
+ auth: context.auth,
+ contentType: 'blogposts',
+ contentId: blogPostId,
+ });
+ return await confluenceApi.updateBlogPost({
+ auth: context.auth,
+ blogPostId,
+ title: title ?? current.title,
+ status: status ?? current.status,
+ representation: body === undefined ? 'storage' : bodyFormat ?? 'storage',
+ value: body ?? current.body?.storage?.value ?? '',
+ versionNumber: current.version.number + 1,
+ versionMessage,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-footer-comment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-footer-comment.ts
new file mode 100644
index 00000000000..ae3e433edf1
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-footer-comment.ts
@@ -0,0 +1,45 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdateFooterCommentOutputSchema } from '../../output-schemas';
+
+export const updateFooterCommentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_footer_comment',
+ outputSchema: confluenceUpdateFooterCommentOutputSchema,
+ displayName: 'Update Footer Comment',
+ description: 'Replaces the body of a footer comment.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Replaces the body of a Confluence footer comment by ID, saving it as the next version. Idempotent: sending the same body again leaves the text unchanged (the version still advances).',
+ idempotent: true,
+ },
+ props: {
+ commentId: confluenceAiProps.commentId({ required: true }),
+ body: confluenceAiProps.body({
+ required: true,
+ description: 'New comment body; replaces the whole body.',
+ }),
+ bodyFormat: confluenceAiProps.bodyFormat({ required: false }),
+ },
+ async run(context) {
+ const { commentId, body, bodyFormat } = context.propsValue;
+ const current = await confluenceApi.getVersionedContent({
+ auth: context.auth,
+ contentType: 'footer-comments',
+ contentId: commentId,
+ });
+ return await confluenceApi.updateComment({
+ auth: context.auth,
+ commentType: 'footer-comments',
+ commentId,
+ representation: bodyFormat ?? 'storage',
+ value: body,
+ versionNumber: current.version.number + 1,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-inline-comment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-inline-comment.ts
new file mode 100644
index 00000000000..4e79142cb2b
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-inline-comment.ts
@@ -0,0 +1,62 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdateInlineCommentOutputSchema } from '../../output-schemas';
+
+export const updateInlineCommentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_inline_comment',
+ outputSchema: confluenceUpdateInlineCommentOutputSchema,
+ displayName: 'Update Inline Comment',
+ description: 'Changes the body of an inline comment, or resolves or reopens it.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Changes the body of a Confluence inline comment and/or resolves or reopens it, keeping whatever you leave unset. Resolving applies to top-level inline comments, not replies. Idempotent: repeating the same change leaves the comment in the same state.',
+ idempotent: true,
+ },
+ props: {
+ commentId: confluenceAiProps.commentId({ required: true }),
+ body: confluenceAiProps.body({
+ required: false,
+ description:
+ 'New comment body; replaces the whole body. Leave empty to keep the current one.',
+ }),
+ bodyFormat: confluenceAiProps.bodyFormat({ required: false }),
+ resolved: Property.StaticDropdown({
+ displayName: 'Resolved',
+ description: 'Resolve or reopen the comment. Leave empty to keep its state.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Resolve', value: 'true' },
+ { label: 'Reopen', value: 'false' },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { commentId, body, bodyFormat, resolved } = context.propsValue;
+ if (body === undefined && resolved === undefined) {
+ throw new Error('Set Body, Resolved, or both.');
+ }
+ const current = await confluenceApi.getVersionedContent({
+ auth: context.auth,
+ contentType: 'inline-comments',
+ contentId: commentId,
+ });
+ return await confluenceApi.updateComment({
+ auth: context.auth,
+ commentType: 'inline-comments',
+ commentId,
+ representation: body === undefined ? 'storage' : bodyFormat ?? 'storage',
+ value: body ?? current.body?.storage?.value ?? '',
+ versionNumber: current.version.number + 1,
+ resolved: resolved === undefined ? undefined : resolved === 'true',
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-page-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-page-property.ts
new file mode 100644
index 00000000000..10f2245adaa
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-page-property.ts
@@ -0,0 +1,51 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdatePagePropertyOutputSchema } from '../../output-schemas';
+
+export const updatePagePropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_page_property',
+ outputSchema: confluenceUpdatePagePropertyOutputSchema,
+ displayName: 'Update Page Property',
+ description: 'Replaces the value of a content property on a page.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Replaces the JSON value of an existing content property on a Confluence page, saving it as the next version; the key is kept unless you set a new one. Get the property ID from List Page Properties. Idempotent: setting the same value again leaves it unchanged.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ propertyId: confluenceAiProps.propertyId({ required: true }),
+ value: confluenceAiProps.propertyValue({
+ required: true,
+ description: 'New JSON object or array; replaces the current value.',
+ }),
+ key: confluenceAiProps.propertyKey({
+ required: false,
+ description: 'New key. Leave empty to keep the current key.',
+ }),
+ },
+ async run(context) {
+ const { pageId, propertyId, value, key } = context.propsValue;
+ const current = await confluenceApi.getContentProperty({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ propertyId,
+ });
+ return await confluenceApi.updateContentProperty({
+ auth: context.auth,
+ contentType: 'pages',
+ contentId: pageId,
+ propertyId,
+ key: key ?? current.key,
+ value,
+ versionNumber: current.version.number + 1,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-page-title.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-page-title.ts
new file mode 100644
index 00000000000..0e508278174
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-page-title.ts
@@ -0,0 +1,42 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdatePageTitleOutputSchema } from '../../output-schemas';
+
+export const updatePageTitleAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_page_title',
+ outputSchema: confluenceUpdatePageTitleOutputSchema,
+ displayName: 'Update Page Title',
+ description: 'Renames a page.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Changes only the title of a Confluence page, leaving its body untouched. Use Update Page to change the body or status too. Idempotent: setting the same title again leaves the page unchanged.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ title: Property.ShortText({
+ displayName: 'Title',
+ description: 'New page title.',
+ required: true,
+ }),
+ status: confluenceAiProps.contentStatus({
+ required: false,
+ description: 'Whether the page is published (current) or a draft. Defaults to current.',
+ }),
+ },
+ async run(context) {
+ const { pageId, title, status } = context.propsValue;
+ return await confluenceApi.updatePageTitle({
+ auth: context.auth,
+ pageId,
+ title,
+ status: status ?? 'current',
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-page.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-page.ts
new file mode 100644
index 00000000000..2e026a13bf9
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-page.ts
@@ -0,0 +1,77 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdatePageOutputSchema } from '../../output-schemas';
+
+export const updatePageAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_page',
+ outputSchema: confluenceUpdatePageOutputSchema,
+ displayName: 'Update Page',
+ description: 'Updates the title, body, status or parent of a page.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Updates a Confluence page by ID, changing only the title, body, status or parent you set; everything else is kept. It reads the current version and saves the next one, so a concurrent edit between the read and the save is overwritten. Use Update Page Title to rename only, and Move Page to reposition among siblings.',
+ idempotent: true,
+ },
+ props: {
+ pageId: confluenceAiProps.pageId({ required: true }),
+ title: Property.ShortText({
+ displayName: 'Title',
+ description: 'New title. Leave empty to keep the current one.',
+ required: false,
+ }),
+ body: confluenceAiProps.body({
+ required: false,
+ description:
+ 'New body in the selected format; replaces the whole body. Leave empty to keep the current one.',
+ }),
+ bodyFormat: confluenceAiProps.bodyFormat({ required: false }),
+ status: confluenceAiProps.contentStatus({
+ required: false,
+ description: 'Published (current) or draft. Leave empty to keep the current status.',
+ }),
+ parentId: confluenceAiProps.pageId({
+ required: false,
+ displayName: 'Parent Page ID',
+ description: 'Move the page under this parent page. Leave empty to keep the current parent.',
+ }),
+ versionMessage: Property.ShortText({
+ displayName: 'Version Message',
+ description: 'Optional note describing this change.',
+ required: false,
+ }),
+ },
+ async run(context) {
+ const { pageId, title, body, bodyFormat, status, parentId, versionMessage } =
+ context.propsValue;
+ if (
+ title === undefined &&
+ body === undefined &&
+ status === undefined &&
+ parentId === undefined
+ ) {
+ throw new Error('Set at least one of Title, Body, Status or Parent Page ID.');
+ }
+ const current = await confluenceApi.getPage({
+ auth: context.auth,
+ pageId,
+ bodyFormat: 'storage',
+ });
+ return await confluenceApi.updatePage({
+ auth: context.auth,
+ pageId,
+ title: title ?? current.title,
+ status: status ?? current.status,
+ parentId,
+ representation: body === undefined ? 'storage' : bodyFormat ?? 'storage',
+ value: body ?? current.body?.storage?.value ?? '',
+ versionNumber: current.version.number + 1,
+ versionMessage,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-space-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-space-property.ts
new file mode 100644
index 00000000000..e62008324bb
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-space-property.ts
@@ -0,0 +1,47 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdateSpacePropertyOutputSchema } from '../../output-schemas';
+
+export const updateSpacePropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_space_property',
+ outputSchema: confluenceUpdateSpacePropertyOutputSchema,
+ displayName: 'Update Space Property',
+ description: 'Replaces the value of a content property on a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Replaces the JSON value of an existing content property on a Confluence space, saving it as the next version; the key cannot be changed. Get the property ID from List Space Properties. Idempotent: setting the same value again leaves it unchanged.',
+ idempotent: true,
+ },
+ props: {
+ spaceId: confluenceAiProps.spaceId({ required: true }),
+ propertyId: confluenceAiProps.propertyId({ required: true }),
+ value: confluenceAiProps.propertyValue({
+ required: true,
+ description: 'New JSON object or array; replaces the current value.',
+ }),
+ },
+ async run(context) {
+ const { spaceId, propertyId, value } = context.propsValue;
+ const current = await confluenceApi.getContentProperty({
+ auth: context.auth,
+ contentType: 'spaces',
+ contentId: spaceId,
+ propertyId,
+ });
+ return await confluenceApi.updateContentProperty({
+ auth: context.auth,
+ contentType: 'spaces',
+ contentId: spaceId,
+ propertyId,
+ key: current.key,
+ value,
+ versionNumber: current.version.number + 1,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-space.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-space.ts
new file mode 100644
index 00000000000..de554b7d784
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-space.ts
@@ -0,0 +1,70 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdateSpaceOutputSchema } from '../../output-schemas';
+
+export const updateSpaceAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_space',
+ outputSchema: confluenceUpdateSpaceOutputSchema,
+ displayName: 'Update Space',
+ description: 'Updates the name, description, homepage or status of a space.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Updates a Confluence space identified by its key, changing only the name, description, homepage or status you set. Needs space admin. Idempotent: repeating the same update leaves the space unchanged.',
+ idempotent: true,
+ },
+ props: {
+ spaceKey: confluenceAiProps.spaceKey({ required: true }),
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'New name. Leave empty to keep it.',
+ required: false,
+ }),
+ description: Property.LongText({
+ displayName: 'Description',
+ description: 'New plain-text description. Leave empty to keep it.',
+ required: false,
+ }),
+ homepageId: confluenceAiProps.pageId({
+ required: false,
+ displayName: 'Homepage ID',
+ description: 'Page to make the space homepage. Leave empty to keep it.',
+ }),
+ status: Property.StaticDropdown({
+ displayName: 'Status',
+ description: 'Archive or restore the space. Leave empty to keep it.',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Current', value: 'current' },
+ { label: 'Archived', value: 'archived' },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { spaceKey, name, description, homepageId, status } = context.propsValue;
+ if (
+ name === undefined &&
+ description === undefined &&
+ homepageId === undefined &&
+ status === undefined
+ ) {
+ throw new Error('Set at least one of Name, Description, Homepage ID or Status.');
+ }
+ return await confluenceApi.updateSpace({
+ auth: context.auth,
+ spaceKey,
+ name,
+ description,
+ homepageId,
+ status,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-task.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-task.ts
new file mode 100644
index 00000000000..311e2dd449f
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-task.ts
@@ -0,0 +1,43 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdateTaskOutputSchema } from '../../output-schemas';
+
+export const updateTaskAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_task',
+ outputSchema: confluenceUpdateTaskOutputSchema,
+ displayName: 'Update Task',
+ description: 'Marks an inline task complete or incomplete.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Marks a Confluence inline task complete or incomplete, keeping its other fields. Get the task ID from List Tasks. Idempotent: setting the same status again leaves the task unchanged.',
+ idempotent: true,
+ },
+ props: {
+ taskId: Property.ShortText({
+ displayName: 'Task ID',
+ description: 'Numeric task ID, from List Tasks.',
+ required: true,
+ }),
+ status: Property.StaticDropdown({
+ displayName: 'Status',
+ required: true,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Complete', value: 'complete' },
+ { label: 'Incomplete', value: 'incomplete' },
+ ],
+ },
+ }),
+ },
+ async run(context) {
+ const { taskId, status } = context.propsValue;
+ const task = await confluenceApi.getTask({ auth: context.auth, taskId });
+ return await confluenceApi.updateTask({ auth: context.auth, task, status });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/update-whiteboard-property.ts b/packages/pieces/community/confluence/src/lib/actions/ai/update-whiteboard-property.ts
new file mode 100644
index 00000000000..a8f4e4e68bb
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/update-whiteboard-property.ts
@@ -0,0 +1,55 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUpdateWhiteboardPropertyOutputSchema } from '../../output-schemas';
+
+export const updateWhiteboardPropertyAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_update_whiteboard_property',
+ outputSchema: confluenceUpdateWhiteboardPropertyOutputSchema,
+ displayName: 'Update Whiteboard Property',
+ description: 'Replaces the value of a content property on a whiteboard.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Replaces the JSON value of an existing content property on a Confluence whiteboard, saving it as the next version; the key is kept unless you set a new one. Get the property ID from List Whiteboard Properties. Idempotent: setting the same value again leaves it unchanged.',
+ idempotent: true,
+ },
+ props: {
+ whiteboardId: Property.ShortText({
+ displayName: 'Whiteboard ID',
+ description: 'Numeric whiteboard ID, from Create Whiteboard or List Child Content.',
+ required: true,
+ }),
+ propertyId: confluenceAiProps.propertyId({ required: true }),
+ value: confluenceAiProps.propertyValue({
+ required: true,
+ description: 'New JSON object or array; replaces the current value.',
+ }),
+ key: confluenceAiProps.propertyKey({
+ required: false,
+ description: 'New key. Leave empty to keep the current key.',
+ }),
+ },
+ async run(context) {
+ const { whiteboardId, propertyId, value, key } = context.propsValue;
+ const current = await confluenceApi.getContentProperty({
+ auth: context.auth,
+ contentType: 'whiteboards',
+ contentId: whiteboardId,
+ propertyId,
+ });
+ return await confluenceApi.updateContentProperty({
+ auth: context.auth,
+ contentType: 'whiteboards',
+ contentId: whiteboardId,
+ propertyId,
+ key: key ?? current.key,
+ value,
+ versionNumber: current.version.number + 1,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/ai/upload-attachment.ts b/packages/pieces/community/confluence/src/lib/actions/ai/upload-attachment.ts
new file mode 100644
index 00000000000..260a296ae51
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/actions/ai/upload-attachment.ts
@@ -0,0 +1,51 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { confluenceAuth } from '../../auth';
+import { confluenceAiProps } from '../../common/ai-props';
+import { confluenceApi } from '../../common/api';
+import { confluenceUploadAttachmentOutputSchema } from '../../output-schemas';
+
+export const uploadAttachmentAction = createAction({
+ auth: confluenceAuth,
+ name: 'confluence_upload_attachment',
+ outputSchema: confluenceUploadAttachmentOutputSchema,
+ displayName: 'Upload Attachment',
+ description: 'Uploads a file as an attachment to a page or blog post.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Uploads a file as an attachment to a Confluence page or blog post. Uploading a file whose name already exists on that page fails; the response lists the new attachment with its ID. Not idempotent: each call uploads again.',
+ idempotent: false,
+ },
+ props: {
+ contentId: confluenceAiProps.pageId({
+ required: true,
+ displayName: 'Page or Blog Post ID',
+ description:
+ 'Numeric ID of the page or blog post to attach to, from List Pages or List Blog Posts.',
+ }),
+ file: Property.File({ displayName: 'File', required: true }),
+ comment: Property.ShortText({
+ displayName: 'Comment',
+ description: 'Optional comment for this attachment version.',
+ required: false,
+ }),
+ minorEdit: Property.Checkbox({
+ displayName: 'Minor Edit',
+ description: 'Do not notify watchers about the upload. Defaults to true.',
+ required: false,
+ defaultValue: true,
+ }),
+ },
+ async run(context) {
+ const { contentId, file, comment, minorEdit } = context.propsValue;
+ return await confluenceApi.uploadAttachment({
+ auth: context.auth,
+ pageId: contentId,
+ file,
+ comment,
+ minorEdit,
+ });
+ },
+});
diff --git a/packages/pieces/community/confluence/src/lib/actions/create-page-from-template.ts b/packages/pieces/community/confluence/src/lib/actions/create-page-from-template.ts
index 27790f57037..6edf2558f71 100644
--- a/packages/pieces/community/confluence/src/lib/actions/create-page-from-template.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/create-page-from-template.ts
@@ -1,21 +1,22 @@
import { confluenceAuth } from '../auth';
import { createAction, Property } from "@activepieces/pieces-framework";
-import { folderIdProp, spaceIdProp, templateIdProp, templateVariablesProp } from "../common/props";
-import { confluenceApiCall, escapeStorageValue } from "../common";
-import { HttpMethod } from "@activepieces/pieces-common";
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { createPageOutputSchema } from '../output-schemas';
export const createPageFromTemplateAction = createAction({
auth:confluenceAuth,
name:'create-page-from-template',
+ outputSchema: createPageOutputSchema,
classification: 'WRITE',
displayName:'Create Page from Template',
description:'Creates a new page from a template with the given title and variables.',
audience: 'both',
aiMetadata: { description: 'Creates a new Confluence page by fetching a template, substituting its declared variables with the provided values, and posting the rendered content as a page (published or draft) in the given space. Use when a page should follow a predefined template rather than free-form body. Requires the template ID and matching variable names. Not idempotent: each call creates another page.', idempotent: false },
props:{
- spaceId:spaceIdProp,
- templateId:templateIdProp,
- folderId:folderIdProp,
+ spaceId:confluenceProps.spaceId({ required: true }),
+ templateId:confluenceProps.templateId({ required: true }),
+ folderId:confluenceProps.folderId({ required: false }),
title:Property.ShortText({
displayName:'Title',
required:true,
@@ -38,20 +39,13 @@ export const createPageFromTemplateAction = createAction({
]
}
}),
- templateVariables:templateVariablesProp,
+ templateVariables:confluenceProps.templateVariables({ required: false }),
},
async run(context){
const {spaceId,templateId,title,status,folderId} = context.propsValue;
const variables = context.propsValue.templateVariables ??{};
- const template = await confluenceApiCall<{ body: { storage: { value: string } } }>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v1',
- resourceUri: `/template/${templateId}`,
- });
+ const template = await confluenceApi.getTemplate({ auth: context.auth, templateId });
const body = template.body.storage.value;
@@ -62,25 +56,23 @@ export const createPageFromTemplateAction = createAction({
content = content.replace(varRegex, safeValue);
});
- const response = await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.POST,
- version: 'v2',
- resourceUri: '/pages',
- body: {
- spaceId:spaceId,
- title,
- parentId:folderId,
- status,
- body:{
- representation:'storage',
- value:content,
- }
- }
- })
-
- return response;
+ return await confluenceApi.createPage({
+ auth: context.auth,
+ spaceId,
+ title,
+ parentId: folderId,
+ status,
+ representation: 'storage',
+ value: content,
+ });
}
-})
\ No newline at end of file
+})
+
+function escapeStorageValue(value: string): string {
+ return value
+ .replace(/&/g, '&amp;')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/"/g, '&quot;')
+ .replace(/'/g, '&apos;');
+}
diff --git a/packages/pieces/community/confluence/src/lib/actions/create-page.ts b/packages/pieces/community/confluence/src/lib/actions/create-page.ts
index 2248a6b60cb..66c6934423a 100644
--- a/packages/pieces/community/confluence/src/lib/actions/create-page.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/create-page.ts
@@ -1,20 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-import { parentPageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { createPageOutputSchema } from '../output-schemas';
export const createPageAction = createAction({
auth: confluenceAuth,
name: 'create-page',
+ outputSchema: createPageOutputSchema,
classification: 'WRITE',
displayName: 'Create Page',
description: 'Creates a new page in a space with the given title and body.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Creates a new Confluence page in the given space with a title and body, optionally nested under a parent page, and either published (current) or saved as a draft. The body is interpreted in the chosen format (storage XHTML, wiki markup, or atlas doc format). Use to author a brand-new page. Not idempotent: each call creates another page even with identical input.', idempotent: false },
props: {
- spaceId: spaceIdProp,
- parentId: parentPageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ parentId: confluenceProps.pageId({ required: false, displayName: 'Parent Page' }),
title: Property.ShortText({
displayName: 'Title',
required: true,
@@ -53,23 +54,14 @@ export const createPageAction = createAction({
async run(context) {
const { spaceId, parentId, title, bodyFormat, body, status } = context.propsValue;
- return await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.POST,
- version: 'v2',
- resourceUri: '/pages',
- body: {
- spaceId,
- parentId: parentId || undefined,
- title,
- status,
- body: {
- representation: bodyFormat,
- value: body ?? '',
- },
- },
+ return await confluenceApi.createPage({
+ auth: context.auth,
+ spaceId,
+ parentId: parentId || undefined,
+ title,
+ status,
+ representation: bodyFormat,
+ value: body ?? '',
});
},
});
diff --git a/packages/pieces/community/confluence/src/lib/actions/delete-page.ts b/packages/pieces/community/confluence/src/lib/actions/delete-page.ts
index 2b84711724a..af32622698f 100644
--- a/packages/pieces/community/confluence/src/lib/actions/delete-page.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/delete-page.ts
@@ -1,20 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { deletePageOutputSchema } from '../output-schemas';
export const deletePageAction = createAction({
auth: confluenceAuth,
name: 'delete-page',
+ outputSchema: deletePageOutputSchema,
classification: 'DESTRUCTIVE',
displayName: 'Delete Page',
description: 'Trashes or permanently deletes a page.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Deletes a Confluence page by ID; by default it is moved to the trash, or when "purge permanently" is enabled it is removed from the trash for good. Use to remove a page. Not idempotent in practice: it mutates page state and re-running after deletion errors rather than returning the same result, and a purge is irreversible.', idempotent: false },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
purge: Property.Checkbox({
displayName: 'Purge Permanently',
description:
@@ -26,15 +27,7 @@ export const deletePageAction = createAction({
async run(context) {
const { pageId, purge } = context.propsValue;
- await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.DELETE,
- version: 'v2',
- resourceUri: `/pages/${pageId}`,
- query: purge ? { purge: 'true' } : undefined,
- });
+ await confluenceApi.deletePage({ auth: context.auth, pageId, purge });
return { success: true, pageId };
},
diff --git a/packages/pieces/community/confluence/src/lib/actions/download-attachment.ts b/packages/pieces/community/confluence/src/lib/actions/download-attachment.ts
index f6208051370..22ff0c5cc5f 100644
--- a/packages/pieces/community/confluence/src/lib/actions/download-attachment.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/download-attachment.ts
@@ -1,19 +1,12 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall, confluenceRawRequest } from '../common';
-
-type AttachmentResponse = {
- id: string;
- title: string;
- mediaType: string;
- fileSize: number;
- downloadLink: string;
-};
+import { confluenceApi } from '../common/api';
+import { downloadAttachmentOutputSchema } from '../output-schemas';
export const downloadAttachmentAction = createAction({
auth: confluenceAuth,
name: 'download-attachment',
+ outputSchema: downloadAttachmentOutputSchema,
classification: 'READ',
displayName: 'Download Attachment',
description: 'Downloads an attachment file by its ID and returns it as a file.',
@@ -29,23 +22,11 @@ export const downloadAttachmentAction = createAction({
async run(context) {
const { attachmentId } = context.propsValue;
- const attachment = await confluenceApiCall<AttachmentResponse>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/attachments/${attachmentId}`,
- });
+ const attachment = await confluenceApi.getAttachment({ auth: context.auth, attachmentId });
- const buffer = await confluenceRawRequest<Buffer>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- url: `/wiki${attachment.downloadLink}`,
- responseType: 'arraybuffer',
- followRedirects: true,
+ const buffer = await confluenceApi.downloadAttachment({
+ auth: context.auth,
+ downloadLink: attachment.downloadLink,
});
const file = await context.files.write({
diff --git a/packages/pieces/community/confluence/src/lib/actions/find-page-by-title.ts b/packages/pieces/community/confluence/src/lib/actions/find-page-by-title.ts
index 9017de0dc81..7cd13f7ee89 100644
--- a/packages/pieces/community/confluence/src/lib/actions/find-page-by-title.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/find-page-by-title.ts
@@ -1,26 +1,20 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall, PaginatedResponse } from '../common';
-import { spaceIdPropOptional } from '../common/props';
-
-type ConfluencePage = {
- id: string;
- title: string;
- spaceId: string;
- status: string;
-};
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { findPageByTitleOutputSchema } from '../output-schemas';
export const findPageByTitleAction = createAction({
auth: confluenceAuth,
name: 'find-page-by-title',
+ outputSchema: findPageByTitleOutputSchema,
classification: 'SEARCH',
displayName: 'Find Page by Title',
description: 'Finds a page by exact title, optionally scoped to a space.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Looks up Confluence pages by exact title, optionally restricted to one space, returning matches plus a found flag and count. Use to resolve a page title to its ID before reading or updating it. Match is exact (not fuzzy); for keyword or broader queries use Search Content (CQL) instead. Read-only and idempotent.', idempotent: true },
props: {
- spaceId: spaceIdPropOptional,
+ spaceId: confluenceProps.spaceId({ required: false }),
title: Property.ShortText({
displayName: 'Title',
description: 'Exact title to match.',
@@ -30,20 +24,7 @@ export const findPageByTitleAction = createAction({
async run(context) {
const { spaceId, title } = context.propsValue;
- const query: Record<string, string> = { title, limit: '25' };
- if (spaceId) query['space-id'] = spaceId;
-
- const response = await confluenceApiCall<PaginatedResponse<ConfluencePage>>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: '/pages',
- query,
- });
-
- const results = response.results ?? [];
+ const results = await confluenceApi.findPagesByTitle({ auth: context.auth, title, spaceId });
return {
found: results.length > 0,
count: results.length,
diff --git a/packages/pieces/community/confluence/src/lib/actions/find-user.ts b/packages/pieces/community/confluence/src/lib/actions/find-user.ts
index 62bbfd78591..5d1d5222ee7 100644
--- a/packages/pieces/community/confluence/src/lib/actions/find-user.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/find-user.ts
@@ -1,16 +1,12 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-
-type UserSearchResult = {
- results: Array<{ user: Record<string, unknown> }>;
- totalSize?: number;
-};
+import { confluenceApi } from '../common/api';
+import { findUserOutputSchema } from '../output-schemas';
export const findUserAction = createAction({
auth: confluenceAuth,
name: 'find-user',
+ outputSchema: findUserOutputSchema,
classification: 'SEARCH',
displayName: 'Find User',
description: 'Looks up Confluence users by name, email, or keyword.',
@@ -31,22 +27,7 @@ export const findUserAction = createAction({
async run(context) {
const { keyword, limit } = context.propsValue;
- const cql = `user.fullname ~ "${keyword.replace(/"/g, '\\"')}" OR user = "${keyword.replace(/"/g, '\\"')}"`;
-
- const response = await confluenceApiCall<UserSearchResult>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v1',
- resourceUri: '/search/user',
- query: {
- cql,
- limit: String(limit ?? 25),
- },
- });
-
- const users = (response.results ?? []).map((r) => r.user);
+ const users = await confluenceApi.searchUsers({ auth: context.auth, keyword, limit });
return {
found: users.length > 0,
count: users.length,
diff --git a/packages/pieces/community/confluence/src/lib/actions/get-page-by-url.ts b/packages/pieces/community/confluence/src/lib/actions/get-page-by-url.ts
index 7bb4e5cf252..ca1df622c91 100644
--- a/packages/pieces/community/confluence/src/lib/actions/get-page-by-url.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/get-page-by-url.ts
@@ -1,11 +1,12 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall, parsePageIdFromUrl } from '../common';
+import { confluenceApi } from '../common/api';
+import { getPageByUrlOutputSchema } from '../output-schemas';
export const getPageByUrlAction = createAction({
auth: confluenceAuth,
name: 'get-page-by-url',
+ outputSchema: getPageByUrlOutputSchema,
classification: 'READ',
displayName: 'Get Page by URL',
description:
@@ -42,14 +43,14 @@ export const getPageByUrlAction = createAction({
throw new Error(`Could not extract a page ID from the URL: ${url}`);
}
- return await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/pages/${pageId}`,
- query: bodyFormat ? { 'body-format': bodyFormat } : undefined,
- });
+ return await confluenceApi.getPage({ auth: context.auth, pageId, bodyFormat });
},
});
+
+function parsePageIdFromUrl(url: string): string | null {
+ const pageIdFromPath = url.match(/\/pages\/(\d+)/);
+ if (pageIdFromPath) return pageIdFromPath[1];
+ const pageIdFromQuery = url.match(/[?&]pageId=(\d+)/);
+ if (pageIdFromQuery) return pageIdFromQuery[1];
+ return null;
+}
diff --git a/packages/pieces/community/confluence/src/lib/actions/get-page-content.ts b/packages/pieces/community/confluence/src/lib/actions/get-page-content.ts
index d40de0b6508..f62417ea09c 100644
--- a/packages/pieces/community/confluence/src/lib/actions/get-page-content.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/get-page-content.ts
@@ -1,92 +1,17 @@
-import {
- createAction,
- Property,
- DynamicPropsValue,
- PiecePropValueSchema,
- AppConnectionValueForAuthProperty,
-} from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
+import { createAction, Property, DynamicPropsValue } from '@activepieces/pieces-framework';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
+import { confluenceApi } from '../common/api';
-interface ConfluencePage {
- id: string;
- title: string;
- body: any;
- children?: ConfluencePage[];
-}
-
-async function getPageWithContent(
- auth: AppConnectionValueForAuthProperty<typeof confluenceAuth>,
- pageId: string,
-): Promise<ConfluencePage> {
- try {
- const response = await confluenceApiCall<ConfluencePage>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/pages/${pageId}`,
- query: {
- 'body-format': 'storage',
- },
- });
- return response;
- } catch (error) {
- throw new Error(
- `Failed to fetch page ${pageId}: ${error instanceof Error ? error.message : 'Unknown error'}`,
- );
- }
-}
-
-async function getChildPages(
- auth: AppConnectionValueForAuthProperty<typeof confluenceAuth>,
- parentId: string,
- currentDepth: number,
- maxDepth: number,
-): Promise<ConfluencePage[]> {
- if (currentDepth >= maxDepth) {
- return [];
- }
-
- try {
- const childrenResponse = await confluenceApiCall<{ results: ConfluencePage[] }>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/pages/${parentId}/children`,
- });
-
- const childPages = await Promise.all(
- childrenResponse.results.map(async (childPage) => {
- const pageWithContent = await getPageWithContent(auth, childPage.id);
- const children = await getChildPages(auth, childPage.id, currentDepth + 1, maxDepth);
- return {
- ...pageWithContent,
- children,
- };
- }),
- );
-
- return childPages;
- } catch (error) {
- throw new Error(
- `Failed to fetch children for page ${parentId}: ${
- error instanceof Error ? error.message : 'Unknown error'
- }`,
- );
- }
-}
+import type { ConfluenceAuthValue, ConfluencePage } from '../common/types';
+import { getpagecontentOutputSchema } from '../output-schemas';
export const getPageContent = createAction({
name: 'getPageContent',
+ outputSchema: getpagecontentOutputSchema,
classification: 'READ',
displayName: 'Get Page Content',
description: 'Get page content and optionally all its descendants',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Fetches a single Confluence page (title and storage-format body) by its page ID; when "include descendants" is enabled it additionally walks the page tree and returns child pages recursively up to a configurable max depth. Use to read the full content of a known page, optionally including its sub-pages. Requires the numeric page ID (from the page URL); read-only and idempotent.', idempotent: true },
auth: confluenceAuth,
props: {
@@ -124,18 +49,18 @@ export const getPageContent = createAction({
},
async run(context) {
try {
- const page = await getPageWithContent(context.auth, context.propsValue.pageId);
+ const page = await getPageWithContent({ auth: context.auth, pageId: context.propsValue.pageId });
if (!context.propsValue.includeDescendants) {
return page;
}
- const children = await getChildPages(
- context.auth,
- context.propsValue.pageId,
- 1,
- context.propsValue.dynamic['maxDepth'],
- );
+ const children = await getChildPages({
+ auth: context.auth,
+ parentId: context.propsValue.pageId,
+ currentDepth: 1,
+ maxDepth: context.propsValue.dynamic['maxDepth'],
+ });
return {
...page,
@@ -150,3 +75,66 @@ export const getPageContent = createAction({
}
},
});
+
+async function getPageWithContent({
+ auth,
+ pageId,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+}): Promise<ConfluencePage> {
+ try {
+ const response = await confluenceApi.getPage({ auth, pageId, bodyFormat: 'storage' });
+ return response;
+ } catch (error) {
+ throw new Error(
+ `Failed to fetch page ${pageId}: ${error instanceof Error ? error.message : 'Unknown error'}`,
+ );
+ }
+}
+
+async function getChildPages({
+ auth,
+ parentId,
+ currentDepth,
+ maxDepth,
+}: {
+ auth: ConfluenceAuthValue;
+ parentId: string;
+ currentDepth: number;
+ maxDepth: number;
+}): Promise<PageWithChildren[]> {
+ if (currentDepth >= maxDepth) {
+ return [];
+ }
+
+ try {
+ const childPagesList = await confluenceApi.listPageChildren({ auth, pageId: parentId });
+
+ const childPages = await Promise.all(
+ childPagesList.map(async (childPage) => {
+ const pageWithContent = await getPageWithContent({ auth, pageId: childPage.id });
+ const children = await getChildPages({
+ auth,
+ parentId: childPage.id,
+ currentDepth: currentDepth + 1,
+ maxDepth,
+ });
+ return {
+ ...pageWithContent,
+ children,
+ };
+ }),
+ );
+
+ return childPages;
+ } catch (error) {
+ throw new Error(
+ `Failed to fetch children for page ${parentId}: ${
+ error instanceof Error ? error.message : 'Unknown error'
+ }`,
+ );
+ }
+}
+
+type PageWithChildren = ConfluencePage & { children: PageWithChildren[] };
diff --git a/packages/pieces/community/confluence/src/lib/actions/list-attachments.ts b/packages/pieces/community/confluence/src/lib/actions/list-attachments.ts
index 703b3b2fc7c..21dac08994f 100644
--- a/packages/pieces/community/confluence/src/lib/actions/list-attachments.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/list-attachments.ts
@@ -1,34 +1,27 @@
import { createAction } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall, PaginatedResponse } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { listAttachmentsOutputSchema } from '../output-schemas';
export const listAttachmentsAction = createAction({
auth: confluenceAuth,
name: 'list-attachments',
+ outputSchema: listAttachmentsOutputSchema,
classification: 'SEARCH',
displayName: 'List Attachments',
description: 'Lists all attachments on a page.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Lists the attachments on a Confluence page, returning their metadata including IDs. Use to enumerate a page\'s files or to find an attachment ID to feed into Download Attachment. Requires the page ID. Read-only and idempotent.', idempotent: true },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
},
async run(context) {
const { pageId } = context.propsValue;
- const response = await confluenceApiCall<PaginatedResponse<unknown>>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/pages/${pageId}/attachments`,
- query: { limit: '100' },
- });
+ const results = await confluenceApi.listPageAttachments({ auth: context.auth, pageId });
- return { results: response.results ?? [] };
+ return { results };
},
});
diff --git a/packages/pieces/community/confluence/src/lib/actions/list-comments.ts b/packages/pieces/community/confluence/src/lib/actions/list-comments.ts
index 4dce274f129..9a1bde38cdf 100644
--- a/packages/pieces/community/confluence/src/lib/actions/list-comments.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/list-comments.ts
@@ -1,20 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall, PaginatedResponse } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { listCommentsOutputSchema } from '../output-schemas';
export const listCommentsAction = createAction({
auth: confluenceAuth,
name: 'list-comments',
+ outputSchema: listCommentsOutputSchema,
classification: 'SEARCH',
displayName: 'List Comments',
description: 'Lists footer and/or inline comments on a page.',
- audience: 'both',
- aiMetadata: { description: 'Lists comments on a Confluence page; a comment-type selector controls whether it returns footer comments, inline comments, or both (fetched separately and returned under footer/inline keys). Body representation (storage, view, or atlas doc) is selectable. Use to read or enumerate a page\'s comments. Read-only and idempotent.', idempotent: true },
+ audience: 'human',
+ aiMetadata: { description: 'Lists comments on a Confluence page; a comment-type selector controls whether it returns footer comments, inline comments, or both (fetched separately and returned under footer/inline keys). Body representation (storage or atlas doc) is selectable. Use to read or enumerate a page\'s comments. Read-only and idempotent.', idempotent: true },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
commentType: Property.StaticDropdown({
displayName: 'Comment Type',
required: true,
@@ -36,7 +37,6 @@ export const listCommentsAction = createAction({
disabled: false,
options: [
{ label: 'Storage (XHTML)', value: 'storage' },
- { label: 'View (HTML)', value: 'view' },
{ label: 'Atlas Document Format', value: 'atlas_doc_format' },
],
},
@@ -45,27 +45,19 @@ export const listCommentsAction = createAction({
async run(context) {
const { pageId, commentType, bodyFormat } = context.propsValue;
- const fetch = async (type: 'footer' | 'inline') => {
- const response = await confluenceApiCall<PaginatedResponse<unknown>>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/pages/${pageId}/${type}-comments`,
- query: {
- 'body-format': bodyFormat,
- limit: '100',
- },
+ const fetchComments = async (type: string) =>
+ await confluenceApi.listPageComments({
+ auth: context.auth,
+ pageId,
+ commentType: type,
+ bodyFormat,
});
- return response.results ?? [];
- };
if (commentType === 'both') {
- const [footer, inline] = await Promise.all([fetch('footer'), fetch('inline')]);
+ const [footer, inline] = await Promise.all([fetchComments('footer'), fetchComments('inline')]);
return { footer, inline };
}
- return { results: await fetch(commentType as 'footer' | 'inline') };
+ return { results: await fetchComments(commentType) };
},
});
diff --git a/packages/pieces/community/confluence/src/lib/actions/list-spaces.ts b/packages/pieces/community/confluence/src/lib/actions/list-spaces.ts
index 3a6c7486bf1..8ba08a92011 100644
--- a/packages/pieces/community/confluence/src/lib/actions/list-spaces.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/list-spaces.ts
@@ -1,15 +1,16 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluencePaginatedApiCall } from '../common';
+import { confluenceApi } from '../common/api';
+import { listSpacesOutputSchema } from '../output-schemas';
export const listSpacesAction = createAction({
auth: confluenceAuth,
name: 'list-spaces',
+ outputSchema: listSpacesOutputSchema,
classification: 'SEARCH',
displayName: 'List Spaces',
description: 'Lists all spaces the authenticated user can access.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Lists the Confluence spaces the authenticated user can access (paginated through all results), optionally filtered by space type (global, personal, collaboration, knowledge base) and status (current or archived). Use to discover available spaces or resolve a space to its ID. Read-only and idempotent.', idempotent: true },
props: {
type: Property.StaticDropdown({
@@ -45,15 +46,7 @@ export const listSpacesAction = createAction({
if (type) query['type'] = type;
if (status) query['status'] = status;
- const spaces = await confluencePaginatedApiCall<Record<string, unknown>>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: '/spaces',
- query,
- });
+ const spaces = await confluenceApi.listSpaces({ auth: context.auth, query });
return { count: spaces.length, results: spaces };
},
diff --git a/packages/pieces/community/confluence/src/lib/actions/move-page.ts b/packages/pieces/community/confluence/src/lib/actions/move-page.ts
index a924b3b91f0..1e82c944f28 100644
--- a/packages/pieces/community/confluence/src/lib/actions/move-page.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/move-page.ts
@@ -1,20 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { movePageOutputSchema } from '../output-schemas';
export const movePageAction = createAction({
auth: confluenceAuth,
name: 'move-page',
+ outputSchema: movePageOutputSchema,
classification: 'WRITE',
displayName: 'Move Page',
description: 'Moves a page to a new parent as a child, sibling, or to the top of the parent.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Repositions a Confluence page in the content tree relative to a target page: append/insert it as a child of the target, or place it as a sibling after the target. Use to re-parent or reorder a page. Requires the page ID and the target page ID. Effectively idempotent — re-running with the same position and target leaves the page in the same place.', idempotent: true },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
position: Property.StaticDropdown({
displayName: 'Position Relative to Target',
required: true,
@@ -38,14 +39,7 @@ export const movePageAction = createAction({
async run(context) {
const { pageId, position, targetPageId } = context.propsValue;
- await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.PUT,
- version: 'v1',
- resourceUri: `/content/${pageId}/move/${position}/${targetPageId}`,
- });
+ await confluenceApi.movePage({ auth: context.auth, pageId, position, targetPageId });
return { success: true, pageId, position, targetPageId };
},
diff --git a/packages/pieces/community/confluence/src/lib/actions/publish-draft.ts b/packages/pieces/community/confluence/src/lib/actions/publish-draft.ts
index 6739a139722..cf39530b138 100644
--- a/packages/pieces/community/confluence/src/lib/actions/publish-draft.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/publish-draft.ts
@@ -1,19 +1,12 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-
-type DraftPage = {
- id: string;
- status: string;
- title: string;
- version: { number: number };
- body?: { storage?: { value: string; representation: string } };
-};
+import { confluenceApi } from '../common/api';
+import { publishDraftOutputSchema } from '../output-schemas';
export const publishDraftAction = createAction({
auth: confluenceAuth,
name: 'publish-draft',
+ outputSchema: publishDraftOutputSchema,
classification: 'WRITE',
displayName: 'Publish Draft',
description: 'Publishes a draft page (changes status from draft to current).',
@@ -29,33 +22,21 @@ export const publishDraftAction = createAction({
async run(context) {
const { pageId } = context.propsValue;
- const draft = await confluenceApiCall<DraftPage>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/pages/${pageId}`,
- query: { 'body-format': 'storage', 'get-draft': 'true' },
+ const draft = await confluenceApi.getPage({
+ auth: context.auth,
+ pageId,
+ bodyFormat: 'storage',
+ getDraft: true,
});
- return await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.PUT,
- version: 'v2',
- resourceUri: `/pages/${pageId}`,
- body: {
- id: pageId,
- status: 'current',
- title: draft.title,
- body: {
- representation: draft.body?.storage?.representation ?? 'storage',
- value: draft.body?.storage?.value ?? '',
- },
- version: { number: 1 },
- },
+ return await confluenceApi.updatePage({
+ auth: context.auth,
+ pageId,
+ status: 'current',
+ title: draft.title,
+ representation: draft.body?.storage?.representation ?? 'storage',
+ value: draft.body?.storage?.value ?? '',
+ versionNumber: 1,
});
},
});
diff --git a/packages/pieces/community/confluence/src/lib/actions/remove-label.ts b/packages/pieces/community/confluence/src/lib/actions/remove-label.ts
index a509c363cb3..76f9c8df0e5 100644
--- a/packages/pieces/community/confluence/src/lib/actions/remove-label.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/remove-label.ts
@@ -1,20 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { removeLabelOutputSchema } from '../output-schemas';
export const removeLabelAction = createAction({
auth: confluenceAuth,
name: 'remove-label',
+ outputSchema: removeLabelOutputSchema,
classification: 'WRITE',
displayName: 'Remove Label from Page',
description: 'Removes a label from a page.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Removes a single label, by name, from a Confluence page. Use to untag a page. Requires the page ID and the label name. Effectively idempotent — re-running after the label is gone leaves the page\'s label set unchanged.', idempotent: true },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
label: Property.ShortText({
displayName: 'Label',
description: 'Label name to remove.',
@@ -24,15 +25,7 @@ export const removeLabelAction = createAction({
async run(context) {
const { pageId, label } = context.propsValue;
- await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.DELETE,
- version: 'v1',
- resourceUri: `/content/${pageId}/label`,
- query: { name: label },
- });
+ await confluenceApi.removeLabel({ auth: context.auth, pageId, label });
return { success: true, pageId, label };
},
diff --git a/packages/pieces/community/confluence/src/lib/actions/reply-to-comment.ts b/packages/pieces/community/confluence/src/lib/actions/reply-to-comment.ts
index a06eaa35ea9..16ea19b009b 100644
--- a/packages/pieces/community/confluence/src/lib/actions/reply-to-comment.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/reply-to-comment.ts
@@ -1,11 +1,12 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
+import { confluenceApi } from '../common/api';
+import { replyToCommentOutputSchema } from '../output-schemas';
export const replyToCommentAction = createAction({
auth: confluenceAuth,
name: 'reply-to-comment',
+ outputSchema: replyToCommentOutputSchema,
classification: 'WRITE',
displayName: 'Reply to Comment',
description: 'Replies to an existing footer comment on a page.',
@@ -26,20 +27,10 @@ export const replyToCommentAction = createAction({
async run(context) {
const { parentCommentId, body } = context.propsValue;
- return await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.POST,
- version: 'v2',
- resourceUri: '/footer-comments',
- body: {
- parentCommentId,
- body: {
- representation: 'storage',
- value: body,
- },
- },
+ return await confluenceApi.createFooterComment({
+ auth: context.auth,
+ parentCommentId,
+ value: body,
});
},
});
diff --git a/packages/pieces/community/confluence/src/lib/actions/search-pages.ts b/packages/pieces/community/confluence/src/lib/actions/search-pages.ts
index 902eea9ff0a..a3bf2770a27 100644
--- a/packages/pieces/community/confluence/src/lib/actions/search-pages.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/search-pages.ts
@@ -1,26 +1,19 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod, propsValidation } from '@activepieces/pieces-common';
+import { propsValidation } from '@activepieces/pieces-common';
import * as z from 'zod/mini'
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-
-type CqlSearchResponse = {
- results: unknown[];
- size: number;
- start: number;
- limit: number;
- totalSize?: number;
- _links?: { next?: string };
-};
+import { confluenceApi } from '../common/api';
+import { searchPagesOutputSchema } from '../output-schemas';
export const searchPagesAction = createAction({
auth: confluenceAuth,
name: 'search-pages',
+ outputSchema: searchPagesOutputSchema,
classification: 'SEARCH',
displayName: 'Search Content (CQL)',
description:
'Search Confluence content with CQL (Confluence Query Language). Example: `type = "page" AND space = "DOCS" AND title ~ "release"`.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Searches Confluence content using a CQL (Confluence Query Language) expression, paginating until the max-results cap is reached. Use for flexible, multi-criteria or keyword search across pages/blogposts/comments (by type, space, title, label, date, text); use Find Page by Title for exact-title lookups instead. Requires a valid CQL string. Read-only and idempotent.', idempotent: true },
props: {
cql: Property.LongText({
@@ -49,31 +42,7 @@ export const searchPagesAction = createAction({
maxResults: z.number().check(z.minimum(1), z.maximum(1000)),
});
- const all: unknown[] = [];
- let start = 0;
- const pageSize = 50;
-
- while (all.length < maxResults) {
- const limit = Math.min(pageSize, maxResults - all.length);
- const response = await confluenceApiCall<CqlSearchResponse>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v1',
- resourceUri: '/content/search',
- query: {
- cql,
- start: String(start),
- limit: String(limit),
- ...(expand ? { expand } : {}),
- },
- });
-
- all.push(...response.results);
- if (response.results.length < limit || !response._links?.next) break;
- start += response.results.length;
- }
+ const all = await confluenceApi.searchContent({ auth: context.auth, cql, maxResults, expand });
return { results: all, count: all.length };
},
diff --git a/packages/pieces/community/confluence/src/lib/actions/update-page.ts b/packages/pieces/community/confluence/src/lib/actions/update-page.ts
index 89b9d1ca5ea..d402d30eb2b 100644
--- a/packages/pieces/community/confluence/src/lib/actions/update-page.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/update-page.ts
@@ -1,29 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
import { confluenceAuth } from '../auth';
-import { confluenceApiCall } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
-
-type CurrentPage = {
- id: string;
- status: string;
- title: string;
- spaceId: string;
- version: { number: number };
- body?: { storage?: { value: string; representation: string } };
-};
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { updatePageOutputSchema } from '../output-schemas';
export const updatePageAction = createAction({
auth: confluenceAuth,
name: 'update-page',
+ outputSchema: updatePageOutputSchema,
classification: 'WRITE',
displayName: 'Update Page',
description: 'Updates the title, body, or status of an existing page.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Updates an existing Confluence page identified by page ID, changing its title, body, and/or status; blank title or body fields keep the current values. Reads the current version first and bumps the version number on save. Use to edit a known page. Not strictly idempotent: each call increments the page version even when content is unchanged.', idempotent: false },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
title: Property.ShortText({
displayName: 'Title',
description: 'Leave blank to keep the current title.',
@@ -62,35 +54,20 @@ export const updatePageAction = createAction({
async run(context) {
const { pageId, title, bodyFormat, body, status } = context.propsValue;
- const current = await confluenceApiCall<CurrentPage>({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/pages/${pageId}`,
- query: { 'body-format': 'storage' },
+ const current = await confluenceApi.getPage({
+ auth: context.auth,
+ pageId,
+ bodyFormat: 'storage',
});
- return await confluenceApiCall({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.PUT,
- version: 'v2',
- resourceUri: `/pages/${pageId}`,
- body: {
- id: pageId,
- status: status ?? current.status,
- title: title ?? current.title,
- body: {
- representation: bodyFormat,
- value: body ?? current.body?.storage?.value ?? '',
- },
- version: {
- number: current.version.number + 1,
- },
- },
+ return await confluenceApi.updatePage({
+ auth: context.auth,
+ pageId,
+ status: status ?? current.status,
+ title: title ?? current.title,
+ representation: bodyFormat,
+ value: body ?? current.body?.storage?.value ?? '',
+ versionNumber: current.version.number + 1,
});
},
});
diff --git a/packages/pieces/community/confluence/src/lib/actions/upload-attachment.ts b/packages/pieces/community/confluence/src/lib/actions/upload-attachment.ts
index d4edab7d895..1ed7e70b3d5 100644
--- a/packages/pieces/community/confluence/src/lib/actions/upload-attachment.ts
+++ b/packages/pieces/community/confluence/src/lib/actions/upload-attachment.ts
@@ -1,21 +1,21 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import { HttpMethod } from '@activepieces/pieces-common';
-import FormData from 'form-data';
import { confluenceAuth } from '../auth';
-import { confluenceRawRequest } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { uploadAttachmentOutputSchema } from '../output-schemas';
export const uploadAttachmentAction = createAction({
auth: confluenceAuth,
name: 'upload-attachment',
+ outputSchema: uploadAttachmentOutputSchema,
classification: 'WRITE',
displayName: 'Upload Attachment',
description: 'Uploads a file as an attachment to a page.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Uploads a file as an attachment on a Confluence page via multipart form upload, with an optional version comment and a minor-edit flag to suppress watcher notifications. Use to attach a document or image to a page. Requires the page ID and the file. Uploading the same filename again creates a new version rather than a duplicate, but each call still mutates state, so treat as not idempotent.', idempotent: false },
props: {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
file: Property.File({
displayName: 'File',
required: true,
@@ -35,23 +35,12 @@ export const uploadAttachmentAction = createAction({
async run(context) {
const { pageId, file, comment, minorEdit } = context.propsValue;
- const formData = new FormData();
- const buffer = Buffer.from(file.base64, 'base64');
- formData.append('file', buffer, file.filename);
- if (comment) formData.append('comment', comment);
- formData.append('minorEdit', String(minorEdit ?? true));
-
- return await confluenceRawRequest({
- domain: context.auth.props.confluenceDomain,
- username: context.auth.props.username,
- password: context.auth.props.password,
- method: HttpMethod.POST,
- url: `/wiki/rest/api/content/${pageId}/child/attachment`,
- headers: {
- 'X-Atlassian-Token': 'no-check',
- ...formData.getHeaders(),
- },
- body: formData,
+ return await confluenceApi.uploadAttachment({
+ auth: context.auth,
+ pageId,
+ file,
+ comment,
+ minorEdit,
});
},
});
diff --git a/packages/pieces/community/confluence/src/lib/auth.ts b/packages/pieces/community/confluence/src/lib/auth.ts
index 5d3d759d2ef..d313ef5a045 100644
--- a/packages/pieces/community/confluence/src/lib/auth.ts
+++ b/packages/pieces/community/confluence/src/lib/auth.ts
@@ -1,4 +1,6 @@
-import { AppConnectionValueForAuthProperty, PieceAuth, Property } from '@activepieces/pieces-framework';
+import { AppConnectionType, PieceAuth, Property, tryCatch } from '@activepieces/pieces-framework';
+
+import { confluenceApi } from './common/api';
export const confluenceAuth = PieceAuth.CustomAuth({
description: 'Please refer to this guide to get your api credentials: https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account',
@@ -20,6 +22,16 @@ export const confluenceAuth = PieceAuth.CustomAuth({
description: 'Example value - https://your-domain.atlassian.net (without trailing slash)',
}),
},
+ validate: async ({ auth }) => {
+ const { data, error } = await tryCatch(() =>
+ confluenceApi.getCurrentUser({ auth: { type: AppConnectionType.CUSTOM_AUTH, props: auth } }),
+ );
+ if (error || data?.type !== 'known') {
+ return {
+ valid: false,
+ error: 'Could not connect to Confluence. Check the account email, API token and Confluence domain (e.g. https://your-domain.atlassian.net).',
+ };
+ }
+ return { valid: true };
+ },
});
-
-export type confluenceAuthValue = AppConnectionValueForAuthProperty<typeof confluenceAuth>;
\ No newline at end of file
diff --git a/packages/pieces/community/confluence/src/lib/common/ai-props.ts b/packages/pieces/community/confluence/src/lib/common/ai-props.ts
new file mode 100644
index 00000000000..da0324cff97
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/common/ai-props.ts
@@ -0,0 +1,185 @@
+import { Property } from '@activepieces/pieces-framework';
+
+import type { PropParams } from './props';
+
+function pageId<R extends boolean>({
+ required,
+ displayName = 'Page ID',
+ description = 'Numeric page ID, from List Pages, Search Content or the page URL.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function blogPostId<R extends boolean>({
+ required,
+ displayName = 'Blog Post ID',
+ description = 'Numeric blog post ID, from List Blog Posts or Search Content.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function spaceId<R extends boolean>({
+ required,
+ displayName = 'Space ID',
+ description = 'Numeric space ID (not the space key), from List Spaces or Get Space.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function spaceKey<R extends boolean>({
+ required,
+ displayName = 'Space Key',
+ description = 'Space key such as "DOCS" (not the numeric ID), from List Spaces or Get Space.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function attachmentId<R extends boolean>({
+ required,
+ displayName = 'Attachment ID',
+ description = 'Attachment ID starting with "att", from List Page Attachments or Upload Attachment.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function commentId<R extends boolean>({
+ required,
+ displayName = 'Comment ID',
+ description = 'Numeric comment ID, from a comment list or create action.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function propertyId<R extends boolean>({
+ required,
+ displayName = 'Property ID',
+ description = 'Numeric content property ID, from the matching list or create property action.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function propertyKey<R extends boolean>({
+ required,
+ displayName = 'Property Key',
+ description = 'Key of the content property.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function propertyValue<R extends boolean>({
+ required,
+ displayName = 'Property Value',
+ description = 'JSON object or array to store under the key.',
+}: PropParams<R>) {
+ return Property.Json({ displayName, description, required });
+}
+
+function versionNumber<R extends boolean>({
+ required,
+ displayName = 'Version Number',
+ description = 'Version number, from the matching list versions action.',
+}: PropParams<R>) {
+ return Property.Number({ displayName, description, required });
+}
+
+function body<R extends boolean>({
+ required,
+ displayName = 'Body',
+ description = 'Content in the selected body format. Storage format is Confluence XHTML, e.g. "<p>Hello</p>".',
+}: PropParams<R>) {
+ return Property.LongText({ displayName, description, required });
+}
+
+function bodyFormat<R extends boolean>({
+ required,
+ displayName = 'Body Format',
+ description = 'Format of Body. Defaults to storage (XHTML).',
+}: PropParams<R>) {
+ return Property.StaticDropdown({
+ displayName,
+ description,
+ required,
+ defaultValue: 'storage',
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Storage (XHTML)', value: 'storage' },
+ { label: 'Atlas Document Format (JSON string)', value: 'atlas_doc_format' },
+ { label: 'Wiki Markup', value: 'wiki' },
+ ],
+ },
+ });
+}
+
+function readBodyFormat<R extends boolean>({
+ required,
+ displayName = 'Body Format',
+ description = 'Body representation to include in the response. Leave empty to omit the body.',
+}: PropParams<R>) {
+ return Property.StaticDropdown({
+ displayName,
+ description,
+ required,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Storage (XHTML)', value: 'storage' },
+ { label: 'Atlas Document Format', value: 'atlas_doc_format' },
+ ],
+ },
+ });
+}
+
+function contentStatus<R extends boolean>({
+ required,
+ displayName = 'Status',
+ description = 'Published (current) or draft.',
+}: PropParams<R>) {
+ return Property.StaticDropdown({
+ displayName,
+ description,
+ required,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Published', value: 'current' },
+ { label: 'Draft', value: 'draft' },
+ ],
+ },
+ });
+}
+
+function limit<R extends boolean>({
+ required,
+ displayName = 'Limit',
+ description = 'Maximum number of items to return (1-250). Defaults to 25.',
+}: PropParams<R>) {
+ return Property.Number({ displayName, description, required });
+}
+
+function cursor<R extends boolean>({
+ required,
+ displayName = 'Cursor',
+ description = 'nextCursor from the previous call with the same filters, to get the next page.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+export const confluenceAiProps = {
+ pageId,
+ blogPostId,
+ spaceId,
+ spaceKey,
+ attachmentId,
+ commentId,
+ propertyId,
+ propertyKey,
+ propertyValue,
+ versionNumber,
+ body,
+ bodyFormat,
+ readBodyFormat,
+ contentStatus,
+ limit,
+ cursor,
+};
diff --git a/packages/pieces/community/confluence/src/lib/common/api.ts b/packages/pieces/community/confluence/src/lib/common/api.ts
new file mode 100644
index 00000000000..6413331c4fe
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/common/api.ts
@@ -0,0 +1,1500 @@
+import FormData from 'form-data';
+
+import { HttpMethod } from '@activepieces/pieces-common';
+
+import { confluenceClient } from './client';
+
+import type {
+ ConfluenceAttachment,
+ ConfluenceAuthValue,
+ ConfluenceBlogPost,
+ ConfluenceComment,
+ ConfluenceContentProperty,
+ ConfluenceContentType,
+ ConfluenceCopyDestination,
+ ConfluenceCqlSearchResponse,
+ ConfluenceCurrentUser,
+ ConfluenceCursorPage,
+ ConfluenceFolderSummary,
+ ConfluencePage,
+ ConfluencePageSummary,
+ ConfluencePaginatedResponse,
+ ConfluenceQuery,
+ ConfluenceRecord,
+ ConfluenceSpace,
+ ConfluenceTemplate,
+ ConfluenceTask,
+ ConfluenceTemplateSummary,
+ ConfluenceUserSearchResult,
+ ConfluenceVersionedContent,
+} from './types';
+
+async function getCurrentUser({
+ auth,
+}: {
+ auth: ConfluenceAuthValue;
+}): Promise<ConfluenceCurrentUser> {
+ return await confluenceClient.request<ConfluenceCurrentUser>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V1}/user/current`,
+ });
+}
+
+async function listSpaces({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query?: Record<string, string>;
+}): Promise<ConfluenceSpace[]> {
+ return await confluenceClient.paginateCursor<ConfluenceSpace>({
+ auth,
+ path: `${V2}/spaces`,
+ query,
+ });
+}
+
+async function getSpace({
+ auth,
+ spaceId,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceId: string;
+}): Promise<ConfluenceSpace> {
+ return await confluenceClient.request<ConfluenceSpace>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/spaces/${spaceId}`,
+ });
+}
+
+async function listPages({
+ auth,
+ spaceId,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceId?: string;
+}): Promise<ConfluencePageSummary[]> {
+ return await confluenceClient.paginateCursor<ConfluencePageSummary>({
+ auth,
+ path: spaceId ? `${V2}/spaces/${spaceId}/pages` : `${V2}/pages`,
+ });
+}
+
+async function listSpacePages({
+ auth,
+ spaceId,
+ sort,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceId: string | undefined;
+ sort: string;
+}): Promise<ConfluencePage[]> {
+ const response = await confluenceClient.request<ConfluencePaginatedResponse<ConfluencePage>>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/spaces/${spaceId}/pages`,
+ query: { limit: '100', sort },
+ });
+ return response.results ?? [];
+}
+
+async function listSpaceBlogPosts({
+ auth,
+ spaceId,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceId: string | undefined;
+}): Promise<ConfluenceBlogPost[]> {
+ const response = await confluenceClient.request<ConfluencePaginatedResponse<ConfluenceBlogPost>>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/spaces/${spaceId}/blogposts`,
+ query: { limit: '100', sort: '-created-date' },
+ });
+ return response.results ?? [];
+}
+
+async function findPagesByTitle({
+ auth,
+ title,
+ spaceId,
+}: {
+ auth: ConfluenceAuthValue;
+ title: string;
+ spaceId?: string;
+}): Promise<ConfluencePage[]> {
+ const query: Record<string, string> = { title, limit: '25' };
+ if (spaceId) query['space-id'] = spaceId;
+
+ const response = await confluenceClient.request<ConfluencePaginatedResponse<ConfluencePage>>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/pages`,
+ query,
+ });
+ return response.results ?? [];
+}
+
+async function getPage({
+ auth,
+ pageId,
+ bodyFormat,
+ getDraft,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ bodyFormat?: string;
+ getDraft?: boolean;
+}): Promise<ConfluencePage> {
+ return await confluenceClient.request<ConfluencePage>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/pages/${pageId}`,
+ query: bodyFormat
+ ? { 'body-format': bodyFormat, ...(getDraft ? { 'get-draft': 'true' } : {}) }
+ : undefined,
+ });
+}
+
+async function listPageChildren({
+ auth,
+ pageId,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+}): Promise<ConfluencePageSummary[]> {
+ const response = await confluenceClient.request<{ results: ConfluencePageSummary[] }>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/pages/${pageId}/children`,
+ });
+ return response.results;
+}
+
+async function createPage({
+ auth,
+ spaceId,
+ parentId,
+ title,
+ status,
+ representation,
+ value,
+ isPrivate,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceId: string;
+ parentId: string | undefined;
+ title: string;
+ status: string;
+ representation: string;
+ value: string;
+ isPrivate?: boolean;
+}): Promise<unknown> {
+ return await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/pages`,
+ query: isPrivate ? { private: 'true' } : undefined,
+ body: {
+ spaceId,
+ parentId,
+ title,
+ status,
+ body: { representation, value },
+ },
+ });
+}
+
+async function updatePage({
+ auth,
+ pageId,
+ status,
+ title,
+ representation,
+ value,
+ versionNumber,
+ parentId,
+ versionMessage,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ status: string;
+ title: string;
+ representation: string;
+ value: string;
+ versionNumber: number;
+ parentId?: string;
+ versionMessage?: string;
+}): Promise<unknown> {
+ return await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.PUT,
+ path: `${V2}/pages/${pageId}`,
+ body: {
+ id: pageId,
+ status,
+ title,
+ parentId,
+ body: { representation, value },
+ version: { number: versionNumber, message: versionMessage },
+ },
+ });
+}
+
+async function deletePage({
+ auth,
+ pageId,
+ purge,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ purge?: boolean;
+}): Promise<void> {
+ await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.DELETE,
+ path: `${V2}/pages/${pageId}`,
+ query: purge ? { purge: 'true' } : undefined,
+ });
+}
+
+async function movePage({
+ auth,
+ pageId,
+ position,
+ targetPageId,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ position: string;
+ targetPageId: string;
+}): Promise<void> {
+ await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.PUT,
+ path: `${V1}/content/${pageId}/move/${position}/${targetPageId}`,
+ });
+}
+
+async function searchContent({
+ auth,
+ cql,
+ maxResults,
+ expand,
+}: {
+ auth: ConfluenceAuthValue;
+ cql: string;
+ maxResults: number;
+ expand?: string;
+}): Promise<unknown[]> {
+ const all: unknown[] = [];
+ let start = 0;
+ const pageSize = 50;
+
+ while (all.length < maxResults) {
+ const limit = Math.min(pageSize, maxResults - all.length);
+ const response = await confluenceClient.request<ConfluenceCqlSearchResponse>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V1}/content/search`,
+ query: {
+ cql,
+ start: String(start),
+ limit: String(limit),
+ ...(expand ? { expand } : {}),
+ },
+ });
+
+ all.push(...response.results);
+ if (response.results.length < limit || !response._links?.next) break;
+ start += response.results.length;
+ }
+
+ return all;
+}
+
+async function listPageTemplates({
+ auth,
+ spaceKey,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceKey: string;
+}): Promise<ConfluenceTemplateSummary[]> {
+ return await confluenceClient.paginateOffset<ConfluenceTemplateSummary>({
+ auth,
+ path: `${V1}/template/page`,
+ query: { spaceKey },
+ });
+}
+
+async function getTemplate({
+ auth,
+ templateId,
+}: {
+ auth: ConfluenceAuthValue;
+ templateId: string;
+}): Promise<ConfluenceTemplate> {
+ return await confluenceClient.request<ConfluenceTemplate>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V1}/template/${templateId}`,
+ });
+}
+
+async function listFolderDescendants({
+ auth,
+ contentId,
+}: {
+ auth: ConfluenceAuthValue;
+ contentId: string;
+}): Promise<ConfluenceFolderSummary[]> {
+ return await confluenceClient.paginateOffset<ConfluenceFolderSummary>({
+ auth,
+ path: `${V1}/content/${contentId}/descendant/folder`,
+ });
+}
+
+async function createFooterComment({
+ auth,
+ pageId,
+ parentCommentId,
+ value,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId?: string;
+ parentCommentId?: string;
+ value: string;
+}): Promise<unknown> {
+ return await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/footer-comments`,
+ body: {
+ pageId,
+ parentCommentId,
+ body: {
+ representation: 'storage',
+ value,
+ },
+ },
+ });
+}
+
+async function listPageComments({
+ auth,
+ pageId,
+ commentType,
+ bodyFormat,
+ sort,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string | undefined;
+ commentType: string;
+ bodyFormat: string;
+ sort?: string;
+}): Promise<ConfluenceComment[]> {
+ const response = await confluenceClient.request<ConfluencePaginatedResponse<ConfluenceComment>>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/pages/${pageId}/${commentType}-comments`,
+ query: {
+ limit: '100',
+ ...(sort ? { sort } : {}),
+ 'body-format': bodyFormat,
+ },
+ });
+ return response.results ?? [];
+}
+
+async function listPageAttachments({
+ auth,
+ pageId,
+ sort,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string | undefined;
+ sort?: string;
+}): Promise<ConfluenceAttachment[]> {
+ const response = await confluenceClient.request<
+ ConfluencePaginatedResponse<ConfluenceAttachment>
+ >({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/pages/${pageId}/attachments`,
+ query: { limit: '100', ...(sort ? { sort } : {}) },
+ });
+ return response.results ?? [];
+}
+
+async function getAttachment({
+ auth,
+ attachmentId,
+}: {
+ auth: ConfluenceAuthValue;
+ attachmentId: string;
+}): Promise<ConfluenceAttachment> {
+ return await confluenceClient.request<ConfluenceAttachment>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/attachments/${attachmentId}`,
+ });
+}
+
+async function downloadAttachment({
+ auth,
+ downloadLink,
+}: {
+ auth: ConfluenceAuthValue;
+ downloadLink: string;
+}): Promise<Buffer> {
+ return await confluenceClient.request<Buffer>({
+ auth,
+ method: HttpMethod.GET,
+ path: downloadLink,
+ responseType: 'arraybuffer',
+ followRedirects: true,
+ });
+}
+
+async function uploadAttachment({
+ auth,
+ pageId,
+ file,
+ comment,
+ minorEdit,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ file: { base64: string; filename: string };
+ comment?: string;
+ minorEdit?: boolean;
+}): Promise<unknown> {
+ const formData = new FormData();
+ const buffer = Buffer.from(file.base64, 'base64');
+ formData.append('file', buffer, file.filename);
+ if (comment) formData.append('comment', comment);
+ formData.append('minorEdit', String(minorEdit ?? true));
+
+ return await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V1}/content/${pageId}/child/attachment`,
+ headers: {
+ 'X-Atlassian-Token': 'no-check',
+ ...formData.getHeaders(),
+ },
+ body: formData,
+ });
+}
+
+async function addLabels({
+ auth,
+ pageId,
+ prefix,
+ names,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ prefix: string;
+ names: unknown[];
+}): Promise<unknown> {
+ return await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V1}/content/${pageId}/label`,
+ body: names.map((name) => ({ prefix, name })),
+ });
+}
+
+async function removeLabel({
+ auth,
+ pageId,
+ label,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ label: string;
+}): Promise<void> {
+ await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.DELETE,
+ path: `${V1}/content/${pageId}/label`,
+ query: { name: label },
+ });
+}
+
+async function searchUsers({
+ auth,
+ keyword,
+ limit,
+}: {
+ auth: ConfluenceAuthValue;
+ keyword: string;
+ limit?: number;
+}): Promise<Record<string, unknown>[]> {
+ const cql = `user.fullname ~ "${keyword.replace(/"/g, '\\"')}" OR user = "${keyword.replace(
+ /"/g,
+ '\\"',
+ )}"`;
+
+ const response = await confluenceClient.request<ConfluenceUserSearchResult>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V1}/search/user`,
+ query: {
+ cql,
+ limit: String(limit ?? 25),
+ },
+ });
+ return (response.results ?? []).map((r) => r.user);
+}
+
+async function listPagesPage({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceCursorPage> {
+ return await getCursorPage({ auth, path: `${V2}/pages`, query });
+}
+
+async function getContent({
+ auth,
+ contentType,
+ contentId,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+ query?: ConfluenceQuery;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V2}/${contentType}/${contentId}`, query });
+}
+
+async function getVersionedContent({
+ auth,
+ contentType,
+ contentId,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+}): Promise<ConfluenceVersionedContent> {
+ return await confluenceClient.request<ConfluenceVersionedContent>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/${contentType}/${contentId}`,
+ query: { 'body-format': 'storage' },
+ });
+}
+
+async function deleteContent({
+ auth,
+ contentType,
+ contentId,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+ query?: ConfluenceQuery;
+}): Promise<void> {
+ await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.DELETE,
+ path: `${V2}/${contentType}/${contentId}`,
+ query: query ? toQuery({ query }) : undefined,
+ });
+}
+
+async function listContentChildren({
+ auth,
+ contentType,
+ contentId,
+ relation,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+ relation: string;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceCursorPage> {
+ return await getCursorPage({
+ auth,
+ path: `${V2}/${contentType}/${contentId}/${relation}`,
+ query,
+ });
+}
+
+async function getContentLikeCount({
+ auth,
+ contentType,
+ contentId,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V2}/${contentType}/${contentId}/likes/count` });
+}
+
+async function listContentOperations({
+ auth,
+ contentType,
+ contentId,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V2}/${contentType}/${contentId}/operations` });
+}
+
+async function getContentVersion({
+ auth,
+ contentType,
+ contentId,
+ versionNumber,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+ versionNumber: number;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({
+ auth,
+ path: `${V2}/${contentType}/${contentId}/versions/${versionNumber}`,
+ });
+}
+
+async function createBlogPost({
+ auth,
+ spaceId,
+ title,
+ status,
+ representation,
+ value,
+ isPrivate,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceId: string;
+ title: string;
+ status: string;
+ representation: string;
+ value: string;
+ isPrivate?: boolean;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/blogposts`,
+ query: isPrivate ? { private: 'true' } : undefined,
+ body: { spaceId, title, status, body: { representation, value } },
+ });
+}
+
+async function updateBlogPost({
+ auth,
+ blogPostId,
+ title,
+ status,
+ representation,
+ value,
+ versionNumber,
+ versionMessage,
+}: {
+ auth: ConfluenceAuthValue;
+ blogPostId: string;
+ title: string;
+ status: string;
+ representation: string;
+ value: string;
+ versionNumber: number;
+ versionMessage?: string;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.PUT,
+ path: `${V2}/blogposts/${blogPostId}`,
+ body: {
+ id: blogPostId,
+ status,
+ title,
+ body: { representation, value },
+ version: { number: versionNumber, message: versionMessage },
+ },
+ });
+}
+
+async function listBlogPostsPage({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceCursorPage> {
+ return await getCursorPage({ auth, path: `${V2}/blogposts`, query });
+}
+
+async function createFooterCommentOn({
+ auth,
+ pageId,
+ blogPostId,
+ attachmentId,
+ representation,
+ value,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId?: string;
+ blogPostId?: string;
+ attachmentId?: string;
+ representation: string;
+ value: string;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/footer-comments`,
+ body: { pageId, blogPostId, attachmentId, body: { representation, value } },
+ });
+}
+
+async function createInlineComment({
+ auth,
+ pageId,
+ blogPostId,
+ parentCommentId,
+ representation,
+ value,
+ textSelection,
+ textSelectionMatchCount,
+ textSelectionMatchIndex,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId?: string;
+ blogPostId?: string;
+ parentCommentId?: string;
+ representation: string;
+ value: string;
+ textSelection?: string;
+ textSelectionMatchCount?: number;
+ textSelectionMatchIndex?: number;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/inline-comments`,
+ body: {
+ pageId,
+ blogPostId,
+ parentCommentId,
+ body: { representation, value },
+ inlineCommentProperties:
+ textSelection === undefined
+ ? undefined
+ : { textSelection, textSelectionMatchCount, textSelectionMatchIndex },
+ },
+ });
+}
+
+async function updateComment({
+ auth,
+ commentType,
+ commentId,
+ representation,
+ value,
+ versionNumber,
+ resolved,
+}: {
+ auth: ConfluenceAuthValue;
+ commentType: 'footer-comments' | 'inline-comments';
+ commentId: string;
+ representation: string;
+ value: string;
+ versionNumber: number;
+ resolved?: boolean;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.PUT,
+ path: `${V2}/${commentType}/${commentId}`,
+ body: { version: { number: versionNumber }, body: { representation, value }, resolved },
+ });
+}
+
+async function listLabelsPage({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceCursorPage> {
+ return await getCursorPage({ auth, path: `${V2}/labels`, query });
+}
+
+async function getLabel({
+ auth,
+ name,
+ type,
+ start,
+ limit,
+}: {
+ auth: ConfluenceAuthValue;
+ name: string;
+ type?: string;
+ start?: number;
+ limit?: number;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V1}/label`, query: { name, type, start, limit } });
+}
+
+async function addSpaceLabels({
+ auth,
+ spaceKey,
+ prefix,
+ names,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceKey: string;
+ prefix: string;
+ names: string[];
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V1}/space/${spaceKey}/label`,
+ body: names.map((name) => ({ prefix, name })),
+ });
+}
+
+async function removeSpaceLabel({
+ auth,
+ spaceKey,
+ name,
+ prefix,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceKey: string;
+ name: string;
+ prefix?: string;
+}): Promise<void> {
+ await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.DELETE,
+ path: `${V1}/space/${spaceKey}/label`,
+ query: toQuery({ query: { name, prefix } }),
+ });
+}
+
+async function createContentProperty({
+ auth,
+ contentType,
+ contentId,
+ key,
+ value,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+ key: string;
+ value: unknown;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/${contentType}/${contentId}/properties`,
+ body: { key, value },
+ });
+}
+
+async function getContentProperty({
+ auth,
+ contentType,
+ contentId,
+ propertyId,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+ propertyId: string;
+}): Promise<ConfluenceContentProperty> {
+ return await confluenceClient.request<ConfluenceContentProperty>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/${contentType}/${contentId}/properties/${propertyId}`,
+ });
+}
+
+async function updateContentProperty({
+ auth,
+ contentType,
+ contentId,
+ propertyId,
+ key,
+ value,
+ versionNumber,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+ propertyId: string;
+ key: string;
+ value: unknown;
+ versionNumber: number;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.PUT,
+ path: `${V2}/${contentType}/${contentId}/properties/${propertyId}`,
+ body: { key, value, version: { number: versionNumber } },
+ });
+}
+
+async function deleteContentProperty({
+ auth,
+ contentType,
+ contentId,
+ propertyId,
+}: {
+ auth: ConfluenceAuthValue;
+ contentType: ConfluenceContentType;
+ contentId: string;
+ propertyId: string;
+}): Promise<void> {
+ await confluenceClient.request<unknown>({
+ auth,
+ method: HttpMethod.DELETE,
+ path: `${V2}/${contentType}/${contentId}/properties/${propertyId}`,
+ });
+}
+
+async function listSpacesPage({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceCursorPage> {
+ return await getCursorPage({ auth, path: `${V2}/spaces`, query });
+}
+
+async function createSpace({
+ auth,
+ name,
+ key,
+ description,
+ isPrivate,
+}: {
+ auth: ConfluenceAuthValue;
+ name: string;
+ key?: string;
+ description?: string;
+ isPrivate?: boolean;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/spaces`,
+ body: {
+ name,
+ key,
+ description:
+ description === undefined ? undefined : { value: description, representation: 'plain' },
+ createPrivateSpace: isPrivate,
+ },
+ });
+}
+
+async function updateSpace({
+ auth,
+ spaceKey,
+ name,
+ description,
+ homepageId,
+ status,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceKey: string;
+ name?: string;
+ description?: string;
+ homepageId?: string;
+ status?: string;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.PUT,
+ path: `${V1}/space/${spaceKey}`,
+ body: {
+ name,
+ description:
+ description === undefined
+ ? undefined
+ : { plain: { value: description, representation: 'plain' } },
+ homepage: homepageId === undefined ? undefined : { id: homepageId },
+ status,
+ },
+ });
+}
+
+async function deleteSpace({
+ auth,
+ spaceKey,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceKey: string;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.DELETE,
+ path: `${V1}/space/${spaceKey}`,
+ });
+}
+
+async function createWhiteboard({
+ auth,
+ spaceId,
+ title,
+ parentId,
+ templateKey,
+ isPrivate,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceId: string;
+ title?: string;
+ parentId?: string;
+ templateKey?: string;
+ isPrivate?: boolean;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/whiteboards`,
+ query: isPrivate ? { private: 'true' } : undefined,
+ body: { spaceId, title, parentId, templateKey },
+ });
+}
+
+async function createFolder({
+ auth,
+ spaceId,
+ title,
+ parentId,
+}: {
+ auth: ConfluenceAuthValue;
+ spaceId: string;
+ title?: string;
+ parentId?: string;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V2}/folders`,
+ body: { spaceId, title, parentId },
+ });
+}
+
+async function listTasksPage({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceCursorPage> {
+ return await getCursorPage({ auth, path: `${V2}/tasks`, query });
+}
+
+async function getTask({
+ auth,
+ taskId,
+ bodyFormat,
+}: {
+ auth: ConfluenceAuthValue;
+ taskId: string;
+ bodyFormat?: string;
+}): Promise<ConfluenceTask> {
+ return await confluenceClient.request<ConfluenceTask>({
+ auth,
+ method: HttpMethod.GET,
+ path: `${V2}/tasks/${taskId}`,
+ query: toQuery({ query: { 'body-format': bodyFormat } }),
+ });
+}
+
+async function updateTask({
+ auth,
+ task,
+ status,
+}: {
+ auth: ConfluenceAuthValue;
+ task: ConfluenceTask;
+ status: string;
+}): Promise<ConfluenceTask> {
+ return await confluenceClient.request<ConfluenceTask>({
+ auth,
+ method: HttpMethod.PUT,
+ path: `${V2}/tasks/${task.id}`,
+ query: { 'body-format': 'storage' },
+ body: {
+ id: task.id,
+ localId: task.localId,
+ spaceId: task.spaceId,
+ pageId: task.pageId,
+ blogPostId: task.blogPostId,
+ status,
+ createdBy: task.createdBy,
+ assignedTo: task.assignedTo,
+ completedBy: task.completedBy,
+ createdAt: task.createdAt,
+ updatedAt: task.updatedAt,
+ dueAt: task.dueAt,
+ completedAt: task.completedAt,
+ },
+ });
+}
+
+async function getUser({
+ auth,
+ accountId,
+}: {
+ auth: ConfluenceAuthValue;
+ accountId: string;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V1}/user`, query: { accountId } });
+}
+
+async function listGroups({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V1}/group`, query });
+}
+
+async function listGroupMembers({
+ auth,
+ groupId,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ groupId: string;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V1}/group/${groupId}/membersByGroupId`, query });
+}
+
+async function searchByCql({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceCursorPage> {
+ return await getCursorPage({ auth, path: `${V1}/search`, query });
+}
+
+async function listAuditRecords({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V1}/audit`, query });
+}
+
+async function getContentRestrictions({
+ auth,
+ contentId,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ contentId: string;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V1}/content/${contentId}/restriction`, query });
+}
+
+async function listPageTemplatesPage({
+ auth,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V1}/template/page`, query });
+}
+
+async function getTemplateDetails({
+ auth,
+ templateId,
+}: {
+ auth: ConfluenceAuthValue;
+ templateId: string;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({
+ auth,
+ path: `${V1}/template/${templateId}`,
+ query: { expand: 'body.storage' },
+ });
+}
+
+async function updatePageTitle({
+ auth,
+ pageId,
+ title,
+ status,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ title: string;
+ status: string;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.PUT,
+ path: `${V2}/pages/${pageId}/title`,
+ body: { status, title },
+ });
+}
+
+async function restoreContentVersion({
+ auth,
+ contentId,
+ versionNumber,
+ message,
+ restoreTitle,
+}: {
+ auth: ConfluenceAuthValue;
+ contentId: string;
+ versionNumber: number;
+ message: string;
+ restoreTitle?: boolean;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V1}/content/${contentId}/version`,
+ body: { operationKey: 'restore', params: { versionNumber, message, restoreTitle } },
+ });
+}
+
+async function copyPage({
+ auth,
+ pageId,
+ destination,
+ pageTitle,
+ copyAttachments,
+ copyLabels,
+ copyPermissions,
+ copyProperties,
+}: {
+ auth: ConfluenceAuthValue;
+ pageId: string;
+ destination: ConfluenceCopyDestination;
+ pageTitle?: string;
+ copyAttachments?: boolean;
+ copyLabels?: boolean;
+ copyPermissions?: boolean;
+ copyProperties?: boolean;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V1}/content/${pageId}/copy`,
+ body: { destination, pageTitle, copyAttachments, copyLabels, copyPermissions, copyProperties },
+ });
+}
+
+async function archivePages({
+ auth,
+ pageIds,
+}: {
+ auth: ConfluenceAuthValue;
+ pageIds: string[];
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.POST,
+ path: `${V1}/content/archive`,
+ body: { pages: pageIds.map((id) => ({ id })) },
+ });
+}
+
+async function getLongTask({
+ auth,
+ taskId,
+}: {
+ auth: ConfluenceAuthValue;
+ taskId: string;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({ auth, path: `${V1}/longtask/${taskId}` });
+}
+
+async function getContentViews({
+ auth,
+ contentId,
+ fromDate,
+}: {
+ auth: ConfluenceAuthValue;
+ contentId: string;
+ fromDate?: string;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({
+ auth,
+ path: `${V1}/analytics/content/${contentId}/views`,
+ query: { fromDate },
+ });
+}
+
+async function getContentViewers({
+ auth,
+ contentId,
+ fromDate,
+}: {
+ auth: ConfluenceAuthValue;
+ contentId: string;
+ fromDate?: string;
+}): Promise<ConfluenceRecord> {
+ return await getRecord({
+ auth,
+ path: `${V1}/analytics/content/${contentId}/viewers`,
+ query: { fromDate },
+ });
+}
+
+async function getRecord({
+ auth,
+ path,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ path: string;
+ query?: ConfluenceQuery;
+}): Promise<ConfluenceRecord> {
+ return await confluenceClient.request<ConfluenceRecord>({
+ auth,
+ method: HttpMethod.GET,
+ path,
+ query: query ? toQuery({ query }) : undefined,
+ });
+}
+
+async function getCursorPage({
+ auth,
+ path,
+ query,
+}: {
+ auth: ConfluenceAuthValue;
+ path: string;
+ query: ConfluenceQuery;
+}): Promise<ConfluenceCursorPage> {
+ const response = await confluenceClient.request<ConfluencePaginatedResponse<ConfluenceRecord>>({
+ auth,
+ method: HttpMethod.GET,
+ path,
+ query: toQuery({ query: { ...query, limit: query['limit'] ?? DEFAULT_LIMIT } }),
+ });
+ const results = response.results ?? [];
+ const next = response._links?.next;
+ return {
+ results,
+ count: results.length,
+ nextCursor: next
+ ? new URL(next, 'https://confluence.invalid').searchParams.get('cursor')
+ : null,
+ };
+}
+
+function toQuery({ query }: { query: ConfluenceQuery }): Record<string, string> {
+ return Object.fromEntries(
+ Object.entries(query)
+ .filter(([, value]) => value !== undefined && value !== '')
+ .map(([key, value]) => [key, String(value)]),
+ );
+}
+
+export const confluenceApi = {
+ getCurrentUser,
+ listSpaces,
+ getSpace,
+ listPages,
+ listSpacePages,
+ listSpaceBlogPosts,
+ findPagesByTitle,
+ getPage,
+ listPageChildren,
+ createPage,
+ updatePage,
+ deletePage,
+ movePage,
+ searchContent,
+ listPageTemplates,
+ getTemplate,
+ listFolderDescendants,
+ createFooterComment,
+ listPageComments,
+ listPageAttachments,
+ getAttachment,
+ downloadAttachment,
+ uploadAttachment,
+ addLabels,
+ removeLabel,
+ searchUsers,
+ listPagesPage,
+ getContent,
+ getVersionedContent,
+ deleteContent,
+ listContentChildren,
+ getContentLikeCount,
+ listContentOperations,
+ getContentVersion,
+ createBlogPost,
+ updateBlogPost,
+ listBlogPostsPage,
+ createFooterCommentOn,
+ createInlineComment,
+ updateComment,
+ listLabelsPage,
+ getLabel,
+ addSpaceLabels,
+ removeSpaceLabel,
+ createContentProperty,
+ getContentProperty,
+ updateContentProperty,
+ deleteContentProperty,
+ listSpacesPage,
+ createSpace,
+ updateSpace,
+ deleteSpace,
+ createWhiteboard,
+ createFolder,
+ listTasksPage,
+ getTask,
+ updateTask,
+ getUser,
+ listGroups,
+ listGroupMembers,
+ searchByCql,
+ listAuditRecords,
+ getContentRestrictions,
+ listPageTemplatesPage,
+ getTemplateDetails,
+ updatePageTitle,
+ restoreContentVersion,
+ copyPage,
+ archivePages,
+ getLongTask,
+ getContentViews,
+ getContentViewers,
+};
+
+const V1 = '/rest/api';
+const V2 = '/api/v2';
+const DEFAULT_LIMIT = 25;
diff --git a/packages/pieces/community/confluence/src/lib/common/client.ts b/packages/pieces/community/confluence/src/lib/common/client.ts
new file mode 100644
index 00000000000..2995a696295
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/common/client.ts
@@ -0,0 +1,113 @@
+import {
+ AuthenticationType,
+ httpClient,
+ HttpMethod,
+ QueryParams,
+} from '@activepieces/pieces-common';
+import { isNil } from '@activepieces/pieces-framework';
+
+import type { ConfluenceAuthValue, ConfluencePaginatedResponse } from './types';
+
+function domainUrl({ auth }: { auth: ConfluenceAuthValue }): string {
+ return auth.props.confluenceDomain.replace(/\/+$/, '');
+}
+
+function baseUrl({ auth }: { auth: ConfluenceAuthValue }): string {
+ return `${domainUrl({ auth })}/wiki`;
+}
+
+async function sendRequest<T>({
+ auth,
+ url,
+ method,
+ query,
+ body,
+ headers,
+ responseType,
+ followRedirects,
+}: Omit<RequestParams, 'path'> & { auth: ConfluenceAuthValue; url: string }): Promise<T> {
+ const response = await httpClient.sendRequest<T>({
+ method,
+ url,
+ authentication: {
+ type: AuthenticationType.BASIC,
+ username: auth.props.username,
+ password: auth.props.password,
+ },
+ queryParams: query,
+ body,
+ headers,
+ responseType,
+ followRedirects,
+ });
+ return response.body;
+}
+
+async function request<T>({
+ auth,
+ path,
+ ...rest
+}: RequestParams & { auth: ConfluenceAuthValue }): Promise<T> {
+ return await sendRequest<T>({ auth, url: `${baseUrl({ auth })}${path}`, ...rest });
+}
+
+async function paginateCursor<T>({
+ auth,
+ path,
+ query,
+}: PaginateParams & { auth: ConfluenceAuthValue }): Promise<T[]> {
+ const items: T[] = [];
+ let nextUrl = `${baseUrl({ auth })}${path}?limit=${CURSOR_PAGE_SIZE}`;
+ do {
+ const response = await sendRequest<ConfluencePaginatedResponse<T>>({
+ auth,
+ method: HttpMethod.GET,
+ url: nextUrl,
+ query: query ?? {},
+ });
+ if (isNil(response.results)) {
+ break;
+ }
+ items.push(...response.results);
+ nextUrl = response._links?.next ? `${domainUrl({ auth })}${response._links.next}` : '';
+ } while (nextUrl);
+ return items;
+}
+
+async function paginateOffset<T>({
+ auth,
+ path,
+ query,
+}: PaginateParams & { auth: ConfluenceAuthValue }): Promise<T[]> {
+ const items: T[] = [];
+ for (let start = 0; ; start += OFFSET_PAGE_SIZE) {
+ const response = await sendRequest<ConfluencePaginatedResponse<T>>({
+ auth,
+ method: HttpMethod.GET,
+ url: `${baseUrl({ auth })}${path}?start=${start}&limit=${OFFSET_PAGE_SIZE}`,
+ query: query ?? {},
+ });
+ if (isNil(response.results) || response.results.length === 0) {
+ break;
+ }
+ items.push(...response.results);
+ }
+ return items;
+}
+
+export const confluenceClient = { baseUrl, request, paginateCursor, paginateOffset };
+
+const CURSOR_PAGE_SIZE = 200;
+const OFFSET_PAGE_SIZE = 100;
+
+type RequestParams = {
+ method: HttpMethod;
+ path: string;
+ query?: QueryParams;
+ body?: unknown;
+ headers?: Record<string, string>;
+ responseType?: 'arraybuffer' | 'json' | 'blob' | 'text';
+ followRedirects?: boolean;
+};
+
+type PaginateParams = { path: string; query?: QueryParams };
diff --git a/packages/pieces/community/confluence/src/lib/common/index.ts b/packages/pieces/community/confluence/src/lib/common/index.ts
deleted file mode 100644
index 4722ed6fa48..00000000000
--- a/packages/pieces/community/confluence/src/lib/common/index.ts
+++ /dev/null
@@ -1,189 +0,0 @@
-import {
- AuthenticationType,
- httpClient,
- HttpMessageBody,
- HttpMethod,
- HttpRequest,
- QueryParams,
-} from '@activepieces/pieces-common';
-import { isNil } from '@activepieces/pieces-framework';
-
-function normalizeDomain(domain: string): string {
- return domain.replace(/\/+$/, '');
-}
-
-export type ConfluenceApiCallParams = {
- domain: string;
- username: string;
- password: string;
- version: 'v1' | 'v2';
- method: HttpMethod;
- resourceUri: string;
- query?: QueryParams;
- body?: any;
- headers?: Record<string, string>;
-};
-
-export type PaginatedResponse<T> = {
- results: T[];
- _links?: {
- next?: string;
- };
-};
-
-export async function confluenceApiCall<T extends HttpMessageBody>({
- domain,
- username,
- password,
- method,
- version,
- resourceUri,
- query,
- body,
- headers,
-}: ConfluenceApiCallParams): Promise<T> {
- const normalized = normalizeDomain(domain);
- const baseUrl = version === 'v2' ? `${normalized}/wiki/api/v2` : `${normalized}/wiki/rest/api`;
-
- const request: HttpRequest = {
- method,
- url: baseUrl + resourceUri,
- authentication: {
- type: AuthenticationType.BASIC,
- username,
- password,
- },
- queryParams: query,
- body: body,
- headers,
- };
-
- const response = await httpClient.sendRequest<T>(request);
- return response.body;
-}
-
-export async function confluencePaginatedApiCall<T extends HttpMessageBody>({
- domain,
- username,
- password,
- method,
- version,
- resourceUri,
- query,
- body,
-}: ConfluenceApiCallParams): Promise<T[]> {
- const qs = query ? query : {};
- const resultData: T[] = [];
- const normalized = normalizeDomain(domain);
-
- if (version === 'v2') {
- let nextUrl = `${normalized}/wiki/api/v2${resourceUri}?limit=200`;
-
- do {
- const response = await httpClient.sendRequest<PaginatedResponse<T>>({
- method,
- url: nextUrl,
- authentication: {
- type: AuthenticationType.BASIC,
- username,
- password,
- },
- queryParams: qs,
- body,
- });
-
- if (isNil(response.body.results)) {
- break;
- }
- resultData.push(...response.body.results);
- nextUrl = response.body?._links?.next ? `${normalized}${response.body._links.next}` : '';
- } while (nextUrl);
- } else {
- let start = 0;
- let hasMoreData = true;
-
- do {
- const response = await httpClient.sendRequest<{ results: T[] }>({
- method,
- url: `${normalized}/wiki/rest/api${resourceUri}?start=${start}&limit=100`,
- authentication: {
- type: AuthenticationType.BASIC,
- username,
- password,
- },
- queryParams: qs,
- body,
- });
- if (isNil(response.body.results) || response.body.results.length === 0) {
- hasMoreData = false;
- } else {
- resultData.push(...response.body.results);
- start += 100;
- }
- } while (hasMoreData);
- }
-
- return resultData;
-}
-
-export type ConfluenceRawRequestParams = {
- domain: string;
- username: string;
- password: string;
- method: HttpMethod;
- url: string;
- query?: QueryParams;
- body?: any;
- headers?: Record<string, string>;
- responseType?: 'arraybuffer' | 'json' | 'blob' | 'text';
- followRedirects?: boolean;
-};
-
-export async function confluenceRawRequest<T>({
- domain,
- username,
- password,
- method,
- url,
- query,
- body,
- headers,
- responseType,
- followRedirects,
-}: ConfluenceRawRequestParams): Promise<T> {
- const normalized = normalizeDomain(domain);
- const fullUrl = url.startsWith('http') ? url : `${normalized}${url}`;
-
- const response = await httpClient.sendRequest<T>({
- method,
- url: fullUrl,
- authentication: {
- type: AuthenticationType.BASIC,
- username,
- password,
- },
- queryParams: query,
- body,
- headers,
- responseType,
- followRedirects,
- });
- return response.body;
-}
-
-export function escapeStorageValue(value: string): string {
- return value
- .replace(/&/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&apos;');
-}
-
-export function parsePageIdFromUrl(url: string): string | null {
- const pageIdFromPath = url.match(/\/pages\/(\d+)/);
- if (pageIdFromPath) return pageIdFromPath[1];
- const pageIdFromQuery = url.match(/[?&]pageId=(\d+)/);
- if (pageIdFromQuery) return pageIdFromQuery[1];
- return null;
-}
diff --git a/packages/pieces/community/confluence/src/lib/common/props.ts b/packages/pieces/community/confluence/src/lib/common/props.ts
index 50dce26a55a..8e1166d3635 100644
--- a/packages/pieces/community/confluence/src/lib/common/props.ts
+++ b/packages/pieces/community/confluence/src/lib/common/props.ts
@@ -1,35 +1,28 @@
-import { HttpMethod } from '@activepieces/pieces-common';
-import { confluenceApiCall, confluencePaginatedApiCall } from '.';
-import { confluenceAuth } from '../auth';
import {
DropdownOption,
+ DropdownState,
DynamicPropsValue,
Property,
} from '@activepieces/pieces-framework';
import { parseStringPromise } from 'xml2js';
-function buildSpaceDropdown(required: boolean) {
+import { confluenceAuth } from '../auth';
+import { confluenceApi } from './api';
+
+import type { ConfluenceTemplateDeclarations } from './types';
+
+function spaceId<R extends boolean>({ required, displayName = 'Space', description }: PropParams<R>) {
return Property.Dropdown({
auth: confluenceAuth,
- displayName: 'Space',
+ displayName,
+ description,
refreshers: [],
required,
options: async ({ auth }) => {
if (!auth) {
- return {
- disabled: true,
- options: [],
- placeholder: 'Please connect your account first.',
- };
+ return disabledOptions({ placeholder: 'Please connect your account first.' });
}
- const spaces = await confluencePaginatedApiCall<{ id: string; name: string }>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- version: 'v2',
- method: HttpMethod.GET,
- resourceUri: '/spaces',
- });
+ const spaces = await confluenceApi.listSpaces({ auth });
return {
disabled: false,
options: spaces.map((space) => ({ label: space.name, value: space.id })),
@@ -38,31 +31,20 @@ function buildSpaceDropdown(required: boolean) {
});
}
-export const spaceIdProp = buildSpaceDropdown(true);
-export const spaceIdPropOptional = buildSpaceDropdown(false);
-
-function buildPageDropdown(displayName: string, required: boolean) {
+function pageId<R extends boolean>({ required, displayName = 'Page', description }: PropParams<R>) {
return Property.Dropdown({
auth: confluenceAuth,
displayName,
+ description,
refreshers: ['spaceId'],
required,
options: async ({ auth, spaceId }) => {
if (!auth) {
- return {
- disabled: true,
- options: [],
- placeholder: 'Please connect your account first.',
- };
+ return disabledOptions({ placeholder: 'Please connect your account first.' });
}
- const resourceUri = spaceId ? `/spaces/${spaceId}/pages` : `/pages`;
- const pages = await confluencePaginatedApiCall<{ id: string; title: string }>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- version: 'v2',
- method: HttpMethod.GET,
- resourceUri,
+ const pages = await confluenceApi.listPages({
+ auth,
+ spaceId: spaceId ? String(spaceId) : undefined,
});
return {
disabled: false,
@@ -72,210 +54,190 @@ function buildPageDropdown(displayName: string, required: boolean) {
});
}
-export const pageIdProp = buildPageDropdown('Page', true);
-export const pageIdPropOptional = buildPageDropdown('Page', false);
-export const parentPageIdProp = buildPageDropdown('Parent Page', false);
+function templateId<R extends boolean>({ required, displayName = 'Template', description }: PropParams<R>) {
+ return Property.Dropdown({
+ displayName,
+ description,
+ auth: confluenceAuth,
+ refreshers: ['spaceId'],
+ required,
+ options: async ({ auth, spaceId }) => {
+ if (!auth || !spaceId) {
+ return disabledOptions({
+ placeholder: 'Please connect your account first and select a space.',
+ });
+ }
+
+ const space = await confluenceApi.getSpace({ auth, spaceId: String(spaceId) });
-export const templateIdProp = Property.Dropdown({
- displayName: 'Template',
- auth: confluenceAuth,
- refreshers: ['spaceId'],
- required: true,
- options: async ({ auth, spaceId }) => {
- if (!auth || !spaceId) {
+ const templates = await confluenceApi.listPageTemplates({ auth, spaceKey: space.key });
+
+ const options: DropdownOption<string>[] = [];
+ for (const template of templates) {
+ options.push({
+ label: template.name,
+ value: template.templateId,
+ });
+ }
return {
- disabled: true,
- options: [],
- placeholder: 'Please connect your account first and select a space.',
+ disabled: false,
+ options,
};
- }
+ },
+ });
+}
- const space = await confluenceApiCall<{ id: string; name: string; key: string }>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/spaces/${spaceId}`,
- });
+function folderId<R extends boolean>({ required, displayName = 'Parent Folder', description }: PropParams<R>) {
+ return Property.Dropdown({
+ displayName,
+ description,
+ auth: confluenceAuth,
+ refreshers: ['spaceId'],
+ required,
+ options: async ({ auth, spaceId }) => {
+ if (!auth || !spaceId) {
+ return disabledOptions({
+ placeholder: 'Please connect your account first and select a space.',
+ });
+ }
- const templates = await confluencePaginatedApiCall<{ templateId: string; name: string }>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- version: 'v1',
- method: HttpMethod.GET,
- resourceUri: `/template/page`,
- query: { spaceKey: space.key },
- });
+ const space = await confluenceApi.getSpace({ auth, spaceId: String(spaceId) });
- const options: DropdownOption<string>[] = [];
- for (const template of templates) {
- options.push({
- label: template.name,
- value: template.templateId,
+ const folders = await confluenceApi.listFolderDescendants({
+ auth,
+ contentId: space.homepageId,
});
- }
- return {
- disabled: false,
- options,
- };
- },
-});
-export const folderIdProp = Property.Dropdown({
- displayName:'Parent Folder',
- auth: confluenceAuth,
- refreshers:['spaceId'],
- required:false,
- options:async ({auth,spaceId})=>{
- if (!auth || !spaceId) {
+ const options: DropdownOption<string>[] = [];
+ for (const folder of folders) {
+ options.push({
+ label: folder.title,
+ value: folder.id,
+ });
+ }
return {
- disabled: true,
- options: [],
- placeholder: 'Please connect your account first and select a space.',
+ disabled: false,
+ options,
};
- }
-
- const space = await confluenceApiCall<{ id: string; name: string; key: string,homepageId:string }>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- method: HttpMethod.GET,
- version: 'v2',
- resourceUri: `/spaces/${spaceId}`,
- });
-
- const folders = await confluencePaginatedApiCall<{id:string,title:string}>({
- domain:auth.props.confluenceDomain,
- username:auth.props.username,
- password:auth.props.password,
- version:'v1',
- method:HttpMethod.GET,
- resourceUri:`/content/${space.homepageId}/descendant/folder`,
- })
-
- const options:DropdownOption<string>[] = [];
- for(const folder of folders){
- options.push({
- label:folder.title,
- value:folder.id
- })
- }
- return{
- disabled:false,
- options
- }
- }
-})
-
-export const templateVariablesProp = Property.DynamicProperties({
- displayName: 'Template Variables',
- auth: confluenceAuth,
- refreshers: ['templateId'],
- required: false,
- props: async ({ auth, templateId }) => {
- if (!auth) return {};
- if (!templateId) return {};
-
- const props: DynamicPropsValue = {};
-
- const response = await confluenceApiCall<{ body: { storage: { value: string } } }>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- method: HttpMethod.GET,
- version: 'v1',
- resourceUri: `/template/${templateId}`,
- });
-
- const parsedXml = await parseStringPromise(response.body.storage.value, {
- explicitArray: false,
- });
- const declarations = parsedXml['at:declarations'];
+ },
+ });
+}
- if (!declarations) return {};
+function templateVariables<R extends boolean>({
+ required,
+ displayName = 'Template Variables',
+ description,
+}: PropParams<R>) {
+ return Property.DynamicProperties({
+ displayName,
+ description,
+ auth: confluenceAuth,
+ refreshers: ['templateId'],
+ required,
+ props: async ({ auth, templateId }) => {
+ if (!auth) return {};
+ if (!templateId) return {};
- const variables: Array<{ name: string; type: string; options?: string[] }> = [];
+ const props: DynamicPropsValue = {};
- Object.entries(declarations).forEach(([key, value]: [string, any]) => {
- const type = key.replace('at:', '');
- if (Array.isArray(value)) {
- value.forEach((item) => {
- if (item['$']) {
- const varName = item['$']['at:name'];
- let options: string[] | undefined;
+ const response = await confluenceApi.getTemplate({ auth, templateId: String(templateId) });
- if (type === 'list' && item['at:option']) {
- options = item['at:option'].map((opt: any) => opt['$']['at:value']);
+ const parsedXml = await parseStringPromise(response.body.storage.value, {
+ explicitArray: false,
+ });
+ const declarations: ConfluenceTemplateDeclarations | undefined = parsedXml['at:declarations'];
+
+ if (!declarations) return {};
+
+ const variables: Array<{ name: string; type: string; options?: string[] }> = [];
+
+ Object.entries(declarations).forEach(([key, value]) => {
+ const type = key.replace('at:', '');
+ if (Array.isArray(value)) {
+ value.forEach((item) => {
+ if (item['$']) {
+ const varName = item['$']['at:name'];
+ let options: string[] | undefined;
+
+ if (type === 'list' && item['at:option']) {
+ options = item['at:option'].map((opt) => opt['$']['at:value']);
+ }
+
+ if (varName && type) {
+ variables.push({
+ name: varName,
+ type: type,
+ options: options,
+ });
+ }
}
+ });
+ } else if (value['$']) {
+ const varName = value['$']['at:name'];
+ let options: string[] | undefined;
- if (varName && type) {
- variables.push({
- name: varName,
- type: type,
- options: options,
- });
- }
+ if (type === 'list' && value['at:option']) {
+ options = value['at:option'].map((opt) => opt['$']['at:value']);
}
- });
- } else if (value['$']) {
- const varName = value['$']['at:name'];
- let options: string[] | undefined;
- if (type === 'list' && value['at:option']) {
- options = value['at:option'].map((opt: any) => opt['$']['at:value']);
+ if (varName && type) {
+ variables.push({
+ name: varName,
+ type: type,
+ options: options,
+ });
+ }
}
+ });
- if (varName && type) {
- variables.push({
- name: varName,
- type: type,
- options: options,
- });
+ for (const variable of variables) {
+ switch (variable.type) {
+ case 'list':
+ props[variable.name] = Property.StaticDropdown({
+ displayName: variable.name,
+ required: false,
+ defaultValue: '',
+ options: {
+ disabled: false,
+ options: variable.options
+ ? variable.options.map((option) => {
+ return {
+ label: option,
+ value: option,
+ };
+ })
+ : [],
+ },
+ });
+ break;
+ case 'string':
+ props[variable.name] = Property.ShortText({
+ displayName: variable.name,
+ required: false,
+ defaultValue: '',
+ });
+ break;
+ case 'textarea':
+ props[variable.name] = Property.LongText({
+ displayName: variable.name,
+ required: false,
+ defaultValue: '',
+ });
+ break;
+ default:
+ break;
}
}
- });
- for (const variable of variables) {
- switch (variable.type) {
- case 'list':
- props[variable.name] = Property.StaticDropdown({
- displayName: variable.name,
- required: false,
- defaultValue: '',
- options: {
- disabled: false,
- options: variable.options
- ? variable.options.map((option) => {
- return {
- label: option,
- value: option,
- };
- })
- : [],
- },
- });
- break;
- case 'string':
- props[variable.name] = Property.ShortText({
- displayName: variable.name,
- required: false,
- defaultValue: '',
- });
- break;
- case 'textarea':
- props[variable.name] = Property.LongText({
- displayName: variable.name,
- required: false,
- defaultValue: '',
- });
- break;
- default:
- break;
- }
- }
+ return props;
+ },
+ });
+}
+
+function disabledOptions({ placeholder }: { placeholder: string }): DropdownState<never> {
+ return { disabled: true, options: [], placeholder };
+}
+
+export const confluenceProps = { spaceId, pageId, templateId, folderId, templateVariables };
- return props;
- },
-});
+export type PropParams<R extends boolean> = { required: R; displayName?: string; description?: string };
diff --git a/packages/pieces/community/confluence/src/lib/common/types.ts b/packages/pieces/community/confluence/src/lib/common/types.ts
new file mode 100644
index 00000000000..66733483860
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/common/types.ts
@@ -0,0 +1,148 @@
+import type { AppConnectionType } from '@activepieces/pieces-framework';
+
+export type ConfluenceAuthValue = {
+ type: AppConnectionType.CUSTOM_AUTH;
+ props: { username: string; password: string; confluenceDomain: string };
+};
+
+export type ConfluencePaginatedResponse<T> = {
+ results?: T[];
+ _links?: {
+ next?: string;
+ };
+};
+
+export type ConfluenceCurrentUser = {
+ type?: string;
+ accountId?: string;
+ email?: string;
+ displayName?: string;
+};
+
+export type ConfluenceSpace = { id: string; name: string; key: string; homepageId: string };
+
+export type ConfluencePageSummary = { id: string; title: string };
+
+export type ConfluenceTemplateSummary = { templateId: string; name: string };
+
+export type ConfluenceFolderSummary = { id: string; title: string };
+
+export type ConfluenceTemplate = { body: { storage: { value: string } } };
+
+export type ConfluenceTemplateVariableNode = {
+ $?: { 'at:name'?: string };
+ 'at:option'?: Array<{ $: { 'at:value': string } }>;
+};
+
+export type ConfluenceTemplateDeclarations = Record<
+ string,
+ ConfluenceTemplateVariableNode | ConfluenceTemplateVariableNode[]
+>;
+
+export type ConfluencePage = {
+ id: string;
+ title: string;
+ status: string;
+ spaceId: string;
+ createdAt: string;
+ version: { number: number; createdAt: string };
+ body?: { storage?: { value: string; representation: string } };
+};
+
+export type ConfluenceAttachment = {
+ id: string;
+ title: string;
+ pageId?: string;
+ mediaType: string;
+ fileSize: number;
+ version: { number: number; createdAt: string };
+ downloadLink: string;
+};
+
+export type ConfluenceComment = {
+ id: string;
+ status: string;
+ pageId: string;
+ version: { number: number; createdAt: string };
+ body: unknown;
+};
+
+export type ConfluenceBlogPost = {
+ id: string;
+ status: string;
+ title: string;
+ spaceId: string;
+ createdAt: string;
+ version: { number: number; createdAt: string };
+};
+
+export type ConfluenceUserSearchResult = {
+ results?: Array<{ user: Record<string, unknown> }>;
+ totalSize?: number;
+};
+
+export type ConfluenceRecord = Record<string, unknown>;
+
+export type ConfluenceQuery = Record<string, string | number | boolean | undefined>;
+
+export type ConfluenceCursorPage = {
+ results: ConfluenceRecord[];
+ count: number;
+ nextCursor: string | null;
+};
+
+export type ConfluenceContentType =
+ | 'pages'
+ | 'blogposts'
+ | 'attachments'
+ | 'whiteboards'
+ | 'folders'
+ | 'spaces'
+ | 'labels'
+ | 'footer-comments'
+ | 'inline-comments';
+
+export type ConfluenceVersionedContent = {
+ id: string;
+ title: string;
+ status: string;
+ version: { number: number };
+ body?: { storage?: { value: string } };
+};
+
+export type ConfluenceContentProperty = {
+ id: string;
+ key: string;
+ value: unknown;
+ version: { number: number };
+};
+
+export type ConfluenceTask = {
+ id: string;
+ localId?: string;
+ spaceId?: string;
+ pageId?: string;
+ blogPostId?: string;
+ status: string;
+ createdBy?: string;
+ assignedTo?: string;
+ completedBy?: string;
+ createdAt?: string;
+ updatedAt?: string;
+ dueAt?: string;
+ completedAt?: string;
+};
+
+export type ConfluenceCopyDestination = {
+ type: string;
+ value: string;
+};
+
+export type ConfluenceCqlSearchResponse = {
+ results: unknown[];
+ size: number;
+ start: number;
+ limit: number;
+ totalSize?: number;
+ _links?: { next?: string };
+};
diff --git a/packages/pieces/community/confluence/src/lib/output-schemas.ts b/packages/pieces/community/confluence/src/lib/output-schemas.ts
new file mode 100644
index 00000000000..d2606b86efb
--- /dev/null
+++ b/packages/pieces/community/confluence/src/lib/output-schemas.ts
@@ -0,0 +1,3807 @@
+import { OutputSchema } from '@activepieces/pieces-framework';
+
+const profilePictureFields: OutputSchema['fields'] = [
+ { key: 'path', label: 'Path' },
+ { key: 'width', label: 'Width', format: 'number' },
+ { key: 'height', label: 'Height', format: 'number' },
+ { key: 'isDefault', label: 'Is Default', format: 'boolean' },
+];
+
+const userFields: OutputSchema['fields'] = [
+ { key: 'type', label: 'Type' },
+ { key: 'accountId', label: 'Account ID' },
+ { key: 'accountType', label: 'Account Type' },
+ { key: 'email', label: 'Email', format: 'email' },
+ { key: 'publicName', label: 'Public Name' },
+ { key: 'profilePicture', label: 'Profile Picture', children: profilePictureFields },
+ { key: 'displayName', label: 'Display Name' },
+ { key: 'isExternalCollaborator', label: 'Is External Collaborator', format: 'boolean' },
+ { key: 'isGuest', label: 'Is Guest', format: 'boolean' },
+ { key: 'locale', label: 'Locale' },
+ { key: 'accountStatus', label: 'Account Status' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+];
+
+const bodyRepresentationFields: OutputSchema['fields'] = [
+ { key: 'representation', label: 'Representation' },
+ { key: 'value', label: 'Value' },
+];
+
+const spaceFields: OutputSchema['fields'] = [
+ { key: 'id', label: 'ID', format: 'number' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'key', label: 'Key' },
+ { key: 'alias', label: 'Alias' },
+ { key: 'name', label: 'Name' },
+ { key: 'type', label: 'Type' },
+ { key: 'status', label: 'Status' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'self', label: 'API URL' },
+ ],
+ },
+];
+
+const versionFields: OutputSchema['fields'] = [
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+];
+
+export const confluenceAddLabelsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'name',
+ listItems: [
+ { key: 'prefix', label: 'Prefix' },
+ { key: 'name', label: 'Name' },
+ { key: 'id', label: 'ID' },
+ { key: 'label', label: 'Label' },
+ ],
+ },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ ],
+};
+
+export const confluenceAddSpaceLabelsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'name',
+ listItems: [
+ { key: 'prefix', label: 'Prefix' },
+ { key: 'name', label: 'Name' },
+ { key: 'id', label: 'ID' },
+ { key: 'label', label: 'Label' },
+ ],
+ },
+ { key: 'size', label: 'Size', format: 'number' },
+ ],
+};
+
+export const confluenceListPageAncestorsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'id',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceArchivePagesOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ {
+ key: 'links',
+ label: 'Links',
+ children: [{ key: 'status', label: 'Status' }],
+ },
+ ],
+};
+
+export const confluenceCreateFooterCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'attachmentId', label: 'Attachment ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ { key: 'blogPostId', label: 'Blog Post ID' },
+ { key: 'pageId', label: 'Page ID' },
+ ],
+};
+
+export const confluenceListAttachmentCommentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'attachmentId', label: 'Attachment ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListAttachmentLabelsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'name',
+ listItems: [
+ { key: 'prefix', label: 'Prefix' },
+ { key: 'name', label: 'Name' },
+ { key: 'id', label: 'ID' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListAuditRecordsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ listItems: [
+ {
+ key: 'author',
+ label: 'Author',
+ children: [
+ { key: 'type', label: 'Type' },
+ { key: 'displayName', label: 'Display Name' },
+ { key: 'operations', label: 'Operations' },
+ { key: 'isExternalCollaborator', label: 'Is External Collaborator', format: 'boolean' },
+ { key: 'username', label: 'Username' },
+ { key: 'userKey', label: 'User Key' },
+ { key: 'accountId', label: 'Account ID' },
+ { key: 'accountType', label: 'Account Type' },
+ { key: 'publicName', label: 'Public Name' },
+ { key: 'externalCollaborator', label: 'External Collaborator', format: 'boolean' },
+ ],
+ },
+ { key: 'remoteAddress', label: 'Remote Address' },
+ { key: 'creationDate', label: 'Creation Date', format: 'datetime' },
+ { key: 'summary', label: 'Summary' },
+ { key: 'description', label: 'Description' },
+ { key: 'category', label: 'Category' },
+ { key: 'sysAdmin', label: 'System Admin', format: 'boolean' },
+ { key: 'superAdmin', label: 'Super Admin', format: 'boolean' },
+ {
+ key: 'affectedObject',
+ label: 'Affected Object',
+ children: [
+ { key: 'name', label: 'Name' },
+ { key: 'objectType', label: 'Object Type' },
+ ],
+ },
+ {
+ key: 'changedValues',
+ label: 'Changed Values',
+ labelKey: 'name',
+ listItems: [
+ { key: 'name', label: 'Name' },
+ { key: 'oldValue', label: 'Old Value' },
+ { key: 'newValue', label: 'New Value' },
+ { key: 'hiddenOldValue', label: 'Hidden Old Value' },
+ { key: 'hiddenNewValue', label: 'Hidden New Value' },
+ ],
+ },
+ {
+ key: 'associatedObjects',
+ label: 'Associated Objects',
+ labelKey: 'name',
+ listItems: [
+ { key: 'name', label: 'Name' },
+ { key: 'objectType', label: 'Object Type' },
+ ],
+ },
+ ],
+ },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ { key: 'next', label: 'Next Page Path' },
+ { key: 'self', label: 'API URL' },
+ ],
+ },
+ ],
+};
+
+export const confluenceCreateBlogPostOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListBlogPostAttachmentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'blogPostId', label: 'Blog Post ID' },
+ { key: 'webuiLink', label: 'Web UI Link' },
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'downloadLink', label: 'Download Link' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'comment', label: 'Comment' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'fileSize', label: 'File Size', format: 'filesize' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'download', label: 'Download Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListBlogPostFooterCommentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'blogPostId', label: 'Blog Post ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceCreateInlineCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'blogPostId', label: 'Blog Post ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ { key: 'inlineMarkerRef', label: 'Inline Marker Ref' },
+ { key: 'inlineOriginalSelection', label: 'Inline Original Selection' },
+ { key: 'inline-marker-ref', label: 'Inline Marker Ref' },
+ { key: 'inline-original-selection', label: 'Inline Original Selection' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'parentCommentId', label: 'Parent Comment ID' },
+ ],
+};
+
+export const confluenceListBlogPostInlineCommentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'blogPostId', label: 'Blog Post ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ { key: 'inlineMarkerRef', label: 'Inline Marker Ref' },
+ { key: 'inlineOriginalSelection', label: 'Inline Original Selection' },
+ { key: 'inline-original-selection', label: 'Inline Original Selection' },
+ { key: 'inline-marker-ref', label: 'Inline Marker Ref' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceGetBlogPostLikeCountOutputSchema: OutputSchema = {
+ fields: [{ key: 'count', label: 'Count', format: 'number' }],
+};
+
+export const confluenceListBlogPostOperationsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'operations',
+ label: 'Operations',
+ listItems: [
+ { key: 'operation', label: 'Operation' },
+ { key: 'targetType', label: 'Target Type' },
+ ],
+ },
+ ],
+};
+
+export const confluenceCreateBlogPostPropertyOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'version', label: 'Version', children: versionFields },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ ],
+};
+
+export const confluenceUploadAttachmentOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'base64EncodedAri', label: 'Base64 Encoded ARI' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [
+ { key: 'by', label: 'By', children: userFields },
+ { key: 'when', label: 'When', format: 'datetime' },
+ { key: 'friendlyWhen', label: 'Friendly When' },
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'contentTypeModified', label: 'Content Type Modified', format: 'boolean' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ { key: 'message', label: 'Message' },
+ ],
+ },
+ {
+ key: 'container',
+ label: 'Container',
+ children: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'base64EncodedAri', label: 'Base64 Encoded ARI' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'self', label: 'API URL' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ ],
+ },
+ {
+ key: 'extensions',
+ label: 'Extensions',
+ children: [{ key: 'position', label: 'Position', format: 'number' }],
+ },
+ ],
+ },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ {
+ key: 'metadata',
+ label: 'Metadata',
+ children: [
+ { key: 'mediaType', label: 'Media Type' },
+ {
+ key: 'labels',
+ label: 'Labels',
+ children: [
+ { key: 'results', label: 'Results' },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'next', label: 'Next Page Path' },
+ { key: 'self', label: 'API URL' },
+ ],
+ },
+ ],
+ },
+ { key: 'comment', label: 'Comment' },
+ ],
+ },
+ {
+ key: 'extensions',
+ label: 'Extensions',
+ children: [
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'fileSize', label: 'File Size', format: 'filesize' },
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'collectionName', label: 'Collection Name' },
+ { key: 'comment', label: 'Comment' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'self', label: 'API URL' },
+ { key: 'download', label: 'Download Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'size', label: 'Size', format: 'number' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetBlogPostVersionOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'message', label: 'Message' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'contentTypeModified', label: 'Content Type Modified', format: 'boolean' },
+ { key: 'collaborators', label: 'Collaborators' },
+ { key: 'prevVersion', label: 'Previous Version' },
+ { key: 'nextVersion', label: 'Next Version', format: 'number' },
+ ],
+};
+
+export const confluenceListBlogPostVersionsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ listItems: [
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ {
+ key: 'blogpost',
+ label: 'Blogpost',
+ children: [
+ { key: 'id', label: 'ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ { key: 'title', label: 'Title' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListBlogPostsForLabelOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceCreatePageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListChildPagesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'childPosition', label: 'Child Position', format: 'number' },
+ { key: 'type', label: 'Type' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceUpdateTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'assignedTo', label: 'Assigned To' },
+ { key: 'dueAt', label: 'Due At', format: 'datetime' },
+ { key: 'updatedAt', label: 'Updated At', format: 'datetime' },
+ { key: 'completedAt', label: 'Completed At', format: 'datetime' },
+ { key: 'completedBy', label: 'Completed By' },
+ { key: 'localId', label: 'Local ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'createdBy', label: 'Created By' },
+ ],
+};
+
+export const confluenceCopyPageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'base64EncodedAri', label: 'Base64 Encoded ARI' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'space', label: 'Space', children: spaceFields },
+ {
+ key: 'history',
+ label: 'History',
+ children: [
+ { key: 'latest', label: 'Latest', format: 'boolean' },
+ { key: 'createdBy', label: 'Created By', children: userFields },
+ { key: 'createdDate', label: 'Created Date', format: 'datetime' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [
+ { key: 'by', label: 'By', children: userFields },
+ { key: 'when', label: 'When', format: 'datetime' },
+ { key: 'friendlyWhen', label: 'Friendly When' },
+ { key: 'message', label: 'Message' },
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'confRev', label: 'Confluence Revision' },
+ { key: 'contentTypeModified', label: 'Content Type Modified', format: 'boolean' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ {
+ key: 'extensions',
+ label: 'Extensions',
+ children: [{ key: 'position', label: 'Position', format: 'number' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'context', label: 'Context' },
+ { key: 'self', label: 'API URL' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'collection', label: 'Collection' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceDeleteAttachmentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'deleted', label: 'Deleted', format: 'boolean' },
+ { key: 'attachmentId', label: 'Attachment ID' },
+ ],
+};
+
+export const confluenceDeleteBlogPostOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'deleted', label: 'Deleted', format: 'boolean' },
+ { key: 'blogPostId', label: 'Blog Post ID' },
+ ],
+};
+
+export const confluenceDeleteBlogPostPropertyOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'deleted', label: 'Deleted', format: 'boolean' },
+ { key: 'propertyId', label: 'Property ID' },
+ ],
+};
+
+export const confluenceDeletePageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'deleted', label: 'Deleted', format: 'boolean' },
+ { key: 'pageId', label: 'Page ID' },
+ ],
+};
+
+export const confluenceDeleteFolderOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'deleted', label: 'Deleted', format: 'boolean' },
+ { key: 'folderId', label: 'Folder ID' },
+ ],
+};
+
+export const confluenceDeleteFooterCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'deleted', label: 'Deleted', format: 'boolean' },
+ { key: 'commentId', label: 'Comment ID' },
+ ],
+};
+
+export const confluenceDeleteSpaceOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'ari', label: 'ARI' },
+ {
+ key: 'links',
+ label: 'Links',
+ children: [{ key: 'status', label: 'Status' }],
+ },
+ ],
+};
+
+export const confluenceDeleteWhiteboardOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'deleted', label: 'Deleted', format: 'boolean' },
+ { key: 'whiteboardId', label: 'Whiteboard ID' },
+ ],
+};
+
+export const confluenceListPageDescendantsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'depth', label: 'Depth', format: 'number' },
+ { key: 'childPosition', label: 'Child Position', format: 'number' },
+ { key: 'type', label: 'Type' },
+ { key: 'lastModified', label: 'Last Modified', format: 'datetime' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const findUserOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'found', label: 'Found', format: 'boolean' },
+ { key: 'count', label: 'Count', format: 'number' },
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'displayName',
+ listItems: [
+ { key: 'type', label: 'Type' },
+ { key: 'accountId', label: 'Account ID' },
+ { key: 'accountType', label: 'Account Type' },
+ { key: 'email', label: 'Email', format: 'email' },
+ { key: 'publicName', label: 'Public Name' },
+ { key: 'profilePicture', label: 'Profile Picture', children: profilePictureFields },
+ { key: 'displayName', label: 'Display Name' },
+ { key: 'isExternalCollaborator', label: 'Is External Collaborator', format: 'boolean' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ ],
+};
+
+export const confluenceCreateFolderOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'title', label: 'Title' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'status', label: 'Status' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListFooterCommentRepliesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'parentCommentId', label: 'Parent Comment ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceGetAttachmentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'webuiLink', label: 'Web UI Link' },
+ { key: 'downloadLink', label: 'Download Link' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'comment', label: 'Comment' },
+ { key: 'id', label: 'ID' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'fileSize', label: 'File Size', format: 'filesize' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'download', label: 'Download Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ {
+ key: 'labels',
+ label: 'Labels',
+ children: [
+ { key: 'results', label: 'Results' },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'versions',
+ label: 'Versions',
+ children: [
+ {
+ key: 'results',
+ label: 'Results',
+ listItems: [
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ {
+ key: 'attachment',
+ label: 'Attachment',
+ children: [
+ { key: 'body', label: 'Body' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ ],
+ },
+ ],
+ },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetBlogPostOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'status', label: 'Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ { key: 'view', label: 'View', children: bodyRepresentationFields },
+ { key: 'export_view', label: 'Export View', children: bodyRepresentationFields },
+ { key: 'styled_view', label: 'Styled View', children: bodyRepresentationFields },
+ ],
+ },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ {
+ key: 'labels',
+ label: 'Labels',
+ children: [
+ { key: 'results', label: 'Results' },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ { key: 'results', label: 'Results' },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'versions',
+ label: 'Versions',
+ children: [
+ {
+ key: 'results',
+ label: 'Results',
+ listItems: [
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ {
+ key: 'blogpost',
+ label: 'Blogpost',
+ children: [
+ { key: 'id', label: 'ID' },
+ { key: 'body', label: 'Body' },
+ { key: 'title', label: 'Title' },
+ ],
+ },
+ ],
+ },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetFooterCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ { key: 'view', label: 'View', children: bodyRepresentationFields },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetInlineCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ { key: 'view', label: 'View', children: bodyRepresentationFields },
+ ],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ { key: 'inlineMarkerRef', label: 'Inline Marker Ref' },
+ { key: 'inlineOriginalSelection', label: 'Inline Original Selection' },
+ { key: 'inline-original-selection', label: 'Inline Original Selection' },
+ { key: 'inline-marker-ref', label: 'Inline Marker Ref' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetLabelOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'label',
+ label: 'Label',
+ children: [
+ { key: 'prefix', label: 'Prefix' },
+ { key: 'name', label: 'Name' },
+ { key: 'id', label: 'ID' },
+ { key: 'label', label: 'Label' },
+ ],
+ },
+ {
+ key: 'associatedContents',
+ label: 'Associated Contents',
+ children: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'contentType', label: 'Content Type' },
+ { key: 'contentId', label: 'Content ID', format: 'number' },
+ { key: 'title', label: 'Title' },
+ ],
+ },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetPageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ { key: 'view', label: 'View', children: bodyRepresentationFields },
+ { key: 'export_view', label: 'Export View', children: bodyRepresentationFields },
+ { key: 'styled_view', label: 'Styled View', children: bodyRepresentationFields },
+ ],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ {
+ key: 'labels',
+ label: 'Labels',
+ children: [
+ { key: 'results', label: 'Results' },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'versions',
+ label: 'Versions',
+ children: [
+ {
+ key: 'results',
+ label: 'Results',
+ listItems: [
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ {
+ key: 'page',
+ label: 'Page',
+ children: [
+ { key: 'body', label: 'Body' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ ],
+ },
+ ],
+ },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'key',
+ listItems: [
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'value', label: 'Value' },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ ],
+ },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetSpaceOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'spaceOwnerId', label: 'Space Owner ID' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'homepageId', label: 'Homepage ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'icon', label: 'Icon' },
+ { key: 'name', label: 'Name' },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ {
+ key: 'description',
+ label: 'Description',
+ children: [{ key: 'plain', label: 'Plain', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ { key: 'currentActiveAlias', label: 'Current Active Alias' },
+ {
+ key: 'labels',
+ label: 'Labels',
+ children: [
+ { key: 'results', label: 'Results' },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ { key: 'results', label: 'Results' },
+ {
+ key: 'meta',
+ label: 'Meta',
+ children: [{ key: 'hasMore', label: 'Has More', format: 'boolean' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'assignedTo', label: 'Assigned To' },
+ { key: 'dueAt', label: 'Due At', format: 'datetime' },
+ { key: 'updatedAt', label: 'Updated At', format: 'datetime' },
+ { key: 'completedAt', label: 'Completed At', format: 'datetime' },
+ { key: 'completedBy', label: 'Completed By' },
+ { key: 'localId', label: 'Local ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'createdBy', label: 'Created By' },
+ ],
+};
+
+export const confluenceGetTemplateOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'templateId', label: 'Template ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'description', label: 'Description' },
+ { key: 'space', label: 'Space', children: spaceFields },
+ { key: 'labels', label: 'Labels' },
+ { key: 'templateType', label: 'Template Type' },
+ { key: 'editorVersion', label: 'Editor Version' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ {
+ key: 'storage',
+ label: 'Storage',
+ children: [
+ { key: 'value', label: 'Value' },
+ { key: 'representation', label: 'Representation' },
+ { key: 'embeddedContent', label: 'Embedded Content' },
+ ],
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'self', label: 'API URL' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListGroupMembersOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'results', label: 'Results' },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ { key: 'self', label: 'API URL' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListGroupsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'managedBy', label: 'Managed By' },
+ { key: 'usageType', label: 'Usage Type' },
+ { key: 'resourceAri', label: 'Resource ARI' },
+ { key: 'type', label: 'Type' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ { key: 'next', label: 'Next Page Path' },
+ { key: 'self', label: 'API URL' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListInlineCommentRepliesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'parentCommentId', label: 'Parent Comment ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListBlogPostPropertiesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'key',
+ listItems: [
+ { key: 'version', label: 'Version', children: versionFields },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListBlogPostsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListPagePropertiesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'key',
+ listItems: [
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListPagesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListSpacePropertiesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'key',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'key', label: 'Key' },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'authorId', label: 'Author ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListSpacesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'name',
+ listItems: [
+ { key: 'spaceOwnerId', label: 'Space Owner ID' },
+ { key: 'homepageId', label: 'Homepage ID' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'icon', label: 'Icon' },
+ { key: 'name', label: 'Name' },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ {
+ key: 'description',
+ label: 'Description',
+ children: [{ key: 'plain', label: 'Plain', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ { key: 'currentActiveAlias', label: 'Current Active Alias' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const listSpacesOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'count', label: 'Count', format: 'number' },
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'name',
+ listItems: [
+ { key: 'spaceOwnerId', label: 'Space Owner ID' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'homepageId', label: 'Homepage ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'icon', label: 'Icon' },
+ { key: 'description', label: 'Description' },
+ { key: 'status', label: 'Status' },
+ { key: 'name', label: 'Name' },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ { key: 'currentActiveAlias', label: 'Current Active Alias' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListTasksOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'id',
+ listItems: [
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'assignedTo', label: 'Assigned To' },
+ { key: 'dueAt', label: 'Due At', format: 'datetime' },
+ { key: 'updatedAt', label: 'Updated At', format: 'datetime' },
+ { key: 'completedAt', label: 'Completed At', format: 'datetime' },
+ { key: 'completedBy', label: 'Completed By' },
+ { key: 'localId', label: 'Local ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'createdBy', label: 'Created By' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListWhiteboardPropertiesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'key',
+ listItems: [
+ { key: 'version', label: 'Version', children: versionFields },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceGetLongTaskOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'ari', label: 'ARI' },
+ { key: 'id', label: 'ID' },
+ {
+ key: 'name',
+ label: 'Name',
+ children: [
+ { key: 'key', label: 'Key' },
+ { key: 'args', label: 'Args' },
+ ],
+ },
+ { key: 'elapsedTime', label: 'Elapsed Time', format: 'duration' },
+ { key: 'percentageComplete', label: 'Percentage Complete', format: 'number' },
+ { key: 'successful', label: 'Successful', format: 'boolean' },
+ { key: 'finished', label: 'Finished', format: 'boolean' },
+ {
+ key: 'messages',
+ label: 'Messages',
+ listItems: [
+ { key: 'translation', label: 'Translation' },
+ { key: 'args', label: 'Args' },
+ ],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'errors', label: 'Errors' },
+ { key: 'additionalDetails', label: 'Additional Details' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetCurrentUserOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'type', label: 'Type' },
+ { key: 'accountId', label: 'Account ID' },
+ { key: 'accountType', label: 'Account Type' },
+ { key: 'email', label: 'Email', format: 'email' },
+ { key: 'publicName', label: 'Public Name' },
+ { key: 'profilePicture', label: 'Profile Picture', children: profilePictureFields },
+ { key: 'displayName', label: 'Display Name' },
+ { key: 'isExternalCollaborator', label: 'Is External Collaborator', format: 'boolean' },
+ { key: 'isGuest', label: 'Is Guest', format: 'boolean' },
+ { key: 'locale', label: 'Locale' },
+ { key: 'accountStatus', label: 'Account Status' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'self', label: 'API URL' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ ],
+ },
+ ],
+};
+
+export const confluenceMovePageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'position', label: 'Position' },
+ { key: 'targetId', label: 'Target ID' },
+ ],
+};
+
+export const findPageByTitleOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'found', label: 'Found', format: 'boolean' },
+ { key: 'count', label: 'Count', format: 'number' },
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'body', label: 'Body' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+ },
+ ],
+};
+
+export const getPageByUrlOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ { key: 'view', label: 'View', children: bodyRepresentationFields },
+ ],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const publishDraftOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const addCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const createPageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const deletePageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'pageId', label: 'Page ID' },
+ ],
+};
+
+export const downloadAttachmentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'file', label: 'File', format: 'url' },
+ {
+ key: 'attachment',
+ label: 'Attachment',
+ children: [
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'webuiLink', label: 'Web UI Link' },
+ { key: 'downloadLink', label: 'Download Link' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'comment', label: 'Comment' },
+ { key: 'id', label: 'ID' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'fileSize', label: 'File Size', format: 'filesize' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'download', label: 'Download Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+ },
+ ],
+};
+
+export const getpagecontentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ {
+ key: 'children',
+ label: 'Children',
+ labelKey: 'title',
+ listItems: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ { key: 'children', label: 'Children' },
+ ],
+ },
+ ],
+};
+
+export const listAttachmentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'webuiLink', label: 'Web UI Link' },
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'downloadLink', label: 'Download Link' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'comment', label: 'Comment' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'fileSize', label: 'File Size', format: 'filesize' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'download', label: 'Download Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ ],
+ },
+ ],
+ },
+ ],
+};
+
+export const listCommentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+ },
+ {
+ key: 'footer',
+ label: 'Footer',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+ },
+ {
+ key: 'inline',
+ label: 'Inline',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ { key: 'inlineMarkerRef', label: 'Inline Marker Ref' },
+ { key: 'inlineOriginalSelection', label: 'Inline Original Selection' },
+ { key: 'inline-original-selection', label: 'Inline Original Selection' },
+ { key: 'inline-marker-ref', label: 'Inline Marker Ref' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ { key: 'resolutionLastModifierId', label: 'Resolution Last Modifier ID' },
+ {
+ key: 'resolutionLastModifiedAt',
+ label: 'Resolution Last Modified At',
+ format: 'datetime',
+ },
+ ],
+ },
+ ],
+};
+
+export const movePageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'position', label: 'Position' },
+ { key: 'targetPageId', label: 'Target Page ID' },
+ ],
+};
+
+export const removeLabelOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'label', label: 'Label' },
+ ],
+};
+
+export const searchPagesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'base64EncodedAri', label: 'Base64 Encoded Ari' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [
+ { key: 'by', label: 'By', children: userFields },
+ { key: 'when', label: 'When', format: 'datetime' },
+ { key: 'friendlyWhen', label: 'Friendly When' },
+ { key: 'message', label: 'Message' },
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'confRev', label: 'Conf Rev' },
+ { key: 'contentTypeModified', label: 'Content Type Modified', format: 'boolean' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ {
+ key: 'extensions',
+ label: 'Extensions',
+ children: [
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'fileSize', label: 'File Size', format: 'number' },
+ { key: 'comment', label: 'Comment' },
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'collectionName', label: 'Collection Name' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'self', label: 'API URL' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'download', label: 'Download Path' },
+ ],
+ },
+ {
+ key: 'space',
+ label: 'Space',
+ children: [
+ { key: 'id', label: 'ID', format: 'number' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'key', label: 'Key' },
+ { key: 'alias', label: 'Alias' },
+ { key: 'name', label: 'Name' },
+ { key: 'type', label: 'Type' },
+ { key: 'status', label: 'Status' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'self', label: 'API URL' },
+ ],
+ },
+ ],
+ },
+ {
+ key: 'history',
+ label: 'History',
+ children: [
+ { key: 'latest', label: 'Latest', format: 'boolean' },
+ { key: 'createdBy', label: 'Created By', children: userFields },
+ { key: 'createdDate', label: 'Created Date', format: 'datetime' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ {
+ key: 'storage',
+ label: 'Storage',
+ children: [
+ { key: 'value', label: 'Value' },
+ { key: 'representation', label: 'Representation' },
+ { key: 'embeddedContent', label: 'Embedded Content' },
+ ],
+ },
+ ],
+ },
+ {
+ key: 'metadata',
+ label: 'Metadata',
+ children: [{ key: 'mediaType', label: 'Media Type' }],
+ },
+ { key: 'childTypes', label: 'Child Types' },
+ { key: 'restrictions', label: 'Restrictions' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const updatePageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const uploadAttachmentOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'base64EncodedAri', label: 'Base64 Encoded ARI' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [
+ { key: 'by', label: 'By', children: userFields },
+ { key: 'when', label: 'When', format: 'datetime' },
+ { key: 'friendlyWhen', label: 'Friendly When' },
+ { key: 'message', label: 'Message' },
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'contentTypeModified', label: 'Content Type Modified', format: 'boolean' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ {
+ key: 'container',
+ label: 'Container',
+ children: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'base64EncodedAri', label: 'Base64 Encoded ARI' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ {
+ key: 'extensions',
+ label: 'Extensions',
+ children: [{ key: 'position', label: 'Position', format: 'number' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'self', label: 'API URL' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ ],
+ },
+ ],
+ },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ {
+ key: 'metadata',
+ label: 'Metadata',
+ children: [
+ { key: 'comment', label: 'Comment' },
+ { key: 'mediaType', label: 'Media Type' },
+ {
+ key: 'labels',
+ label: 'Labels',
+ children: [
+ { key: 'results', label: 'Results' },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'next', label: 'Next Page Path' },
+ { key: 'self', label: 'API URL' },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ key: 'extensions',
+ label: 'Extensions',
+ children: [
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'fileSize', label: 'File Size', format: 'filesize' },
+ { key: 'comment', label: 'Comment' },
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'collectionName', label: 'Collection Name' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'self', label: 'API URL' },
+ { key: 'download', label: 'Download Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'size', label: 'Size', format: 'number' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListPageAttachmentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'webuiLink', label: 'Web UI Link' },
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'downloadLink', label: 'Download Link' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'comment', label: 'Comment' },
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'fileSize', label: 'File Size', format: 'filesize' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'download', label: 'Download Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListPageFooterCommentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceListPageInlineCommentsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ { key: 'inlineMarkerRef', label: 'Inline Marker Ref' },
+ { key: 'inlineOriginalSelection', label: 'Inline Original Selection' },
+ { key: 'inline-original-selection', label: 'Inline Original Selection' },
+ { key: 'inline-marker-ref', label: 'Inline Marker Ref' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ { key: 'resolutionLastModifierId', label: 'Resolution Last Modifier ID' },
+ {
+ key: 'resolutionLastModifiedAt',
+ label: 'Resolution Last Modified At',
+ format: 'datetime',
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceCreatePagePropertyOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'version', label: 'Version', children: versionFields },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ ],
+};
+
+export const confluenceListPagesForLabelOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'position', label: 'Position' },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'status', label: 'Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceRemoveLabelOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'removed', label: 'Removed', format: 'boolean' },
+ { key: 'contentId', label: 'Content ID' },
+ { key: 'label', label: 'Label' },
+ ],
+};
+
+export const confluenceRemoveSpaceLabelOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'removed', label: 'Removed', format: 'boolean' },
+ { key: 'spaceKey', label: 'Space Key' },
+ { key: 'label', label: 'Label' },
+ ],
+};
+
+export const replyToCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'parentCommentId', label: 'Parent Comment ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceUpdateInlineCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ { key: 'resolutionLastModifierId', label: 'Resolution Last Modifier ID' },
+ { key: 'resolutionLastModifiedAt', label: 'Resolution Last Modified At', format: 'datetime' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ {
+ key: 'properties',
+ label: 'Properties',
+ children: [
+ { key: 'inlineMarkerRef', label: 'Inline Marker Ref' },
+ { key: 'inlineOriginalSelection', label: 'Inline Original Selection' },
+ { key: 'inline-original-selection', label: 'Inline Original Selection' },
+ { key: 'inline-marker-ref', label: 'Inline Marker Ref' },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceRestorePageVersionOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'by', label: 'By', children: userFields },
+ { key: 'when', label: 'When', format: 'datetime' },
+ { key: 'friendlyWhen', label: 'Friendly When' },
+ { key: 'message', label: 'Message' },
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'confRev', label: 'Confluence Revision' },
+ { key: 'contentTypeModified', label: 'Content Type Modified', format: 'boolean' },
+ {
+ key: 'content',
+ label: 'Content',
+ children: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'base64EncodedAri', label: 'Base64 Encoded ARI' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ {
+ key: 'extensions',
+ label: 'Extensions',
+ children: [{ key: 'position', label: 'Position', format: 'number' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'self', label: 'API URL' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ ],
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'self', label: 'API URL' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ ],
+ },
+ ],
+};
+
+export const confluenceGetContentRestrictionsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ listItems: [
+ { key: 'operation', label: 'Operation' },
+ {
+ key: 'restrictions',
+ label: 'Restrictions',
+ children: [
+ {
+ key: 'user',
+ label: 'User',
+ children: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'displayName',
+ listItems: [
+ { key: 'type', label: 'Type' },
+ { key: 'accountId', label: 'Account ID' },
+ { key: 'accountType', label: 'Account Type' },
+ { key: 'email', label: 'Email', format: 'email' },
+ { key: 'publicName', label: 'Public Name' },
+ { key: 'profilePicture', label: 'Profile Picture' },
+ { key: 'displayName', label: 'Display Name' },
+ {
+ key: 'isExternalCollaborator',
+ label: 'Is External Collaborator',
+ format: 'boolean',
+ },
+ { key: 'isGuest', label: 'Is Guest', format: 'boolean' },
+ { key: 'locale', label: 'Locale' },
+ { key: 'accountStatus', label: 'Account Status' },
+ { key: '_links', label: 'Links' },
+ ],
+ },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ ],
+ },
+ {
+ key: 'group',
+ label: 'Group',
+ children: [
+ { key: 'results', label: 'Results' },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ ],
+ },
+ ],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ { key: 'restrictionsHash', label: 'Restrictions Hash' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'context', label: 'Context' },
+ { key: 'self', label: 'API URL' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'byOperation', label: 'By Operation', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceSearchContentOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'title',
+ listItems: [
+ {
+ key: 'content',
+ label: 'Content',
+ children: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'childTypes', label: 'Child Types' },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ { key: 'restrictions', label: 'Restrictions' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'self', label: 'API URL' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+ },
+ { key: 'title', label: 'Title' },
+ { key: 'excerpt', label: 'Excerpt' },
+ { key: 'url', label: 'URL' },
+ {
+ key: 'resultGlobalContainer',
+ label: 'Result Global Container',
+ children: [
+ { key: 'title', label: 'Title' },
+ { key: 'displayUrl', label: 'Display URL' },
+ ],
+ },
+ { key: 'breadcrumbs', label: 'Breadcrumbs' },
+ { key: 'entityType', label: 'Entity Type' },
+ { key: 'iconCssClass', label: 'Icon CSS Class' },
+ { key: 'lastModified', label: 'Last Modified', format: 'datetime' },
+ { key: 'friendlyLastModified', label: 'Friendly Last Modified' },
+ { key: 'score', label: 'Score', format: 'number' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceCreateSpaceOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'homepageId', label: 'Homepage ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'icon', label: 'Icon' },
+ { key: 'name', label: 'Name' },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ {
+ key: 'description',
+ label: 'Description',
+ children: [{ key: 'plain', label: 'Plain', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ { key: 'currentActiveAlias', label: 'Current Active Alias' },
+ ],
+};
+
+export const confluenceCreateSpacePropertyOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'key', label: 'Key' },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'authorId', label: 'Author ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ ],
+ },
+ ],
+};
+
+export const newAttachmentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'mediaTypeDescription', label: 'Media Type Description' },
+ { key: 'webuiLink', label: 'Web UI Link' },
+ { key: 'fileId', label: 'File ID' },
+ { key: 'downloadLink', label: 'Download Link' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'comment', label: 'Comment' },
+ { key: 'id', label: 'ID' },
+ { key: 'pageId', label: 'Page ID' },
+ { key: 'mediaType', label: 'Media Type' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'fileSize', label: 'File Size', format: 'filesize' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'download', label: 'Download Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ ],
+ },
+ ],
+};
+
+export const newBlogPostOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'body', label: 'Body' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+};
+
+export const newCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'webui', label: 'Web UI Path' }],
+ },
+ ],
+};
+
+export const newPageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'body', label: 'Body' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'id', label: 'ID' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+};
+
+export const updatedPageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'body', label: 'Body' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ ],
+ },
+ ],
+};
+
+export const confluenceListTemplatesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'name',
+ listItems: [
+ { key: 'templateId', label: 'Template ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'description', label: 'Description' },
+ { key: 'space', label: 'Space', children: spaceFields },
+ { key: 'labels', label: 'Labels' },
+ { key: 'templateType', label: 'Template Type' },
+ { key: 'editorVersion', label: 'Editor Version' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [{ key: 'self', label: 'API URL' }],
+ },
+ ],
+ },
+ { key: 'start', label: 'Start', format: 'number' },
+ { key: 'limit', label: 'Limit', format: 'number' },
+ { key: 'size', label: 'Size', format: 'number' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ { key: 'context', label: 'Context' },
+ { key: 'self', label: 'API URL' },
+ ],
+ },
+ ],
+};
+
+export const confluenceUpdateBlogPostOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'status', label: 'Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceUpdateFooterCommentOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'pageId', label: 'Page ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [...versionFields, { key: 'contributorIds', label: 'Contributor IDs' }],
+ },
+ { key: 'resolutionStatus', label: 'Resolution Status' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceUpdatePageOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'id', label: 'ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'spaceId', label: 'Space ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [{ key: 'storage', label: 'Storage', children: bodyRepresentationFields }],
+ },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceUpdatePagePropertyOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ { key: 'version', label: 'Version', children: versionFields },
+ ],
+};
+
+export const confluenceUpdateSpaceOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID', format: 'number' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'key', label: 'Key' },
+ { key: 'alias', label: 'Alias' },
+ { key: 'name', label: 'Name' },
+ {
+ key: 'description',
+ label: 'Description',
+ children: [
+ {
+ key: 'plain',
+ label: 'Plain',
+ children: [
+ { key: 'value', label: 'Value' },
+ { key: 'representation', label: 'Representation' },
+ { key: 'embeddedContent', label: 'Embedded Content' },
+ ],
+ },
+ ],
+ },
+ {
+ key: 'homepage',
+ label: 'Homepage',
+ children: [
+ { key: 'id', label: 'ID' },
+ { key: 'type', label: 'Type' },
+ { key: 'ari', label: 'ARI' },
+ { key: 'base64EncodedAri', label: 'Base64 Encoded ARI' },
+ { key: 'status', label: 'Status' },
+ { key: 'title', label: 'Title' },
+ { key: 'macroRenderedOutput', label: 'Macro Rendered Output' },
+ {
+ key: 'extensions',
+ label: 'Extensions',
+ children: [{ key: 'position', label: 'Position', format: 'number' }],
+ },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'self', label: 'API URL' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ ],
+ },
+ ],
+ },
+ { key: 'type', label: 'Type' },
+ {
+ key: 'permissions',
+ label: 'Permissions',
+ labelKey: 'id',
+ listItems: [
+ { key: 'id', label: 'ID', format: 'number' },
+ {
+ key: 'subjects',
+ label: 'Subjects',
+ children: [
+ {
+ key: 'user',
+ label: 'User',
+ children: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'displayName',
+ listItems: [
+ { key: 'type', label: 'Type' },
+ { key: 'accountId', label: 'Account ID' },
+ { key: 'accountType', label: 'Account Type' },
+ { key: 'email', label: 'Email', format: 'email' },
+ { key: 'publicName', label: 'Public Name' },
+ { key: 'profilePicture', label: 'Profile Picture' },
+ { key: 'displayName', label: 'Display Name' },
+ {
+ key: 'isExternalCollaborator',
+ label: 'Is External Collaborator',
+ format: 'boolean',
+ },
+ { key: 'isGuest', label: 'Is Guest', format: 'boolean' },
+ { key: 'accountStatus', label: 'Account Status' },
+ { key: '_links', label: 'Links' },
+ { key: 'locale', label: 'Locale' },
+ ],
+ },
+ { key: 'size', label: 'Size', format: 'number' },
+ ],
+ },
+ {
+ key: 'group',
+ label: 'Group',
+ children: [
+ {
+ key: 'results',
+ label: 'Results',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'resourceAri', label: 'Resource ARI' },
+ { key: 'type', label: 'Type' },
+ { key: '_links', label: 'Links' },
+ ],
+ },
+ { key: 'size', label: 'Size', format: 'number' },
+ ],
+ },
+ ],
+ },
+ {
+ key: 'operation',
+ label: 'Operation',
+ children: [
+ { key: 'operation', label: 'Operation' },
+ { key: 'targetType', label: 'Target Type' },
+ ],
+ },
+ { key: 'anonymousAccess', label: 'Anonymous Access', format: 'boolean' },
+ { key: 'unlicensedAccess', label: 'Unlicensed Access', format: 'boolean' },
+ ],
+ },
+ { key: 'status', label: 'Status' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'context', label: 'Context' },
+ { key: 'self', label: 'API URL' },
+ { key: 'collection', label: 'Collection' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceUpdateSpacePropertyOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID' },
+ { key: 'key', label: 'Key' },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'authorId', label: 'Author ID' },
+ {
+ key: 'version',
+ label: 'Version',
+ children: [
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ ],
+ },
+ ],
+};
+
+export const confluenceUpdatePageTitleOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'parentType', label: 'Parent Type' },
+ { key: 'parentId', label: 'Parent ID' },
+ { key: 'ownerId', label: 'Owner ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'lastOwnerId', label: 'Last Owner ID' },
+ { key: 'position', label: 'Position', format: 'number' },
+ { key: 'version', label: 'Version', children: versionFields },
+ { key: 'id', label: 'ID' },
+ { key: 'spaceId', label: 'Space ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'body', label: 'Body' },
+ { key: 'title', label: 'Title' },
+ {
+ key: '_links',
+ label: 'Links',
+ children: [
+ { key: 'editui', label: 'Edit UI Path' },
+ { key: 'webui', label: 'Web UI Path' },
+ { key: 'edituiv2', label: 'Edit UI Path (v2)' },
+ { key: 'tinyui', label: 'Short Link Path' },
+ { key: 'base', label: 'Site Base URL', format: 'url' },
+ ],
+ },
+ ],
+};
+
+export const confluenceUpdateWhiteboardPropertyOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'version', label: 'Version', children: versionFields },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ ],
+};
+
+export const confluenceListPageVersionsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'results',
+ label: 'Results',
+ listItems: [
+ { key: 'number', label: 'Number', format: 'number' },
+ { key: 'message', label: 'Message' },
+ { key: 'minorEdit', label: 'Minor Edit', format: 'boolean' },
+ { key: 'authorId', label: 'Author ID' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ {
+ key: 'page',
+ label: 'Page',
+ children: [
+ { key: 'id', label: 'ID' },
+ {
+ key: 'body',
+ label: 'Body',
+ children: [
+ { key: 'storage', label: 'Storage', children: bodyRepresentationFields },
+ {
+ key: 'atlas_doc_format',
+ label: 'Atlas Document Format',
+ children: bodyRepresentationFields,
+ },
+ ],
+ },
+ { key: 'title', label: 'Title' },
+ ],
+ },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ { key: 'nextCursor', label: 'Next Cursor' },
+ ],
+};
+
+export const confluenceGetPageViewersOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'ID', format: 'number' },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};
+
+export const confluenceCreateWhiteboardPropertyOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'version', label: 'Version', children: versionFields },
+ {
+ key: 'value',
+ label: 'Value',
+ },
+ { key: 'key', label: 'Key' },
+ { key: 'id', label: 'ID' },
+ ],
+};
diff --git a/packages/pieces/community/confluence/src/lib/triggers/new-attachment.ts b/packages/pieces/community/confluence/src/lib/triggers/new-attachment.ts
index 3e5e0e2867f..29829eabf50 100644
--- a/packages/pieces/community/confluence/src/lib/triggers/new-attachment.ts
+++ b/packages/pieces/community/confluence/src/lib/triggers/new-attachment.ts
@@ -1,58 +1,30 @@
import {
- createTrigger,
- TriggerStrategy,
- AppConnectionValueForAuthProperty,
+ AppConnectionValueForAuthProperty,
+ createTrigger,
+ TriggerStrategy,
} from '@activepieces/pieces-framework';
-import {
- DedupeStrategy,
- Polling,
- pollingHelper,
- HttpMethod,
-} from '@activepieces/pieces-common';
-import { isNil } from '@activepieces/pieces-framework';
-import { confluenceAuth, confluenceAuthValue } from '../auth';
-import { confluenceApiCall, PaginatedResponse } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
-
-interface ConfluenceAttachment {
- id: string;
- title: string;
- pageId?: string;
- mediaType: string;
- fileSize: number;
- version: {
- number: number;
- createdAt: string;
- };
- downloadLink?: string;
-}
+import { DedupeStrategy, Polling, pollingHelper } from '@activepieces/pieces-common';
+import { confluenceAuth } from '../auth';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { newAttachmentOutputSchema } from '../output-schemas';
const props = {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
};
-const polling: Polling<confluenceAuthValue, { spaceId?: string; pageId?: string }> = {
+const polling: Polling<
+ AppConnectionValueForAuthProperty<typeof confluenceAuth>, { spaceId?: string; pageId?: string }> = {
strategy: DedupeStrategy.TIMEBASED,
async items({ auth, propsValue }) {
- const response = await confluenceApiCall<
- PaginatedResponse<ConfluenceAttachment>
- >({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- version: 'v2',
- method: HttpMethod.GET,
- resourceUri: `/pages/${propsValue.pageId}/attachments`,
- query: {
- limit: '100',
- sort: '-created-date',
- },
+ const results = await confluenceApi.listPageAttachments({
+ auth,
+ pageId: propsValue.pageId,
+ sort: '-created-date',
});
- if (isNil(response.results)) return [];
-
- return response.results
+ return results
.filter((a) => a.version.number === 1)
.map((attachment) => ({
epochMilliSeconds: new Date(attachment.version.createdAt).getTime(),
@@ -63,6 +35,7 @@ const polling: Polling<confluenceAuthValue, { spaceId?: string; pageId?: string
export const newAttachmentTrigger = createTrigger({
name: 'new-attachment',
+ outputSchema: newAttachmentOutputSchema,
classification: 'READ',
displayName: 'New Attachment',
description:
diff --git a/packages/pieces/community/confluence/src/lib/triggers/new-blog-post.ts b/packages/pieces/community/confluence/src/lib/triggers/new-blog-post.ts
index 58c3fe51e05..0c790a12c93 100644
--- a/packages/pieces/community/confluence/src/lib/triggers/new-blog-post.ts
+++ b/packages/pieces/community/confluence/src/lib/triggers/new-blog-post.ts
@@ -1,45 +1,24 @@
import {
+ AppConnectionValueForAuthProperty,
createTrigger,
TriggerStrategy,
- AppConnectionValueForAuthProperty,
} from '@activepieces/pieces-framework';
-import { DedupeStrategy, Polling, pollingHelper, HttpMethod } from '@activepieces/pieces-common';
-import { isNil } from '@activepieces/pieces-framework';
-import { confluenceAuth, confluenceAuthValue } from '../auth';
-import { confluenceApiCall, PaginatedResponse } from '../common';
-import { spaceIdProp } from '../common/props';
-
-interface ConfluenceBlogPost {
- id: string;
- status: string;
- title: string;
- spaceId: string;
- createdAt: string;
- version: { number: number; createdAt: string };
-}
+import { DedupeStrategy, Polling, pollingHelper } from '@activepieces/pieces-common';
+import { confluenceAuth } from '../auth';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { newBlogPostOutputSchema } from '../output-schemas';
const props = {
- spaceId: spaceIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
};
-const polling: Polling<confluenceAuthValue, { spaceId?: string }> = {
+const polling: Polling<
+ AppConnectionValueForAuthProperty<typeof confluenceAuth>, { spaceId?: string }> = {
strategy: DedupeStrategy.TIMEBASED,
async items({ auth, propsValue }) {
- const response = await confluenceApiCall<PaginatedResponse<ConfluenceBlogPost>>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- version: 'v2',
- method: HttpMethod.GET,
- resourceUri: `/spaces/${propsValue.spaceId}/blogposts`,
- query: {
- limit: '100',
- sort: '-created-date',
- },
- });
-
- if (isNil(response.results)) return [];
+ const results = await confluenceApi.listSpaceBlogPosts({ auth, spaceId: propsValue.spaceId });
- return response.results.map((post) => ({
+ return results.map((post) => ({
epochMilliSeconds: new Date(post.createdAt).getTime(),
data: post,
}));
@@ -48,6 +27,7 @@ const polling: Polling<confluenceAuthValue, { spaceId?: string }> = {
export const newBlogPostTrigger = createTrigger({
name: 'new-blog-post',
+ outputSchema: newBlogPostOutputSchema,
classification: 'READ',
displayName: 'New Blog Post',
description: 'Triggers when a new blog post is published in the selected space.',
diff --git a/packages/pieces/community/confluence/src/lib/triggers/new-comment.ts b/packages/pieces/community/confluence/src/lib/triggers/new-comment.ts
index a0150a8c22a..8c0ce6b058c 100644
--- a/packages/pieces/community/confluence/src/lib/triggers/new-comment.ts
+++ b/packages/pieces/community/confluence/src/lib/triggers/new-comment.ts
@@ -1,60 +1,34 @@
import {
- createTrigger,
- TriggerStrategy,
- AppConnectionValueForAuthProperty,
+ AppConnectionValueForAuthProperty,
+ createTrigger,
+ TriggerStrategy,
} from '@activepieces/pieces-framework';
-import {
- DedupeStrategy,
- Polling,
- pollingHelper,
- HttpMethod,
-} from '@activepieces/pieces-common';
-import { isNil } from '@activepieces/pieces-framework';
-import { confluenceAuth, confluenceAuthValue } from '../auth';
-import { confluenceApiCall, PaginatedResponse } from '../common';
-import { pageIdProp, spaceIdProp } from '../common/props';
-
-interface ConfluenceComment {
- id: string;
- status: string;
- pageId: string;
- version: {
- number: number;
- createdAt: string;
- };
- body: unknown;
-}
+import { DedupeStrategy, Polling, pollingHelper } from '@activepieces/pieces-common';
+import { confluenceAuth } from '../auth';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { newCommentOutputSchema } from '../output-schemas';
const props = {
- spaceId: spaceIdProp,
- pageId: pageIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
+ pageId: confluenceProps.pageId({ required: true }),
};
const polling: Polling<
- confluenceAuthValue,
+ AppConnectionValueForAuthProperty<typeof confluenceAuth>,
{ spaceId?: string; pageId?: string }
> = {
strategy: DedupeStrategy.TIMEBASED,
async items({ auth, propsValue }) {
- const response = await confluenceApiCall<
- PaginatedResponse<ConfluenceComment>
- >({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- version: 'v2',
- method: HttpMethod.GET,
- resourceUri: `/pages/${propsValue.pageId}/footer-comments`,
- query: {
- limit: '100',
- sort: '-created-date',
- 'body-format': 'storage',
- },
+ const results = await confluenceApi.listPageComments({
+ auth,
+ pageId: propsValue.pageId,
+ commentType: 'footer',
+ bodyFormat: 'storage',
+ sort: '-created-date',
});
- if (isNil(response.results)) return [];
-
- return response.results
+ return results
.filter((c) => c.version.number === 1)
.map((comment) => ({
epochMilliSeconds: new Date(comment.version.createdAt).getTime(),
@@ -65,6 +39,7 @@ const polling: Polling<
export const newCommentTrigger = createTrigger({
name: 'new-comment',
+ outputSchema: newCommentOutputSchema,
classification: 'READ',
displayName: 'New Comment on Page',
description:
diff --git a/packages/pieces/community/confluence/src/lib/triggers/new-page.ts b/packages/pieces/community/confluence/src/lib/triggers/new-page.ts
index 9b21ab98e92..b5360967ed5 100644
--- a/packages/pieces/community/confluence/src/lib/triggers/new-page.ts
+++ b/packages/pieces/community/confluence/src/lib/triggers/new-page.ts
@@ -1,53 +1,29 @@
import {
+ AppConnectionValueForAuthProperty,
createTrigger,
TriggerStrategy,
- AppConnectionValueForAuthProperty,
} from '@activepieces/pieces-framework';
-import { DedupeStrategy, Polling, pollingHelper, HttpMethod } from '@activepieces/pieces-common';
-import { confluenceAuth, confluenceAuthValue } from '../auth';
-import { confluenceApiCall, PaginatedResponse } from '../common';
-import { isNil } from '@activepieces/pieces-framework';
-import { spaceIdProp } from '../common/props';
-
-interface ConfluencePage {
- id: string;
- status: string;
- title: string;
- spaceId: string;
- createdAt: string;
- version: {
- number: number;
- createdAt: string;
- };
-}
+import { DedupeStrategy, Polling, pollingHelper } from '@activepieces/pieces-common';
+import { confluenceAuth } from '../auth';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { newPageOutputSchema } from '../output-schemas';
const props = {
- spaceId: spaceIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
};
-const PAGE_FETCH_LIMIT = 100;
-
-const polling: Polling<confluenceAuthValue, { spaceId?: string,pageId?: string }> = {
+const polling: Polling<
+ AppConnectionValueForAuthProperty<typeof confluenceAuth>, { spaceId?: string,pageId?: string }> = {
strategy: DedupeStrategy.TIMEBASED,
async items({ auth, propsValue }) {
- const response = await confluenceApiCall<PaginatedResponse<ConfluencePage>>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- version: 'v2',
- method: HttpMethod.GET,
- resourceUri: `/spaces/${propsValue.spaceId}/pages`,
- query: {
- limit: String(PAGE_FETCH_LIMIT),
- sort: '-created-date',
- },
+ const results = await confluenceApi.listSpacePages({
+ auth,
+ spaceId: propsValue.spaceId,
+ sort: '-created-date',
});
- if (isNil(response.results)) {
- return [];
- }
-
- return response.results.map((page) => ({
+ return results.map((page) => ({
epochMilliSeconds: new Date(page.createdAt).getTime(),
data: page,
}));
@@ -56,6 +32,7 @@ const polling: Polling<confluenceAuthValue, { spaceId?: string,pageId?: string
export const newPageTrigger = createTrigger({
name: 'new-page',
+ outputSchema: newPageOutputSchema,
classification: 'READ',
displayName: 'New Page',
description: 'Triggers when a new page is created.',
diff --git a/packages/pieces/community/confluence/src/lib/triggers/updated-page.ts b/packages/pieces/community/confluence/src/lib/triggers/updated-page.ts
index a737d022d10..243df6401c8 100644
--- a/packages/pieces/community/confluence/src/lib/triggers/updated-page.ts
+++ b/packages/pieces/community/confluence/src/lib/triggers/updated-page.ts
@@ -1,54 +1,31 @@
import {
+ AppConnectionValueForAuthProperty,
createTrigger,
TriggerStrategy,
- AppConnectionValueForAuthProperty,
} from '@activepieces/pieces-framework';
-import { DedupeStrategy, Polling, pollingHelper, HttpMethod } from '@activepieces/pieces-common';
-import { isNil } from '@activepieces/pieces-framework';
-import { confluenceAuth, confluenceAuthValue } from '../auth';
-import { confluenceApiCall, PaginatedResponse } from '../common';
-import { spaceIdProp } from '../common/props';
-
-interface ConfluencePage {
- id: string;
- status: string;
- title: string;
- spaceId: string;
- createdAt: string;
- version: {
- number: number;
- createdAt: string;
- };
-}
+import { DedupeStrategy, Polling, pollingHelper } from '@activepieces/pieces-common';
+import { confluenceAuth } from '../auth';
+import { confluenceApi } from '../common/api';
+import { confluenceProps } from '../common/props';
+import { updatedPageOutputSchema } from '../output-schemas';
const props = {
- spaceId: spaceIdProp,
+ spaceId: confluenceProps.spaceId({ required: true }),
};
-const PAGE_FETCH_LIMIT = 100;
-
const polling: Polling<
- confluenceAuthValue,
+ AppConnectionValueForAuthProperty<typeof confluenceAuth>,
{ spaceId?: string }
> = {
strategy: DedupeStrategy.TIMEBASED,
async items({ auth, propsValue }) {
- const response = await confluenceApiCall<PaginatedResponse<ConfluencePage>>({
- domain: auth.props.confluenceDomain,
- username: auth.props.username,
- password: auth.props.password,
- version: 'v2',
- method: HttpMethod.GET,
- resourceUri: `/spaces/${propsValue.spaceId}/pages`,
- query: {
- limit: String(PAGE_FETCH_LIMIT),
- sort: '-modified-date',
- },
+ const results = await confluenceApi.listSpacePages({
+ auth,
+ spaceId: propsValue.spaceId,
+ sort: '-modified-date',
});
- if (isNil(response.results)) return [];
-
- return response.results
+ return results
.filter((page) => page.version.number > 1)
.map((page) => ({
epochMilliSeconds: new Date(page.version.createdAt).getTime(),
@@ -59,6 +36,7 @@ const polling: Polling<
export const updatedPageTrigger = createTrigger({
name: 'updated-page',
+ outputSchema: updatedPageOutputSchema,
classification: 'READ',
displayName: 'Updated Page',
description: 'Triggers when an existing page is updated (version > 1).',